[Top] [All Lists]

Re: typo in rfc2440: secret key packet format

1999-07-28 08:26:57
Sven Wohlgemuth, <sven(_at_)krypt1(_dot_)cs(_dot_)uni-sb(_dot_)de>, writes:
is there a typo in the following section?

5.5.3. Secret Key Packet Formats

   The Secret Key and Secret Subkey packets contain all the data of the
   Public Key and Public Subkey packets, with additional algorithm-
   specific secret key data appended, in encrypted form.

   The packet contains:

     - A Public Key or Public Subkey packet, as described above

     - One octet indicating string-to-key usage conventions.  0
       indicates that the secret key data is not encrypted.  255
       indicates that a string-to-key specifier is being given.  Any
       other value is a symmetric-key encryption algorithm specifier.

     - [Optional] If string-to-key usage octet was 255, an one-octet
      symmetric encryption algorithm.

should it be replaced by "was between 0 and 255"?
Since a symmetric encryption algorithm specifier is given only if the
preceding value is between 0 and 255.
Am I right?

No, if the value is between 0 and 255 then that value is the symmetric
key algorithm specifier.  So if the value is, say, 1, that means to use
symmetric algorithm 1.  If the value is 255, then the *next* octet holds
the algorithm specifier.

If you see:
then you use algorithm 1.

If you see:
        255, 1
then you use algorithm 1, and thyis is followed by the string-to-key

Hal Finney
Network Associates

<Prev in Thread] Current Thread [Next in Thread>