Subject: Utterly Confused by Resync

From: Ben Laurie <[email-masked]>
Date: Wed, 01 Mar 2006 13:47:32 +0000

I just implemented the Symmetrically Encrypted Data packet.

It also does a "resync" after the first blocksize+2 bytes. However, I
find that, unlike the MPI resync for v3 keys, as well as wiggling around
the IV I have to encrypt it.

That is, the resync operation for MPI looks like this:

1. Set the IV to the last blocksize bytes of ciphertext
2. Set the offset within the IV to zero.

Whereas for the Symmetrically Encrypted Data resync looks like:

1. Set the IV to the last blocksize bytes of ciphertext
2. Encrypt the IV
3. Set the offset within the IV to zero.

Can this possibly be right? Does the spec explain this at all?

Cheers,

Ben.

-- 
http://www.apache-ssl.org/ben.html           http://www.links.org/

"There is no limit to what a man can do or how far he can go if he
doesn't mind who gets the credit." - Robert Woodruff