ietf-openpgp
[Top] [All Lists]

Key Extraction odd behavior ???

1997-12-31 19:59:01
Hi,

I have been playing around with my OpenPGP packet analyzer code and I
found somthing odd.

For a signature packet that follows the userID packet for a key it should
have a CTB of 0010 (Type 2)  [0x89] but I have noticed that PGP 5.0 when
extracting a key converts this to 1110 (Type 14) [0xB9].

If I check in CTB for the signature in the pubring.pkr it does have a CTB
of 0010.

It only seems to do this with DSS signatures and not RSA signatures.

Now if I remove the key from the pubring.pkr and then readd it to the
keyring the CTB is kept at 1100 [0xB9].

Now this doesn't seem to make sense in the context of the following data:

B9 04 0D 04 34 A3 DF 8E ...

B9 is 10111001

10   = CTB old format
1110 = packet type 14
01   = length packet 2 octets

04 0D = 1037 octets = remaining length of the public key.

Now it after this I am getting lost. :(

04 = ?? subpacket length field ?? if so then what does the following 0x34
represent??

If we are to treat the 0xB9 as an error and assume that 0xB9 should really
be 0x89 then:

89 is 10001101

10   = CTB old format
0011 = packet type 2
01   = length packet 2 octets

04 0D = 1037 octets = remaining length of the public key.

04   = sig version number (4)

34   = ?? sig type ?? (sigtype of 0x34 is undefined)

If anyone understands what and why this conversion is being done and where
I am going wrong in reading the format please let me know. 

I have attached the extracted key. 

Thanks,

PS: Just as a side note to this section of the documentation. I find the
switching between hex, bin, and dec to make the reading of the
documentation much more complex. Also IMHO I think that any display of
values 8 bits or less should be done in binary (this was done in the
previous pgpformat documents including rfc1991).


-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: PGPfreeware 5.0i for non-commercial use
Comment: OS/2 Beta 1

mQGiBDSj34sRBADxJ2ENlj2F9UOvdtz1ouppQbdtOZtmg0wygQJa8dGD9Pju3d7D
0FzM2lttRMz1Fc94f7KHWUeV/My2vxgMnDtxT2bQKTQEZjvI9JSicLBqrUw5jkMU
hclYa9WMsM74zEdhqVLSn0ad3LmZ6e3zKJj5qn3em3nGIzSWcYcMvSbUWQCg/zEZ
Lp43kXPa9fES+sstlU0Quv0EAIPDy1mQJiTpISjoPJRFwqKUCI/V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a6q6Jew1XrPdYXAAICEACDUTMeCA8CcDUy855Y538x
Kbk671Mkli/ZroR9U1L24isT9pl2cosTrFKccxnOnTZN9IMnOtRYx2h7B4DHXhXj
1wRoZnDknSa1Un8w74hMP9eSn3yOROM/Ba+lXmYzJZ3jJS+6Sy6YoUE09czI/1qA
kYwx7Rh347/WGZX5hXGhb6uwGBjtlhJJprIl/9k/kN4TtMFbHwN2ADwmfHWWtiOn
4fSMZ6NO/Xfeo6kkD6Knw6GZ1QRklY0uCQ7p2q25s5zEuVqg4no+xRcwbmqkoubL
2FWavOeVgtoAQu2c+QHTwWgpvnFokSQzz2jVAi9xbU12xU0/XBKy9R7WsavAa4Tj
RzOPUwPDhaeITUONZmX1zm0UNJ2Gr7gIM+HtiQhC49W1untNu/UdNRuoAXJPimux
QqRohEiw+afA/3pvoLzIJmYQuu+BW2aAKrDyLiecPlSKGTRDCWcRq66ND4GfSvIt
5uWxo+RS0EKnW0TTlyMX7LzoSauC/702tM+Lm6rZQnrTRvHtpLvueekj2PxTpQ2s
cDM7qPzYYSVYruZb6hWS2Z4ShGv/PJ0EGw/kZ4IxQLoXnGRyeXn6F0dpW2XggdKL
DC8GKWxU6SPB7s+dwuQEFQKbmO1Q3cSUmL3jQV9N/eYdM+Q73tfsrBdgrfGHr/gN
IWglLY80UOwcg1YVD8Wcww==
=7P60
-----END PGP PUBLIC KEY BLOCK-----

-- 
---------------------------------------------------------------
William H. Geiger III  http://users.invweb.net/~whgiii
Geiger Consulting    Cooking With Warp 4.0

Author of E-Secure - PGP Front End for MR/2 Ice
PGP & MR/2 the only way for secure e-mail.
OS/2 PGP 2.6.3a at: http://users.invweb.net/~whgiii/pgpmr2.html                 
       
---------------------------------------------------------------


<Prev in Thread] Current Thread [Next in Thread>
  • Key Extraction odd behavior ???, William H. Geiger III <=