[Top] [All Lists]

RE: Need some explanations about privarte key in OpenPGP format, CFB mode

2002-02-14 23:47:52


First fo all, I want to thank you for you answer me.

Here are my problems:

OpenPGP does symmetric encryption using a variant of Cipher Feedback
Mode (CFB mode). This section describes the procedure it uses in
detail. This mode is what is used for Symmetrically Encrypted Data
Packets; the mechanism used for encrypting secret key material is
similar, but described in those sections above.

In the "secret key material" section I found this: 
Encryption/decryption of the secret data is done in CFB mode using
the key created from the passphrase and the Initial Vector from the

(and now, back to the CFB mode)
OpenPGP CFB mode uses an initialization vector (IV) of all zeros,
and prefixes the plaintext with BS+2 octets of random data, such
that octets BS+1 and BS+2 match octets BS-1 and BS.  It does a CFB
"resync" after encrypting those BS+2 octets.

I want to mention that I want to keep a secret key in format OpenPGP not
a plain text.
1) What value should I fill in IV?
2) Are those BS+2 octets just for plain text or even for secret key

3. FRE is xored with the first BS octets of random data prefixed to
the plaintext to produce C[1] through C[BS], the first BS octets
of ciphertext.

3) Do the C[i] octets represent the final form for OpenPGP format? 

12. FRE is xored with the next BS octets of plaintext, to produce
the next BS octets of ciphertext.  These are loaded into FR and
the process is repeated until the plaintext is used up.

4) Let's assume that I encrypt the algorithm-specific portion with IDEA.
What it happens with the last block of data if the length of the
algorithm-specific portion is not multiple of 8 (64 bit)? (and, of
course, the last block it will be less than BS - in this case 8 octets)

Thank you in advance,

Cornel Gligan-Ignatescu