Re: V3 secret keys

Adam Back <adam@cypherspace.org> Thu, 02 February 2006 18:58 UTC

Received: from odin.ietf.org ([132.151.1.176] helo=ietf.org) by megatron.ietf.org with esmtp (Exim 4.32) id 1F4jf5-0006OA-V7 for openpgp-archive@megatron.ietf.org; Thu, 02 Feb 2006 13:58:32 -0500
Received: from above.proper.com (above.proper.com [208.184.76.39]) by ietf.org (8.9.1a/8.9.1a) with ESMTP id NAA29273 for <openpgp-archive@lists.ietf.org>; Thu, 2 Feb 2006 13:56:54 -0500 (EST)
Received: from above.proper.com (localhost.vpnc.org [127.0.0.1]) by above.proper.com (8.12.11/8.12.9) with ESMTP id k12Ik7mF077282; Thu, 2 Feb 2006 10:46:07 -0800 (PST) (envelope-from owner-ietf-openpgp@mail.imc.org)
Received: (from majordom@localhost) by above.proper.com (8.12.11/8.12.9/Submit) id k12Ik7dw077281; Thu, 2 Feb 2006 10:46:07 -0800 (PST)
X-Authentication-Warning: above.proper.com: majordom set sender to owner-ietf-openpgp@mail.imc.org using -f
Received: from mail.off.net (off.net [66.96.28.3]) by above.proper.com (8.12.11/8.12.9) with ESMTP id k12Ik6M4077273 for <ietf-openpgp@imc.org>; Thu, 2 Feb 2006 10:46:06 -0800 (PST) (envelope-from adam@mail.off.net)
Received: by mail.off.net (Postfix, from userid 948) id 4AB877704F8; Thu, 2 Feb 2006 13:46:05 -0500 (EST)
Received: by bitchcake.off.net (hashcash-sendmail, from uid 948); Thu, 2 Feb 2006 13:46:01 -0500
Date: Thu, 02 Feb 2006 13:46:01 -0500
From: Adam Back <adam@cypherspace.org>
To: Ben Laurie <ben@algroup.co.uk>
Cc: "Daniel A. Nagy" <nagydani@epointsystem.org>, OpenPGP <ietf-openpgp@imc.org>, Adam Back <adam@cypherspace.org>
Subject: Re: V3 secret keys
Message-ID: <20060202184601.GA20613@bitchcake.off.net>
References: <43E20DB6.30209@algroup.co.uk> <20060202140612.GA13906@epointsystem.org> <43E23D08.10806@algroup.co.uk>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <43E23D08.10806@algroup.co.uk>
User-Agent: Mutt/1.4.2.1i
X-Hashcash: 1:20:060202:ben@algroup.co.uk::4YWjL6B2/ZerNAtI:DSD
X-Hashcash: 1:20:060202:nagydani@epointsystem.org::2RTbjceqUWJA9A+N:8Umc
X-Hashcash: 1:20:060202:ietf-openpgp@imc.org::XLMTEaipvJYUZQlb:36Zm
X-Hashcash: 1:20:060202:adam@cypherspace.org::HV/p2vnEThFzfo5G:114R
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>

The pgp263 docs say (not much better):

| One unusual point about the way encryption is done.  Using the IDEA
| cipher in CFB mode, the first 10 bytes are decrypted normally, but
| bytes 10 to 17, the first 8 bytes of the data proper, are encrypted
| using bytes 2 to 9 (the last 8 bytes of the key check prefix) as the
| IV.  This is essentially using CFB-16 for one part of the
| encryption, while CFB-64 is used elsewhere.

So actually (I implemented this funky thing at some point to get
compat with some parts of pgp) what it means is you encrypt normally
with CFB-64 (encrypt previous 8 bytes, xor with plaintext).  When you
get to one of these sync points, it may be part way thru a block, so
you encrypt the short block as normal.  Then you take the previous 8
bytes of ciphertext and use it as the IV and continue.

So it I think really is standard partial block encryption, but to
resume after the block you take the last 8 bytes from the end of the
previous ciphertext chunk and use as the IV for the next chunk.

I agree what is written is pretty unclear.

Adam

On Thu, Feb 02, 2006 at 05:10:32PM +0000, Ben Laurie wrote:
> >> Does it mean that the IV is reset to whatever it was at the start of the
> >> current block? Does it mean that we use the partially-updated IV, but
> >> set the position back to the beginning? Does it mean we reset the IV to
> >> the initial value and start again? Or what?
> >>
> >> Cheers,
> >>
> >> Ben.
> > 
> > It means the usual CFB synchronization with outputting a partial block and
> > shifting the IV.
> 
> If that means anything at all, you appear to be describing standard CFB
> when applied to a partial block, which I assume the above is not.
> 
> -- 
> http://www.apache-ssl.org/ben.html       http://www.thebunker.net/
> 
> "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