Utterly Confused by Resync

Ben Laurie <ben@algroup.co.uk> Wed, 01 March 2006 14:29 UTC

Received: from [10.91.34.44] (helo=ietf-mx.ietf.org) by megatron.ietf.org with esmtp (Exim 4.43) id 1FESKz-00052J-U5 for openpgp-archive@lists.ietf.org; Wed, 01 Mar 2006 09:29:57 -0500
Received: from balder-227.proper.com ([192.245.12.227]) by ietf-mx.ietf.org with esmtp (Exim 4.43) id 1FESKw-00085O-Hd for openpgp-archive@lists.ietf.org; Wed, 01 Mar 2006 09:29:57 -0500
Received: from balder-227.proper.com (localhost [127.0.0.1]) by balder-227.proper.com (8.13.5/8.13.5) with ESMTP id k21DlTr8076821; Wed, 1 Mar 2006 06:47:29 -0700 (MST) (envelope-from owner-ietf-openpgp@mail.imc.org)
Received: (from majordom@localhost) by balder-227.proper.com (8.13.5/8.13.5/Submit) id k21DlTpE076820; Wed, 1 Mar 2006 06:47:29 -0700 (MST) (envelope-from owner-ietf-openpgp@mail.imc.org)
X-Authentication-Warning: balder-227.proper.com: majordom set sender to owner-ietf-openpgp@mail.imc.org using -f
Received: from mail.links.org (mail.links.org [217.155.92.109]) by balder-227.proper.com (8.13.5/8.13.5) with ESMTP id k21DlSTM076814 for <ietf-openpgp@imc.org>; Wed, 1 Mar 2006 06:47:29 -0700 (MST) (envelope-from ben@algroup.co.uk)
Received: from [193.133.15.218] (localhost [127.0.0.1]) by mail.links.org (Postfix) with ESMTP id AA0EB33C3F for <ietf-openpgp@imc.org>; Wed, 1 Mar 2006 13:47:27 +0000 (GMT)
Message-ID: <4405A5F4.5000108@algroup.co.uk>
Date: Wed, 01 Mar 2006 13:47:32 +0000
From: Ben Laurie <ben@algroup.co.uk>
User-Agent: Thunderbird 1.5 (Windows/20051201)
MIME-Version: 1.0
To: OpenPGP <ietf-openpgp@imc.org>
Subject: Utterly Confused by Resync
X-Enigmail-Version: 0.93.0.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 7bit
Sender: owner-ietf-openpgp@mail.imc.org
Precedence: bulk
List-Archive: <http://www.imc.org/ietf-openpgp/mail-archive/>
List-Unsubscribe: <mailto:ietf-openpgp-request@imc.org?body=unsubscribe>
List-ID: <ietf-openpgp.imc.org>
X-Spam-Score: 0.0 (/)
X-Scan-Signature: ea4ac80f790299f943f0a53be7e1a21a

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