views:

17

answers:

1

can someone show a description of the information of what a pgp looks like if only the descriptions were there but not the actual information? something like (i dont remember if the values are correct):

packet-type[4 bits], total length in bytes[16 bits], packet version type [4 bits], creation-time[32 bits], encryption-algorithm[8 bits], ...,etc,etc

ive tried to understand rfc4880, but its tedious and confusing. so far, i am think i have extracted the 4 i wrote above, but i cant seem to get the rest of the information out.

can anyone help? i know i can just find some pgp program, but the whole point of this is to allow me to learn how those programs work in the first place

A: 

It is not so easy. PGP packet headers hold packet type, length type, and only after them the packet length itself (and this length is dependent on length-type header bits). You should carefully read section 4.2. of RFC 4880 to understand how to parse a packet itself.

Nickolay O.