Subject: ASN.1 OID for TIGER/192

From: David Shaw <[email-masked]>
Date: Fri, 27 Sep 2002 08:55:50 -0400

Hello,

In 2440 and in all the 2440bis drafts, the TIGER/192 hash is not fully
usable as it has no OID.  Werner Koch and I, with the cooperation of
TIGER's authors, recently arranged an OID for it:

	1.3.6.1.4.1.11591.12.2

It would be good to put this in 2440bis so TIGER will be usable.

I have a sneaking suspicion that this may raise the question whether
TIGER should be in the standard at all, as so long as it did not have
an OID, the question was moot.  I have no strong feelings on this
point, but if we are not going to allow the use of TIGER, then perhaps
we should remove it from the standard altogether or explicitly
disallow its use as the current halfway state is confusing now that
there is an OID available.

David

-- 
   David Shaw  |  [email-masked]  |  WWW http://www.jabberwocky.com/
+---------------------------------------------------------------------------+
   "There are two major products that come out of Berkeley: LSD and UNIX.
      We don't believe this to be a coincidence." - Jeremy S. Anderson

---

From: "Brian M. Carlson" <[email-masked]>
Date: Fri, 27 Sep 2002 15:50:54 +0000

> TIGER's authors, recently arranged an OID for it:

I agree. All we have left now is to get one for HAVAL-5-160.

> there is an OID available.

I think that we should keep it in, although my opinion may be unpopular.
Few implementations allow the use of TIGER, and so those people who wish
to use it can use one of those implementations. It is useful for (gasp!)
Elgamal signatures, because it provides a larger hash algorithm and
therefore the hash algorithm is no longer the weakest link. (Please note
that TIGER is probably more widely implemented than SHA2, if I had to
guess.)

I think it would be the height of silliness to have an algorithm in
the standard and prohibit its use. In fact, it is like revoking your
signature on someone's key: it is a vote of no confidence, a statement
that it is worthless. 

-- 
Brian M. Carlson <[email-masked]> <http://decoy.wox.org/~bmc> 0x560553E7
To thine own self be true.  (If not that, at least make some money.)

---

From: David Shaw <[email-masked]>
Date: Mon, 30 Sep 2002 12:55:17 -0400

> signature on someone's key: it is a vote of no confidence, a statement

Of course, but OpenPGP is sensitive to the strengths of all of its
hash algorithms (as noted in the "Security Considerations" section).
If TIGER was put into the standard with less care because it couldn't
be used anyway without an OID, then now is an appropriate time to
decide whether it should be in the standard or not.  Mind you, I don't
know the history here - there could have been significant care taken.

I'm not for or against using TIGER in OpenPGP, but my feeling is that
if we are going to include TIGER, then we should do it intentionally,
with all due care taken.

David

---

From: Derek Atkins <[email-masked]>
Date: 30 Sep 2002 13:17:08 -0400

> if we are going to include TIGER, then we should do it intentionally,

At some level, too many ciphers can spoil the security-system...  Not
that I'm saying TIGER is insecure, but at some level you need to limit
the posibilities for real-world interoperation.

Also note that reserving a number for TIGER but _not_ putting it into
the standard is different than actually calling TIGER a required cipher.

> David

-derek

-- 
       Derek Atkins
       Computer and Internet Security Consultant
       [email-masked]             www.ihtfp.com

---

From: David Shaw <[email-masked]>
Date: Mon, 30 Sep 2002 13:31:18 -0400

> the standard is different than actually calling TIGER a required cipher.

I have no problem with assigning a number for TIGER (or rather,
continuing to use the existing one) and not making it a required
algorithm.  In fact, I think it should be a completely optional part
of the standard.  However, if TIGER is present in the standard at all
as a possibility, it still impacts to a degree even those
implementations that don't implement it.

So to clarify: I'm not for or against including TIGER as an optional
part of the standard, but if it is included, it would be nice to have
some thought first.  Of course, TIGER is *already* an optional part of
the standard, but since it was lacking an OID until recently, the
question of it actually being used was somewhat moot.

David

Date: Mon, 30 Sep 2002 13:31:18 -0400
From: David Shaw <[email-masked]>
To: Derek Atkins <[email-masked]>
Cc: [email-masked]
Subject: Re: ASN.1 OID for TIGER/192
Mail-Followup-To: Derek Atkins <[email-masked]>, [email-masked]
Sender: [email-masked]

> the standard is different than actually calling TIGER a required cipher.

I have no problem with assigning a number for TIGER (or rather,
continuing to use the existing one) and not making it a required
algorithm.  In fact, I think it should be a completely optional part
of the standard.  However, if TIGER is present in the standard at all
as a possibility, it still impacts to a degree even those
implementations that don't implement it.

So to clarify: I'm not for or against including TIGER as an optional
part of the standard, but if it is included, it would be nice to have
some thought first.  Of course, TIGER is *already* an optional part of
the standard, but since it was lacking an OID until recently, the
question of it actually being used was somewhat moot.

David

To: David Shaw <[email-masked]>
Cc: [email-masked]
From: Derek Atkins <[email-masked]>
Subject: Re: ASN.1 OID for TIGER/192
Date: 30 Sep 2002 13:17:08 -0400
Lines: 21
Sender: [email-masked]

-derek

Date: Mon, 30 Sep 2002 12:55:17 -0400
From: David Shaw <[email-masked]>
To: [email-masked]
Subject: Re: ASN.1 OID for TIGER/192
Mail-Followup-To: [email-masked]
Sender: [email-masked]

David

To: [email-masked]
Cc: [email-masked]
Subject: Re: ASN.1 OID for TIGER/192
From: Werner Koch <[email-masked]>
Organisation: g10 Code GmbH
Date: Mon, 30 Sep 2002 13:15:42 +0200
Lines: 15
Sender: [email-masked]

> so the full ASN string is:
>   0x30, 0x29, 0x30, 0x0D, 0x06, 0x09, 0x2B, 0x06, 0x01, 0x04,
>   0x01, 0xDA, 0x47, 0x0C, 0x02, 0x05, 0x00, 0x04, 0x18
> right?

I calculated the same.

Shalom-Salam,

   Werner

Date: Mon, 30 Sep 2002 10:17:49 +0200
From: [email-masked]
To: [email-masked]
Subject: Re: ASN.1 OID for TIGER/192
Sender: [email-masked]

> > TIGER's authors, recently arranged an OID for it:

finally :)

so the full ASN string is:
  0x30, 0x29, 0x30, 0x0D, 0x06, 0x09, 0x2B, 0x06, 0x01, 0x04,
  0x01, 0xDA, 0x47, 0x0C, 0x02, 0x05, 0x00, 0x04, 0x18
right?

I'm going to change PGP 2.6.3ia-multi06 to support this.

> I agree. All we have left now is to get one for HAVAL-5-160.

so do I (, and HAVAL-5-256...)

> Elgamal signatures,

and RSA signatures!

> because it provides a larger hash algorithm and
> therefore the hash algorithm is no longer the weakest link.

__
Disastry  http://disastry.dhs.org/
http://disastry.dhs.org/pgp
 ^----PGP 2.6.3ia-multi06 (supports IDEA, CAST5, BLOWFISH, TWOFISH,
      AES, 3DES ciphers and MD5, SHA1, RIPEMD160, SHA2 hashes)

From: Trevor Perrin <[email-masked]>
To: Trevor Perrin <[email-masked]>, "[email-masked]'" <[email-masked]>, "[email-masked]'" <[email-masked]>
Subject:  RE: security fixes (KDF, MDC->MAC)?
Date:  Fri, 27 Sep 2002 12:23:04 -0700
Sender: [email-masked]

Fixed a typo-

>-----Original Message-----
>From: [email-masked] [mailto:[email-masked]]
>
>5.13.
>[...]    Unlike the Symmetrically Encrypted Data Packet, no
>   special CFB resynchronization is done after encrypting this prefix
>   data.
>
>doesn't this prevent converting packet 18 to 9 ?
>

It doesn't completely prevent the JKS attack.  The attacker can still copy
the first two blocks of ciphertext from a packet 18 to 9, and the check
bytes will decrypt appropriately, but the remainder of the second block will
be scrambled.

So this will probably leave a malformed packet header, but there's a chance
the header might still work, depending on how strict the parsing code is
(for example, what if the packet tag gets randomly set to 11 for Literal
Data, but the length is wrong?).  The attacker can flip bits in the
remainder of the second block and keep submitting guesses to a decryption
oracle, until he stumbles on a packet header that makes the attack work.  

The attacker may also learn information from observing the oracle which lets
him reconstruct the keystream bytes that the ciphertext is being XOR'd with.
For example, if the oracle says "Error: packet tag 62 not supported", the
attacker can reconstruct the keystream bits that correspond to the packet
tag, and thus gain the ability to control its value.

Trevor

From: Trevor Perrin <[email-masked]>
To: "[email-masked]'" <[email-masked]>, [email-masked]
Subject:  RE: security fixes (KDF, MDC->MAC)?
Date:  Fri, 27 Sep 2002 12:16:37 -0700
Sender: [email-masked]

>-----Original Message-----
>From: [email-masked] [mailto:[email-masked]]
>
>5.13.
>[...]    Unlike the Symmetrically Encrypted Data Packet, no
>   special CFB resynchronization is done after encrypting this prefix
>   data.
>
>doesn't this prevent converting packet 18 to 9 ?
>

It doesn't completely prevent the JKS attack.  The attacker can still copy
the first two blocks of ciphertext from a packet 18 to 9, and the check
bytes will decrypt appropriately, but the remainder of the second block will
be scrambled.

So this will probably leave a malformed packet header, but there's a chance
the header might still work, depending on how strict the parsing code is
(for example, what if the packet tag gets randomly set to 9, but the length
is wrong?).  The attacker can flip bits in the remainder of the second block
and keep submitting guesses to a decryption oracle, until he stumbles on a
packet header that makes the attack work.  

The attacker may also learn information from observing the oracle which lets
him reconstruct the keystream bytes that the ciphertext is being XOR'd with.
For example, if the oracle says "Error: packet tag 62 not supported", the
attacker can reconstruct the keystream bits that correspond to the packet
tag, and thus gain the ability to control its value.

Trevor

From: "Brian M. Carlson" <[email-masked]>
Date: Fri, 27 Sep 2002 15:50:54 +0000
To: [email-masked]
Subject: Re: ASN.1 OID for TIGER/192
Content-Conversion: prohibited
Sender: [email-masked]

--nmemrqcdn5VTmUEE
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Fri, Sep 27, 2002 at 08:55:50AM -0400, David Shaw wrote:
>=20
>=20
>=20
>=20

that it is worthless.=20

--=20
Brian M. Carlson <[email-masked]> <http://decoy.wox.org/~bmc> 0x560553=
E7
To thine own self be true.  (If not that, at least make some money.)

--nmemrqcdn5VTmUEE
Content-Type: application/pgp-signature
Content-Disposition: inline

Signature policy: http://decoy.wox.org/~bmc/openpgp/policy.tex

--nmemrqcdn5VTmUEE--

To: [email-masked]
Subject: Re: security fixes (KDF, MDC->MAC)?
From: Werner Koch <[email-masked]>
Organisation: g10 Code GmbH
Date: Fri, 27 Sep 2002 16:09:13 +0200
Lines: 15
Sender: [email-masked]

On Fri, 27 Sep 2002 10:05:51 +0200, disastry  said:

> doesn't this prevent converting packet 18 to 9 ?

Yes.

Even more important is that we push users towards using the MDC feature
so that we eventually can make the "no MDC used" warning an
error. (well, with an option to ignore it so that old message can still
be decrypted)

Shalom-Salam,

   Werner

Date: Fri, 27 Sep 2002 08:55:50 -0400
From: David Shaw <[email-masked]>
To: [email-masked]
Subject: ASN.1 OID for TIGER/192
Mail-Followup-To: [email-masked]
Sender: [email-masked]

Hello,

	1.3.6.1.4.1.11591.12.2

David

Date: Fri, 27 Sep 2002 10:05:51 +0200
From: [email-masked]
To: [email-masked]
Subject: Re: security fixes (KDF, MDC->MAC)?
Sender: [email-masked]

> Hello OpenPGP,
> 
> Is there interest in fixing the security flaws discussed in the recent
> "security analysis" thread? -
> 
> (1) the Integrity Protected Data and MDC Packets fail to stop Schneier et
> al's attack, because the ciphertext blocks can be pasted into a
> non-integrity protected packet (ie ciphertext from a tag 18 packet can be
> placed in a tag 9 packet, evading the MDC).

5.13.
[...]    Unlike the Symmetrically Encrypted Data Packet, no
   special CFB resynchronization is done after encrypting this prefix
   data.

doesn't this prevent converting packet 18 to 9 ?

__
Disastry  http://disastry.dhs.org/
http://disastry.dhs.org/pgp
 ^----PGP 2.6.3ia-multi06 (supports IDEA, CAST5, BLOWFISH, TWOFISH,
      AES, 3DES ciphers and MD5, SHA1, RIPEMD160, SHA2 hashes)

From: Trevor Perrin <[email-masked]>
To: "[email-masked]'" <[email-masked]>
Subject:  security fixes (KDF, MDC->MAC)?
Date:  Thu, 26 Sep 2002 12:18:01 -0700
Sender: [email-masked]

Hello OpenPGP,

Is there interest in fixing the security flaws discussed in the recent
"security analysis" thread? -

(1) the Integrity Protected Data and MDC Packets fail to stop Schneier et
al's attack, because the ciphertext blocks can be pasted into a
non-integrity protected packet (ie ciphertext from a tag 18 packet can be
placed in a tag 9 packet, evading the MDC).

(2) Once an attack like above recovered the prefix data, forgeries are
possible:
http://www.imc.org/ietf-openpgp/mail-archive/msg05804.html

One fix (due to John Kane) would be a version 2 of the integrity-protected
packet (tag 18).  This new version would use a key derivation function (KDF)
to derive separate encryption and authentication keys.  The authentication
key would be used by a new MAC packet (say tag 20), which would be just like
the MDC packet but use HMAC-SHA1 instead of SHA1.

Version = Integrity Protected Data Packet Version Number (2)
EncKey  = KDF(SessionKey, Version, 0)
AuthKey = KDF(SessionKey, Version, 1)

Since the encryption key is now the result of a version-dependent KDF,
downgrade attacks like (1) are prevented.

Since the MAC depends on the AuthKey which an attacker doesn't know,
forgeries (2) are prevented.

So what do people think?  Is a fix like this worth it?

Trevor

Date: Wed, 25 Sep 2002 13:05:47 +0200
From: Bodo Moeller <[email-masked]>
To: Jon Callas <[email-masked]>
Cc: [email-masked]
Subject: Re: draft-ietf-openpgp-rfc2440bis-06.txt
Sender: [email-masked]

On Tue, Sep 24, 2002 at 04:05:32PM -0700, Jon Callas wrote:
> Bodo Moeller <[email-masked]>:

>> As I pointed out, you can use *self-signature* expiration (subpacket
>> type 3) for many purposes, and use *key* expiration (subpacket type 9)
>> for cases where you really want the key to expire [...] such that the
>> bad guy cannot unexpire the key.  What speaks against this?

> They mean separate things. A signature expiration on a self-signature
> expires the validity of that signature. If you have, for example, a key with
> two user names, expiration of that signature effectively expires that user
> id. They key expiration makes the whole key expire. If you did it with
> signature expirations, you'd have to manage every user id separately.

Now it all fits together.  It turns out that you can have it your way
and I can have it mine.

In your scenario, you need to set key expiration times in *direct-key*
self-signatures, and you want key lifetime to be extensible by
re-signing.

In my scenario, if you want expiration that cannot be undone, you set
a key expiration time in each *certification* self-signature.

All the time, you were talking about key expiration time sub-packets
in direct-key signatures while I was talking about key expiration time
sub-packets in certification signatures.  It's only the latter type of
expiration that should carry over into certifications by others.

Earlier I described my proposal like this:

     When Bob signs a certificate for Alice's key (which presumably he
     does only when Alice has told him that she considers her key
     valid), he looks at all valid self-signatures and finds the one
     for with key expiry is the furthest away.  This determines is the
     maximum validity he should use for his certification (unless
     Alice tells him otherwise).

This procedure should be changed as follows.  To determine the maximum
validity for his certification, Bob takes into account any key
expiration times found in *certification* self-signatures for the
respective user ID; not the key expiration times found in *direct-key*
self-signatures (these are relevant only for determining if the key is
currently valid).

-- 
Bodo Möller <[email-masked]>
PGP http://www.informatik.tu-darmstadt.de/TI/Mitarbeiter/moeller/0x36d2c658.html
* TU Darmstadt, Theoretische Informatik, Alexanderstr. 10, D-64283 Darmstadt
* Tel. +49-6151-16-6628, Fax +49-6151-16-6036

Subject: Re: draft-ietf-openpgp-rfc2440bis-06.txt
From: Adrian von Bidder <[email-masked]>
To: OpenPGP <[email-masked]>
Date: 25 Sep 2002 11:27:43 +0200
Sender: [email-masked]

--=-DMOpxz2+S0m3DbTh4Afa
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

On Tue, 2002-09-24 at 16:37, Derek Atkins wrote:
> [...]If the
> attacker controls the keyserver and can remove revocations then
> obviously this doesn't work, but I don't think an attacker can control
> that many data points.

Depending on the attack scenario, it might suffice when one person does
not see a revocation certificate during a limited timeframe (while they
send some vital documents encrypted to the compromised key).

This only requires control of the network connection of one machine for
a specific time. Absolutely feasible.

cheers
-- vbi

--=20
secure email with gpg                           http://fortytwo.ch/gpg

NOTICE: subkey signature! request key 92082481 from keyserver.kjsl.com

--=-DMOpxz2+S0m3DbTh4Afa
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

--=-DMOpxz2+S0m3DbTh4Afa--

Content-Class: urn:content-classes:message
Subject: RE: Comments on ECC draft
Date: Wed, 25 Sep 2002 10:19:31 +0200
From: "Dominikus Scherkl" <[email-masked]>
To: "Len Sassaman" <[email-masked]>
Cc: <[email-masked]>
Sender: [email-masked]

> Obviously, people's animosity for Certicom is going to
> get in the way of cleanly standardizing this.

> But, as long as ECC remains undefined in RFC2440bis
> and its successor, I wouldn't consider an implementation
> of ECC in OpenPGP to be violating the standard.

Of course not. That's why we insist for its addition
to the standard.

> If you're planning on putting it in CryptoEx,
> I'll be happy to make sure we interoperate with you.
We won't until it's part of the standard.
We've fully implemented all the mathematics, but integrating
it now will be about the same efford as to change it
after a different protocol is suddenly part of RFC 2440.

> I do agree, though, that your draft should pick a
> curve and stick with it, so that all the OpenPGP-ECC
> implementations are interoperable.

I don't think a single curve would be enough, because
it may have undiscovered weaknesses - and the curves
mentioned in my draft are already in use with other
standards, so I think it's a minimum requirement for
an implementation to support these.

But I agree that adding more curves should not be allowed
to everyone - new curves should be added to the standard
if they become nessessary (and that will be done VERY seldom).

to the draft:
Should I reduce my comments to domain parameters to
those nessessary to understand the format in which the
required curves are encoded? Or may I omit them at all?

By the way: I'm somewhat concerned about my mail to you
still not appeared on the list (and got no error report).
Is there something I must do before my mails are accepted?!?

-- 
Dominikus Scherkl
[email-masked]

From: Hironobu SUZUKI <[email-masked]>
To: Rodney Thayer <[email-masked]>
cc: [email-masked]
Subject: Re: Why ECC? 
Date: Wed, 25 Sep 2002 10:57:54 +0900
Sender: [email-masked]

> Why do we want ECC in OpenPGP?
> 

I'm not againts ECC in OpenPGP in the future.

If someone want to use strong public key cryptography protection as
well as RSA-2048, ECC-193 is good choice.  But I don't need it today.

I think if RSA-1024 is broken easily, a quantum computer must be. In
future, developed quantum computation technique will also break ECC
because problems are in almost same domain of number theorem.

Anyway, I'd like think about it tomorrow, not today.

Regards,

-- 
Hironobu SUZUKI
E-Mail: [email-masked]
URL: http://h2np.net

From: "Michael Young" <[email-masked]>
To: "OpenPGP" <[email-masked]>
Subject: Re: draft-ietf-openpgp-rfc2440bis-06.txt
Date: Tue, 24 Sep 2002 16:34:40 -0400
Sender: [email-masked]

From: "David Shaw" <[email-masked]>
> Whoah - I am not proposing that.  My comments were in the context of
> how a potential v5 key format could work (and as a side note on how
> GnuPG handles a v3 key with a v4 selfsig).  That's all.  As I see it,
> without an expiration date *in the key packet*, there is no true
> "hard" expiration date.  I agree with Jon's analysis.

OK... sorry about that.  I agree that a new key format could address this
if anyone cared enough.  (I don't.  Revocation is good enough... which
leads me to wonder how PGP/GnuPG would treat a post-dated revocation,
but that's another unnecessary digression. :-)

> GnuPG 1.0.6 is fairly old now.

It may be old in a CVS sense.  There's a lot of it out there, though...
it's in the RedHat 7.2AS and 7.3 releases, for example.  It was the
only official Windows build for a *long* time.

My point was not that GnuPG was wrong in any way, simply that some
widely installed versions wouldn't support the hard/soft distinction,
should we choose to make one now.

Date: Tue, 24 Sep 2002 15:38:44 -0400
From: David Shaw <[email-masked]>
To: OpenPGP <[email-masked]>
Subject: Re: draft-ietf-openpgp-rfc2440bis-06.txt
Mail-Followup-To: OpenPGP <[email-masked]>
Sender: [email-masked]

On Tue, Sep 24, 2002 at 02:53:23PM -0400, Michael Young wrote:

> A moment ago, I agreed with Jon's assertion that:
> > >Key expirations are not "my" system. They're the way the OpenPGP works. If
> > I agree with Jon's analysis.  Certainly, key expirations as they
> > are defined now are rewriteable.  His example (periodically
> 
> Sigh.  Perhaps I shouldn't have been quite so quick to agree.
> The last few drafts have included language on rewriting self-signatures,
> but I can't find any in the "original" (http://www.ietf.org/rfc/rfc2440.txt).
> This makes it a little hard to assert that this is just "how OpenPGP works".
> 
> BUT... this is "how GnuPG works" with respect to the act of
> rewriting, and it may just be "how PGP and GnuPG work" with
> respect to interpreting multiple expiration times.
> 
> Bodo an David have proposed using the key-expiration[9] and
> (self-)signature-expiration[3] subpackets as "hard" and "soft"
> flavors.  One could implement Jon's "rolling expiration"
> scenarios with the self-signatures.

Whoah - I am not proposing that.  My comments were in the context of
how a potential v5 key format could work (and as a side note on how
GnuPG handles a v3 key with a v4 selfsig).  That's all.  As I see it,
without an expiration date *in the key packet*, there is no true
"hard" expiration date.  I agree with Jon's analysis.

> Alas, neither PGP(6.5) nor GnuPG(1.0.6) generates a signature-
> expiration[3] subpacket.  GnuPG's expiration-changing function
> operates on the key-expiration[9] subpacket.

GnuPG 1.0.6 is fairly old now.  More recent versions allow the
(determined) user to generate themselves an expiring self-signature
(via subpacket 3).  When that self-signature expires, the user ID it
binds (not the key) becomes invalid.  Of course, you then end up with
a key with no valid user IDs.  This is as per 5.2.3.3. "Notes on
Self-Signatures" in bis-06.

David

From: "Michael Young" <[email-masked]>
To: "OpenPGP" <[email-masked]>
Subject: Re: draft-ietf-openpgp-rfc2440bis-06.txt
Date: Tue, 24 Sep 2002 14:53:23 -0400
Sender: [email-masked]

A moment ago, I agreed with Jon's assertion that:
> >Key expirations are not "my" system. They're the way the OpenPGP works. If
> I agree with Jon's analysis.  Certainly, key expirations as they
> are defined now are rewriteable.  His example (periodically

Sigh.  Perhaps I shouldn't have been quite so quick to agree.
The last few drafts have included language on rewriting self-signatures,
but I can't find any in the "original" (http://www.ietf.org/rfc/rfc2440.txt).
This makes it a little hard to assert that this is just "how OpenPGP works".

BUT... this is "how GnuPG works" with respect to the act of
rewriting, and it may just be "how PGP and GnuPG work" with
respect to interpreting multiple expiration times.

Bodo an David have proposed using the key-expiration[9] and
(self-)signature-expiration[3] subpackets as "hard" and "soft"
flavors.  One could implement Jon's "rolling expiration"
scenarios with the self-signatures.

Alas, neither PGP(6.5) nor GnuPG(1.0.6) generates a signature-
expiration[3] subpacket.  GnuPG's expiration-changing function
operates on the key-expiration[9] subpacket.

When presented with two key-expiration versions, GnuPG appears to
accept the update (and throws away the old signature?).  PGP accepts
the update, and reports the new expiration time, but shows both
signatures.  Both PGP and GnuPG accept the new expiration time
for the purposes of encrypting; GnuPG ignores the expiration on
the main key, and accepts the one on the subkey.

I know that the specification need not be bound by quirks in
implementations, but as a practical matter, it doesn't feel
right to buck them here.  So, I come back to agreeing with Jon,
not just because the spec says so lately, but because the
implementations do, too.

Date: Tue, 24 Sep 2002 11:40:53 -0700 (PDT)
From: Len Sassaman <[email-masked]>
To: Michael Young <[email-masked]>
Cc: OpenPGP <[email-masked]>
Subject: Re: draft-ietf-openpgp-rfc2440bis-06.txt
Sender: [email-masked]

On Tue, 24 Sep 2002, Michael Young wrote:

> Given that this is how they work, I'd really like to see language
> in the expiration time section noting that they may be rewritten,
> and that as such, they do not have any revocation-like effects.
> Yes, this appears elsewhere, but someone reading the spec may
> not put the pieces together, and make assumptions on how
> expirations work (based on other systems or their intuition).
> I can draft something if you'd like.

This is what I was asking for in my previous message. In the case that
expired keys can be brought back from the dead, (which is the current
behavior), we need to make it clear that expirations are merely an
indication that the key may no longer be in use, and have no security
properties.

From: "Michael Young" <[email-masked]>
To: "OpenPGP" <[email-masked]>
Subject: Re: draft-ietf-openpgp-rfc2440bis-06.txt
Date: Tue, 24 Sep 2002 13:44:02 -0400
Sender: [email-masked]

>Key expirations are not "my" system. They're the way the OpenPGP works. If
> 
I agree with Jon's analysis.  Certainly, key expirations as they
are defined now are rewriteable.  His example (periodically
pushing the expiration out to account for possible LOSS) is
quite reasonable.  It MIGHT HAVE been reasonable to include
a form of irrevocable expiration that acts as an automatic
revocation (possibly in addition to the revocable, advisory
kind), but that's just not the way it works now.

Given that this is how they work, I'd really like to see language
in the expiration time section noting that they may be rewritten,
and that as such, they do not have any revocation-like effects.
Yes, this appears elsewhere, but someone reading the spec may
not put the pieces together, and make assumptions on how
expirations work (based on other systems or their intuition).
I can draft something if you'd like.

> We've even had discussions here for years about re-writing
> self-sigs and what you should do, and how you should interpret them, and
> what happens when you have things like a designated revoker.

This is another digression, but...

While I strongly believe in the ability to rewrite self-signatures, I
wouldn't go as far as to require that *all* subpackets be treated the
same in this regard.  For some, it might make sense for new values to
replace the old (preferences); here, I have argued that the old
self-signature should be revoked, but that didn't seem to catch on.
For some, new values may be additive; revocation keys have this
flavor -- they make no sense if they can be removed.
My point is simply that we shouldn't take the rewriting behavior
for key expiration as a general principle, or vice versa.

Date: Tue, 24 Sep 2002 13:05:32 -0400
From: David Shaw <[email-masked]>
To: [email-masked]
Subject: Re: draft-ietf-openpgp-rfc2440bis-06.txt
Mail-Followup-To: [email-masked]
Sender: [email-masked]

On Tue, Sep 24, 2002 at 06:08:17PM +0200, [email-masked] wrote:
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: RIPEMD160
> 
> Bodo Moeller wrote:
> > Of course the one problem we cannot avoid is that the legitimate owner
> > of the key cannot keep the key alive indefinitely.  This is because
> > this "problem" is exactly the security feature that me and Florian
> > Weimer and Derek Atkins want to have: we don't want the bad guy to be
> > able to unexpire the key if he gets hold of the secret key.
> 
> so set key expiration in direct key signature. there can be only
> one direct key signature. direct key signature is self signature (5.2.3.3)
> so key expiration can be set in it. (though most PGP implementations may
> not recognize key expiration in direct key signature....)

It is not true that there can be only one direct key signature.  In
fact, in certain cases you pretty much must have more than one.  For
example, if you have multiple designated revokers which are all
sensitive.

David

Date: Wed, 25 Sep 2002 04:48:13 +1200 (NZST)
From: [email-masked] (Peter Gutmann)
To: [email-masked], [email-masked]
Subject: Re: Why ECC?
Sender: [email-masked]

"Michael Young" <[email-masked]> writes:
>At 03:18 AM 9/25/2002 +1200, Peter Gutmann wrote:
>>Because it already contains every algorithm anyone could think of anyway, 
>>and a few more for implementors to ignore wouldn't matter?
>
>I took Peter's comment as a joke, a jab at the load of things already there.

It was intended as a joke, although you have to be quite careful here because
these things tend to come true - PKIX is currently busy standardising something
which started as a joke by Bob Jueneman some years ago and which I suggested as
an April 1 RFC more recently.  Hmm, there's a thought:

<loudly>
Next thing you know I'll walk out the door and trip over the brand-new Sun 
15K which someone left there for me.
</loudly>

Peter (ever hopeful).

Date: Tue, 24 Sep 2002 18:08:17 +0200
From: [email-masked]
To: [email-masked]
Subject: Re: draft-ietf-openpgp-rfc2440bis-06.txt
Sender: [email-masked]

Bodo Moeller wrote:
> Of course the one problem we cannot avoid is that the legitimate owner
> of the key cannot keep the key alive indefinitely.  This is because
> this "problem" is exactly the security feature that me and Florian
> Weimer and Derek Atkins want to have: we don't want the bad guy to be
> able to unexpire the key if he gets hold of the secret key.

so set key expiration in direct key signature. there can be only
one direct key signature. direct key signature is self signature (5.2.3.3)
so key expiration can be set in it. (though most PGP implementations may
not recognize key expiration in direct key signature....)

5.2.3.6. Key expiration time
   (4 octet time field)
   The validity period of the key.  This is the number of seconds after
   the key creation time that the key expires.  If this is not present
   or has a value of zero, the key never expires. This is found only on
                                                          ^^^^^^^^^^^^^
   a self-signature.
   ^^^^^^^^^^^^^^^^   

5.2.3.3. Notes on Self-Signatures
   A self-signature is a binding signature made by the key the
   signature refers to. There are three types of self-signatures, the
   certification signatures (types 0x10-0x13), the direct-key signature
                                               ^^^^^^^^^^^^^^^^^^^^^^^^
   (type 0x1f), and the subkey binding signature (type 0x18).

__
Disastry  http://disastry.dhs.org/
http://disastry.dhs.org/pgp
 ^----PGP 2.6.3ia-multi06 (supports IDEA, CAST5, BLOWFISH, TWOFISH,
      AES, 3DES ciphers and MD5, SHA1, RIPEMD160, SHA2 hashes)

From: "Michael Young" <[email-masked]>
To: <[email-masked]>
Subject: Re: Why ECC?
Date: Tue, 24 Sep 2002 12:09:20 -0400
Sender: [email-masked]

> At 03:18 AM 9/25/2002 +1200, Peter Gutmann wrote:
> >Because it already contains every algorithm anyone could think of anyway, 
> >and a
> >few more for implementors to ignore wouldn't matter?

I took Peter's comment as a joke, a jab at the load of things already there.

From: "Rodney Thayer" <[email-masked]>
> -- we alread have DSA for that.  (Well if we want to claim RSA and DSA are
> structurally related we don't but that's not the question at hand)

If we're going to fantasize about future breakthroughs, we could also
speculate that ECC and the integer DLP problems will be structurally related.

> The second thing we're doing is violating the "it should be implementable"
> principle.  These RFC's are supposed to be buildable by normal mortals.

I agree with this sentiment.  Interoperability for the masses is
important.  It's also fine to have a place for experimenters to
play, but there shouldn't be much pressure to get such things into
the specification.

> So, I come back to my question -- why do we want ECC?  If there isn't
> a requirement it fulfills it shouldn't be in the standard -- it just
> takes up space and causes problems.

At least in the last proposal I read, it takes up a LOT of space.
There were a dozen representation options.  It seemed quite unlikely
that anyone would implement more than a small subset.  Good luck
finding other interoperable implementations.

I'd be very happy for this to remain a separate document.

Date: Tue, 24 Sep 2002 08:30:28 -0700
To: [email-masked]
From: Rodney Thayer <[email-masked]>
Subject: Re:  Why ECC?
Sender: [email-masked]

At 03:18 AM 9/25/2002 +1200, Peter Gutmann wrote:
>Rodney Thayer <[email-masked]> writes:
>
> >Why do we want ECC in OpenPGP?
>
>Because it already contains every algorithm anyone could think of anyway, 
>and a
>few more for implementors to ignore wouldn't matter?

Well as I see it there's the "lifeboat" principle.  If someone, somewhere,
publishes a 3-line perl script that breaks 2048 bit RSA, we'd like to have
a second public key algorithm in the protocol spec so we could switch over.

This has two problems:

-- the powers that be in the IETF tend to spit in your eye when you propose
this class of logic.  Been there, tried that.  They assume RSA is immortal.

-- we alread have DSA for that.  (Well if we want to claim RSA and DSA are
structurally related we don't but that's not the question at hand)

The second thing we're doing is violating the "it should be implementable"
principle.  These RFC's are supposed to be buildable by normal mortals.
Adding 80,000 bells and whistles is stupid -- we get specs that are
hard to implement, hard to interoperate, and hard to read (for things
like security flaws).

So, I come back to my question -- why do we want ECC?  If there isn't
a requirement it fulfills it shouldn't be in the standard -- it just
takes up space and causes problems.

Date: Wed, 25 Sep 2002 03:18:31 +1200 (NZST)
From: [email-masked] (Peter Gutmann)
To: [email-masked], [email-masked]
Subject: Re:  Why ECC?
Sender: [email-masked]

Rodney Thayer <[email-masked]> writes:

>Why do we want ECC in OpenPGP?

Because it already contains every algorithm anyone could think of anyway, and a
few more for implementors to ignore wouldn't matter?

Peter.

Date: Tue, 24 Sep 2002 17:08:20 +0200
From: Bodo Moeller <[email-masked]>
To: Derek Atkins <[email-masked]>
Cc: Jon Callas <[email-masked]>, OpenPGP <[email-masked]>
Subject: Re: draft-ietf-openpgp-rfc2440bis-06.txt
Sender: [email-masked]

On Tue, Sep 24, 2002 at 10:37:06AM -0400, Derek Atkins wrote:

> Before you go putting words in my mouth...

I didn't.  You wrote:

From: Derek Atkins <[email-masked]>
Subject: Re: draft-ietf-openpgp-rfc2440bis-06.txt

> Please point out an advantage of *key* expiration over
> *self-signature* expiration in that scenario.

A bad guy gets a copy of my private key..  If there is a key
expiration then they cannot keep it alive indefinitely.  Or is key
compromise not an attack you care about? ;)
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

So apparently you think that key expiration should be final while
self-signature expiration is not.  If you have a different
interpretation of what you wrote, I'd like to hear it.

> [...]                            I agree with Jon that you need to
> separate out the "this key is alive" from "this key is dead".  The
> "Keepalives" are self-signatures with limited lifetimes.

This is exactly what I am saying: use self-signatures with limited
lifetime (subpacket type 3) if you want to be able to keep the key
alive by re-signing later.  And use self-signatures with a key
expiration time (subpacket type 9) only if you want the key to finally
expire by then.

We have these two different subpacket types, so why not use them?!

-- 
Bodo Möller <[email-masked]>
PGP http://www.informatik.tu-darmstadt.de/TI/Mitarbeiter/moeller/0x36d2c658.html
* TU Darmstadt, Theoretische Informatik, Alexanderstr. 10, D-64283 Darmstadt
* Tel. +49-6151-16-6628, Fax +49-6151-16-6036

Date: Tue, 24 Sep 2002 07:58:55 -0700
To: [email-masked]
From: Rodney Thayer <[email-masked]>
Subject: Why ECC?
Sender: [email-masked]

At 07:02 PM 9/24/2002 +1200, Peter Gutmann wrote:

>Len Sassaman <[email-masked]> writes:
>
> >OpenSSL now has ECC in it
>
>That's not certain yet, the licensing terms are such that it can't be used
>under the OpenSSL license unless Sun re-release it unencumbered.
>
> >and there is an ECC in TLS draft being proposed
>
>... by the same group who did the OpenSSL implementation.  Hardly an
>overwhelming argument.

Why do we want ECC in OpenPGP?

Why do we want to start using a class of algorithm that is patent encumbered?

Having corporations show up at working group meetings and threaten implementors
with patent infringement is a pain.

I don't see a requirement to add this.

A separate document describing it would of course be perfectly reasonable.

To: Bodo Moeller <[email-masked]>
Cc: Jon Callas <[email-masked]>, OpenPGP <[email-masked]>
From: Derek Atkins <[email-masked]>
Subject: Re: draft-ietf-openpgp-rfc2440bis-06.txt
Date: 24 Sep 2002 10:37:06 -0400
Lines: 99
Sender: [email-masked]

Before you go putting words in my mouth...

There are two opposing forces here. On the one had I want to be able
to continue using my key indefinitely (re-keying is a PitA).  On the
other hand, if it gets compromised I want to kill it (and make sure
the attacker cannot un-kill it).  The third case is where the user
loses their private key.

To make all three of these work, I agree with Jon that you need to
separate out the "this key is alive" from "this key is dead".  The
"Keepalives" are self-signatures with limited lifetimes.  I don't mind
re-signing my own key every year (or whatever period I want to
re-assert myself).  Note that this time period should not affect the
time period with which Alice asserts my key -- Alice should decide how
often they want to re-verify my key, I shouldn't dictate that to
Alice.

The "this key is dead" is necessarily a revocation.  If you go under
the assumption that data can only be added to a key and never removed,
then once you see a revocation anything else doesn't matter.  If the
attacker controls the keyserver and can remove revocations then
obviously this doesn't work, but I don't think an attacker can control
that many data points.

All I except from the system is that an attacker who gains access to
your private key cannot make it live longer than YOU want it to.

-derek

Bodo Moeller <[email-masked]> writes:

> As I pointed out, you can use *self-signature* expiration (subpacket
> type 3) for many purposes, and use *key* expiration (subpacket type 9)
> for cases where you really want the key to expire in the sense that
> Derek and others expect key expiration to work (namely such that the
> bad guy cannot unexpire the key).  What speaks against this?
> 
> For version 3 keys, key expiration carries over into certifications,
> and many users expect similar security properties for version 4 keys.
> 
> Notably, even Derek expected this, and still you refuse to even
> mention this bug/feature/misunderstanding in the Security
> Considerations of the specification.
> 
> 
> 
> >                             Lastly, I claim that if you want to kill a key,
> > there is a mechanism for that -- revocation. [...]
> > Expiration is not revocation. Do not expect it to solve the problem of
> > revocation. Likewise, revocation is not expiration. Revocation is
> > irrevocable. Expiration can be undone. This is the design of the language of
> > the system. The present behavior is in my opinion the correct and desirable
> > one.
> 
> I already commented on this:
> 
> < Compared with key expiry (and I mean final expiry that cannot simply
> < be undone by anyone who has gotten hold of the secret key), revocation
> < is somewhat of a kludge.  In some situations it is the best you can
> < do, but the problem is that the semantics is not monotonous.  This may
> < be fun for AI people, but security folks should be worried about the
> < ramifications of denial of service attacks (nothing guarantees that
> < the revocation reaches everyone who should know about it).
> 
> If it's not clear what I mean with this I should probably formalize
> the concepts and write a paper about the issue unless someone has
> already done something like that.  Some keywords: formal proof
> systems, default logic.
> 
> You say "revocation is irrevocable".  This is true in a sense, but
> revocation is not as reliable as expiration that cannot be undone.
> 
> You say "expiration can be undone", but we also need some kind of
> expiration that cannot be undone.  OpenPGP distinguishes between key
> expiration and signature expiration, so we can use key expiration if
> we want expiration that cannot be undone, and self-signature
> expiration if we want expiration that can be undone.
> 
> 
> 
> A signing key has become invalid in the fullest sense only if you can
> publish the corresponding secret key without causing any problems.
> PKIs should offer entities a way to state that their keys are to be
> considered invalid after some specific point of time.  Revocation does
> not do this job very well because revocation packets may be
> suppressed, so the invalidity date must be covered by the
> certifications instead.
> 
> 
> -- 
> Bodo Möller <[email-masked]>
> PGP http://www.informatik.tu-darmstadt.de/TI/Mitarbeiter/moeller/0x36d2c658.html
> * TU Darmstadt, Theoretische Informatik, Alexanderstr. 10, D-64283 Darmstadt
> * Tel. +49-6151-16-6628, Fax +49-6151-16-6036

Date: Tue, 24 Sep 2002 09:02:36 -0400
From: David Shaw <[email-masked]>
To: OpenPGP <[email-masked]>
Subject: Re: More on key expiration policy (Re: draft-ietf-openpgp-rfc2440bis-06.txt)
Mail-Followup-To: OpenPGP <[email-masked]>
Sender: [email-masked]

On Tue, Sep 24, 2002 at 10:58:38AM +0200, Bodo Moeller wrote:

> < By default GnuPG uses the expiration date of the self-signature as the
> < one for a key signature.  This is on Florian Weimer's request and afaik
> < is sufficient for him and his use of the PGP PKI.
> 
> I hope Werner meant the *key* expiration date from the self-signature,
> not the *signature* expiration date from the self-signature.  These
> are different packet types.  Key expiration dates may be present only
> in self-signatures according to the OpenPGP specification, so they
> should be translated into signature expiration dates when certifying
> keys; see Florians request at
> <URL:http://lists.gnupg.org/pipermail/gnupg-devel/2001-July/006196.html>:

It is the key expiration date (i.e. subpacket 9, not subpacket 3).  I
want to point out that this is not something that GnuPG forces on the
user.  If a key has an expiration date, GnuPG prompts the user "This
key is due to expire on x/x/x.  Do you want your signature do expire
at the same time? (Y/n)".  If the signing user says "yes" (the
default), then that happens.  If the signing user says no, then they
are free to pick any expiration time, or none at all.  I think that is
the most appropriate solution here as the signer is still free to do
whatever they like.

In an ideal world (which we are not in), I think that a solution that
would solve all the concerns here is to define a v5 key format.  It
could contain an expiration date as part of the key, just like in v3
keys.  The expiration date in the key is the "hard" expiration.  The
user can shorten, but not extend, this via the "soft" expiration date
given in the self-signature.  (Incidentally, this is what GnuPG does
when it encounters v3 keys with v4 self-signatures.)  Of course, a new
key format would be brutal for interoperability, so is not a good
solution.

David

Date: Tue, 24 Sep 2002 13:18:57 +0200
From: Bodo Moeller <[email-masked]>
To: Michael Young <[email-masked]>
Cc: OpenPGP <[email-masked]>
Subject: Re: Expiration semantics (Re: draft-ietf-openpgp-rfc2440bis-06.txt)
Sender: [email-masked]

On Mon, Sep 23, 2002 at 03:50:06PM -0400, Michael Young wrote:

> Certifications are statements about the ownership of a key, not its
> lifetime; it should be legal to make a certification that will outlast
> the key's (CURRENT) expiration time.

Legal?  Of course; the signer may have out-of-band information that a
long certification validity period is OK.  But by default, the current
key expiration time should not be exceeded.

-- 
Bodo Möller <[email-masked]>
PGP http://www.informatik.tu-darmstadt.de/TI/Mitarbeiter/moeller/0x36d2c658.html
* TU Darmstadt, Theoretische Informatik, Alexanderstr. 10, D-64283 Darmstadt
* Tel. +49-6151-16-6628, Fax +49-6151-16-6036

Content-Class: urn:content-classes:message
Subject: Re: Comments on ECC draft
Date: Tue, 24 Sep 2002 12:35:05 +0200
From: "Dominikus Scherkl" <[email-masked]>
To: <[email-masked]>
Sender: [email-masked]

Hello.

> I'd like to bring this up again before the next revision of 
> the draft. How close are we to consensus on the ECC semantics?

Really?
Indeed I thought there isn't anybody interessted in this...
what a very positive surprise.

> On Wed, 5 Sep 2001 [email-masked] wrote:
> 
> > We have been looking at the ECC issue and have a few 
> > comments on the proposed draft by Dominikus Scherkl and
> > Christoph Fausak.
> >
> > Broadly speaking it looks very good.

As the IEEE has changed it's proposed standard P1363 to allow
for an additionaly point-compression method with no patents
on it (I worked hardly on this), we should have no problem
with this topic.
But I don't know about the current status of other pending
patents. (Looking at Annex G of IEEE P1363a/D10.8 may be a good
idea, but most of the patents mentioned there cover other parts
of that proposed standard).

I will soon submit an updated version of my (long ago expired)
draft soon...

> I'm not against ECC in OpenPGP, but given how close 2440bis 
> is to last call, perhaps the ECC specification could go in a
> companion RFC?
This way is what I intended with my draft.
And I think there's no need to hurry, too, but

> > OpenSSL now has ECC in it, and there is an ECC in TLS draft 
> > being proposed
> That's not certain yet, [and the TLS draft is]
> ... by the same group who did the OpenSSL implementation.

do we realy need to be the last to add ECC to our standard ?

Best regards,
-- 
Dominikus Scherkl
[email-masked]

Date: Tue, 24 Sep 2002 11:21:28 +0200
From: Bodo Moeller <[email-masked]>
To: Len Sassaman <[email-masked]>
Cc: Michael Young <[email-masked]>, OpenPGP <[email-masked]>
Subject: Re: More on key expiration policy (Re: draft-ietf-openpgp-rfc2440bis-06.txt)
Sender: [email-masked]

On Mon, Sep 23, 2002 at 04:44:23PM -0700, Len Sassaman wrote:

> Wasn't the original suggestion that keys expire at the earliest expiration
> time, and later expiration dates be ignored?

No, that was not my proposal.  This was a suggestion by Richie Laager,
but actually it's incompatible with some details of my proposal:
it's okay for me to let key lifetime be extensible, it's just that
certifications should be valid only for the currently defined lifetime
of the key (during certification) so that all certifications become
worthless if the user lets the key expire.

It would be safer to have a fixed key expiry date as in version 3 keys
(but to have it covered by the fingerprint, unlike version 3).
However, I want compatibility with the version 4 format, and this
makes extensible key lifetime acceptable within my proposal.

>                                              That would address the
> problem.

But not actually solve it: in general you cannot rely on seeing all
packets that are available on some keyserver, or that someone tries to
send to some keyserver (cf. my remarks on non-monotonous proof systems
elsewhere in this thread; this is essentially the same problem as with
revocation).  The "earliest expiration time" according to your keyring
may not be the actual earliest expiration time.

-- 
Bodo Möller <[email-masked]>
PGP http://www.informatik.tu-darmstadt.de/TI/Mitarbeiter/moeller/0x36d2c658.html
* TU Darmstadt, Theoretische Informatik, Alexanderstr. 10, D-64283 Darmstadt
* Tel. +49-6151-16-6628, Fax +49-6151-16-6036

Date: Tue, 24 Sep 2002 10:58:38 +0200
From: Bodo Moeller <[email-masked]>
To: Michael Young <[email-masked]>
Cc: OpenPGP <[email-masked]>, Werner Koch <[email-masked]>
Subject: Re: More on key expiration policy (Re: draft-ietf-openpgp-rfc2440bis-06.txt)
Sender: [email-masked]

On Mon, Sep 23, 2002 at 05:49:34PM -0400, Michael Young wrote:
> "Len Sassaman" <[email-masked]>:

>> The question I see is this: are key expiration dates a "mandate" or a
>> "suggestion" to third parties by the key owner?

> More precisely, are expiration times rewriteable?
> 
> I'm afraid that the answer has to be YES.  The specification has
> clearly said so for a while now, and at least one implementation
> (GnuPG) offers this capability.  If we change the rules now,
> anyone who has taken advantage of it (or set a short expiration
> time with the expectation that they can change it) will be
> seriously disappointed.

Actually, they won't!

My proposal was: When Bob signs a certificate for Alice's key (which
presumably he does only when Alice has told him that she considers her
key valid), he looks at all valid self-signatures and finds the one
for with key expiry is the furthest away.  This determines is the
maximum validity he should use for his certification (unless Alice
tells him otherwise).

So if your key has a short expiration time, you can extend it, and new
certifications will use the new expiration time.

You mentioned GnuPG.  Note that GnuPG apparently already handles key
expiration in a safe way during certification:

< From: Werner Koch <[email-masked]>
< To: Jon Callas <[email-masked]>
< Cc: Bodo Moeller <[email-masked]>,
< 	OpenPGP <[email-masked]>
< Subject: Re: draft-ietf-openpgp-rfc2440bis-06.txt
< Date: Sat, 21 Sep 2002 11:59:22 +0200

< By default GnuPG uses the expiration date of the self-signature as the
< one for a key signature.  This is on Florian Weimer's request and afaik
< is sufficient for him and his use of the PGP PKI.

I hope Werner meant the *key* expiration date from the self-signature,
not the *signature* expiration date from the self-signature.  These
are different packet types.  Key expiration dates may be present only
in self-signatures according to the OpenPGP specification, so they
should be translated into signature expiration dates when certifying
keys; see Florians request at
<URL:http://lists.gnupg.org/pipermail/gnupg-devel/2001-July/006196.html>:

< [My patch] is a bit more complicated because it also works around the
< protocol error in RFC 2440 related to V4 key expiration (V4 key
< expiration time is not covered by certificates because it is only
< contained in the self signature, not in the key material, in contrast
< to V3 keys): If the key to be signed is a V4 key with an expiration
< time set, a V4 signature is made which expires at that time, too (or
< even earlier).

-- 
Bodo Möller <[email-masked]>
PGP http://www.informatik.tu-darmstadt.de/TI/Mitarbeiter/moeller/0x36d2c658.html
* TU Darmstadt, Theoretische Informatik, Alexanderstr. 10, D-64283 Darmstadt
* Tel. +49-6151-16-6628, Fax +49-6151-16-6036

Date: Tue, 24 Sep 2002 10:38:26 +0200
From: Bodo Moeller <[email-masked]>
To: Jon Callas <[email-masked]>
Cc: OpenPGP <[email-masked]>
Subject: Re: draft-ietf-openpgp-rfc2440bis-06.txt
Sender: [email-masked]

On Mon, Sep 23, 2002 at 10:29:07PM -0700, Jon Callas wrote:

> Now, as Bodo has suggested, there's a potential ambiguity here. In short,
> what does it mean if Alice signs your key with no expiration (or one that is
> after Ta)? Bodo suggests that this is a flaw. I claim it is not. If Alice
> had wished to time-limit her certification, she should have, and it's not
> for us to tell her how to do it.
>
> I further claim that while this may be somewhat counterintuitive, it is a
> useful and desirable feature, for someone to have different expirations on a
> key depending on situation.

As I pointed out, you can use *self-signature* expiration (subpacket
type 3) for many purposes, and use *key* expiration (subpacket type 9)
for cases where you really want the key to expire in the sense that
Derek and others expect key expiration to work (namely such that the
bad guy cannot unexpire the key).  What speaks against this?

For version 3 keys, key expiration carries over into certifications,
and many users expect similar security properties for version 4 keys.

Notably, even Derek expected this, and still you refuse to even
mention this bug/feature/misunderstanding in the Security
Considerations of the specification.

>                             Lastly, I claim that if you want to kill a key,
> there is a mechanism for that -- revocation. [...]
> Expiration is not revocation. Do not expect it to solve the problem of
> revocation. Likewise, revocation is not expiration. Revocation is
> irrevocable. Expiration can be undone. This is the design of the language of
> the system. The present behavior is in my opinion the correct and desirable
> one.

I already commented on this:

< Compared with key expiry (and I mean final expiry that cannot simply
< be undone by anyone who has gotten hold of the secret key), revocation
< is somewhat of a kludge.  In some situations it is the best you can
< do, but the problem is that the semantics is not monotonous.  This may
< be fun for AI people, but security folks should be worried about the
< ramifications of denial of service attacks (nothing guarantees that
< the revocation reaches everyone who should know about it).

If it's not clear what I mean with this I should probably formalize
the concepts and write a paper about the issue unless someone has
already done something like that.  Some keywords: formal proof
systems, default logic.

You say "revocation is irrevocable".  This is true in a sense, but
revocation is not as reliable as expiration that cannot be undone.

You say "expiration can be undone", but we also need some kind of
expiration that cannot be undone.  OpenPGP distinguishes between key
expiration and signature expiration, so we can use key expiration if
we want expiration that cannot be undone, and self-signature
expiration if we want expiration that can be undone.

A signing key has become invalid in the fullest sense only if you can
publish the corresponding secret key without causing any problems.
PKIs should offer entities a way to state that their keys are to be
considered invalid after some specific point of time.  Revocation does
not do this job very well because revocation packets may be
suppressed, so the invalidity date must be covered by the
certifications instead.

-- 
Bodo Möller <[email-masked]>
PGP http://www.informatik.tu-darmstadt.de/TI/Mitarbeiter/moeller/0x36d2c658.html
* TU Darmstadt, Theoretische Informatik, Alexanderstr. 10, D-64283 Darmstadt
* Tel. +49-6151-16-6628, Fax +49-6151-16-6036

Content-Class: urn:content-classes:message
Subject: RE: Comments on ECC draft
Date: Tue, 24 Sep 2002 09:46:28 +0200
From: "Dominikus Scherkl" <[email-masked]>
To: "Len Sassaman" <[email-masked]>, <[email-masked]>
Sender: [email-masked]

> I'd like to bring this up again before the next revision of 
> the draft. How close are we to consensus on the ECC semantics?

Really?
Indeed I thought there isn't anybody interessted in this...
what a very positive surprise.

> On Wed, 5 Sep 2001 [email-masked] wrote:
> 
> > We have been looking at the ECC issue and have a few comments on the
> > proposed draft by Dominikus Scherkl and Christoph Fausak.
> >
> > Broadly speaking it looks very good.

As the IEEE has changed it's proposed standard P1363 to allow
for an additionaly point-compression method with no patents
on it (I worked hardly on this), we should have no problem
with this topic.
But I don't know about the current status of other pending
patents.

I will soon submit an updated version of my (long ago expired)
draft soon...

> I'm not against ECC in OpenPGP, but given how close 2440bis is to last
> call, perhaps the ECC specification could go in a companion RFC?
This way is what I intended with my draft.
And I think there's no need to hurry, too, but

> > OpenSSL now has ECC in it, and there is an ECC in TLS draft 
> > being proposed
> That's not certain yet, [and the TLS draft is]
> ... by the same group who did the OpenSSL implementation.

do we realy need to be the last to add ECC to our standard ?

-- 
Dominikus Scherkl
[email-masked]

Date: Tue, 24 Sep 2002 09:37:12 +0200
From: Bodo Moeller <[email-masked]>
To: Peter Gutmann <[email-masked]>
Cc: [email-masked], [email-masked], [email-masked], [email-masked]
Subject: Re: Comments on ECC draft
Sender: [email-masked]

On Tue, Sep 24, 2002 at 07:02:44PM +1200, Peter Gutmann wrote:
> Len Sassaman <[email-masked]> writes:

>> OpenSSL now has ECC in it

> That's not certain yet, the licensing terms are such that it can't be used
> under the OpenSSL license unless Sun re-release it unencumbered.

Sun has nothing to do with the OpenSSL ECC implementation for GF(p).
ECC over GF(2^m) is due to Sun and is specifically "licensed pursuant
to the OpenSSL open source license".  There's an additional covenant
regarding patents, but nothing patent-encumbered should be enabled in
the default configuration (if you want GF(2^m) ECC to be faster, you
can set a compiler switch; in this case you have to accept the Sun
covenant).

-- 
Bodo Möller <[email-masked]>
PGP http://www.informatik.tu-darmstadt.de/TI/Mitarbeiter/moeller/0x36d2c658.html
* TU Darmstadt, Theoretische Informatik, Alexanderstr. 10, D-64283 Darmstadt
* Tel. +49-6151-16-6628, Fax +49-6151-16-6036

Date: Tue, 24 Sep 2002 19:02:44 +1200 (NZST)
From: [email-masked] (Peter Gutmann)
To: [email-masked], [email-masked]
Subject: Re: Comments on ECC draft
Cc: [email-masked], [email-masked]
Sender: [email-masked]

Len Sassaman <[email-masked]> writes:

>OpenSSL now has ECC in it

That's not certain yet, the licensing terms are such that it can't be used
under the OpenSSL license unless Sun re-release it unencumbered.

>and there is an ECC in TLS draft being proposed 

... by the same group who did the OpenSSL implementation.  Hardly an
overwhelming argument.

Peter.

Date: Mon, 23 Sep 2002 22:29:07 -0700
Subject: Re: draft-ietf-openpgp-rfc2440bis-06.txt
From: Jon Callas <[email-masked]>
To: OpenPGP <[email-masked]>
Sender: [email-masked]

Actually, this has digressed.

Key expirations are not "my" system. They're the way the OpenPGP works. If
you create a key with an expiration and hand it to Alice, she'll think if
expires at that time. Call it Ta. You can turn right around, and lop off
that user name, re-create the user name and self-sig with another expiration
time on it and hand it to Bob (call that Tb). This works today. It's the way
it works. We've even had discussions here for years about re-writing
self-sigs and what you should do, and how you should interpret them, and
what happens when you have things like a designated revoker.

Now, as Bodo has suggested, there's a potential ambiguity here. In short,
what does it mean if Alice signs your key with no expiration (or one that is
after Ta)? Bodo suggests that this is a flaw. I claim it is not. If Alice
had wished to time-limit her certification, she should have, and it's not
for us to tell her how to do it.

I further claim that while this may be somewhat counterintuitive, it is a
useful and desirable feature, for someone to have different expirations on a
key depending on situation. Lastly, I claim that if you want to kill a key,
there is a mechanism for that -- revocation.

Now it has also been claimed that if someone were to steal your private key,
they could re-write your self-signature, and even un-expire a key. Yeah.
They can do a lot worse, too. In the immortal words words of Julie Brown's
blonde, "So what?"

Discussing what someone can do with a purloined key loses track of the real
issue. When you design a security system, among the things you need to
consider are the security of the system, but also its safety and
reliability.

Security systems and reliability systems are not the same. In fact, they are
frequently at odds with each other. For example, if you build a building,
you might put bars on windows as part of security. But you might also make
it so they can be opened from the inside as a safety and reliability issue
-- as a way of battling fire. Note that improving the safety characteristics
of the building may be orthogonal to its security aspects, or they may be in
direct opposition to it.

Key expirations are a reliability feature. Revocations are a security
feature. If you think a key has been compromised, revoke it! Don't expire
it! We even have a nifty "reason for revocation" feature. Revoking a key
with a reason of key compromise is a drastic and perhaps ironically
irrevocable step. It means that nothing about the key can be relied upon.

However, the reliability aspects of PGP certificates are under-used, and
needed. There is, for example, a whole swarm of keys out there in some
unknown state. Some are in use, some aren't, some are in an unknown state. I
have at least of each, myself.

In the past, various people have discussed handing this issue by explicitly
or implicitly expiring them. Some people have asserted that one should never
create a key that doesn't have a reasonable expiration time on it.

The problem with that idea is many-fold. One is there's no good way to know
what a reasonable time is. One year? Two? More? Less? Worse, if you expire
your key, there's no good way to transfer your old certification information
to the new key. So all that work you went through to get your key signed by
cool people has to be redone.

Long ago, perhaps before we started OpenPGP, I was of the opinion that there
had to be an "I used to be" statement in the language. This is difficult to
do correctly. I never came up with a decent design for it. Part of what shut
me up on it was the realization that with V4 keys putting expiration into a
self-sig and not the key packet, you can use something I call "rolling
validity" where you keep extending the expiration of your key until you
decide not to, or revoke it. This solves all sorts of reliability issues in
OpenPGP. Yes, it does nothing for security. It's not supposed to, it's a
reliability feature, not a security one. It *does* however solve the problem
of someone creating a key, putting it on a public keyserver, and then losing
the password a day later.

It helps me manage which keys are active, by making it so that if I put too
short an expiry on my key, I don't lose that nifty Phil Zimmermann sig on
it. Laugh if you want, but it is that very issue (perhaps not with PRZ
himself, but the broader issue) that keeps people from putting time limits
on their keys. If you guess wrong, you hurt yourself.

Expiration is not revocation. Do not expect it to solve the problem of
revocation. Likewise, revocation is not expiration. Revocation is
irrevocable. Expiration can be undone. This is the design of the language of
the system. The present behavior is in my opinion the correct and desirable
one.

    Jon

Date: Mon, 23 Sep 2002 16:44:23 -0700 (PDT)
From: Len Sassaman <[email-masked]>
To: Michael Young <[email-masked]>
Cc: OpenPGP <[email-masked]>
Subject: Re: More on key expiration policy (Re: draft-ietf-openpgp-rfc2440bis-06.txt)
Sender: [email-masked]

On Mon, 23 Sep 2002, Michael Young wrote:

> Bodo originally suggested that clients abide by expiration times when
> creating new certifications.  That alone may not prevent a compromised
> key from being misused.  Yes, it would work for certifications prior
> to the compromise, and for new ones where the signer gets the key
> *directly* from the owner, but that still doesn't cover all cases.

Wasn't the original suggestion that keys expire at the earliest expiration
time, and later expiration dates be ignored? That would address the
problem.

Jon's request is also solved, too, by using signature expirations as long
as keys without self-signatures are treated as invalid keys.

> The problem is that fingerprints don't include the expiration time.

I agree this is a problem.

> This may be another fair argument for allowing rewriting.  If you
> really wanted irrevocable expiration times, you'd want to hash them
> into the fingerprint material, but it's way too late for that.

I think there are several things that are put into self-sig rather than
the key that shouldn't be. I also think that having the "signing only" and
"encrypt only" flags in the self sig, and not in the key, is also a
mistake. (I feel guilty about this, since I think I was the one who
suggested PGP 7 do things as the spec recommends. I now think that's
broken.) :(

Attributes of the key that intended to be permanent really should be so.

> > The question I see is this: are key expiration dates a "mandate" or a
> > "suggestion" to third parties by the key owner?
>
> More precisely, are expiration times rewriteable?
>
> I'm afraid that the answer has to be YES.  The specification has
> clearly said so for a while now, and at least one implementation
> (GnuPG) offers this capability.  If we change the rules now,
> anyone who has taken advantage of it (or set a short expiration
> time with the expectation that they can change it) will be
> seriously disappointed.

In that case, expiration dates don't seem to mean what everyone thinks
they mean.

Date: Mon, 23 Sep 2002 18:57:18 -0400
From: David Shaw <[email-masked]>
To: [email-masked]
Subject: Re: Comments on ECC draft
Mail-Followup-To: [email-masked]
Sender: [email-masked]

On Mon, Sep 23, 2002 at 03:01:12PM -0700, Len Sassaman wrote:
> 
> I'd like to bring this up again before the next revision of the draft. How
> close are we to consensus on the ECC semantics?
> 
> OpenSSL now has ECC in it, and there is an ECC in TLS draft being proposed
> in the IETF. It is worth nailing this down, I think.

I'm not against ECC in OpenPGP, but given how close 2440bis is to last
call, perhaps the ECC specification could go in a companion RFC?

David

Date: Mon, 23 Sep 2002 15:01:12 -0700 (PDT)
From: Len Sassaman <[email-masked]>
To: <[email-masked]>
Cc: <[email-masked]>, <[email-masked]>
Subject: Re: Comments on ECC draft
Sender: [email-masked]

I'd like to bring this up again before the next revision of the draft. How
close are we to consensus on the ECC semantics?

OpenSSL now has ECC in it, and there is an ECC in TLS draft being proposed
in the IETF. It is worth nailing this down, I think.

On Wed, 5 Sep 2001 [email-masked] wrote:

>
> We have been looking at the ECC issue and have a few comments on the
> proposed draft by Dominikus Scherkl and Christoph Fausak.
>
> Broadly speaking it looks very good.  Obviously a lot of care and effort
> has gone into the work.  It seems to be timely to address the issue of
> elliptic curve support as there is interest in this technology from a
> number of areas.
>
> Our main concern is the number of variations proposed.  Experience with
> OpenPGP and other standards suggests that having a multitude of options
> does not lead to interoperability and security.  It is better to focus
> on a small number of options that will be used and tested.
>
> In looking at the various forms of elliptic curves, we can separate
> consideration of the coordinate field (the field from which the X and
> Y coordinates are taken) from the curve group.  Rather than describing
> each curve choice as a particular coordinate field and elliptic curve,
> we would rather specify a limited set of coordinate fields, and then to
> define curves using that set.
>
> Especially when implementing the binary (characteristic 2) fields,
> to get good performance it is necessary to optimize the code for the
> particular field size and basis.  Knowing the polynomial you can hard-code
> the necessary shifts, xors, and array offsets and do the arithmetic
> very fast.  Code which treats these values as variables will be much
> less efficient. As efficiency is much of the motivation for going to EC
> technology, we should try to preserve it.
>
> Therefore we recommend choosing a limited set of field sizes, and for each
> one choosing a single coordinate basis.  This will let all implementers
> optimize their code for the fields that are actually in use.
>
> As candidates for the specific fields to use, we recommend
> the selections from NIST [fips186-2], used as ECC groups in IKE
> [draft-ietf-ipsec-ike-ecc-groups-03]. These fields are being deployed
> and are in use in some environments. They provide for efficient
> implementations.
>
> ECC groups in IKE specifies two curves for each choice of coordinate
> field, a random curve which is expected to provide maximal security due
> to absence of any exploitable structure, and a Koblitz curve which has
> structure that allows for optimization and high speed.  We feel this is a
> good model to follow. It provides some flexibility while still providing a
> limited number of choices which will promote interoperability.  No special
> coding is needed to support the Koblitz curve for interoperation purposes;
> effort is only required if you want to get the potential speed advantages.
>
> The last point we would like to make is about the field representation
> format (section 4.4 in the draft), where again we would propose to reduce
> the number of options in order to improve interoperability. 16 options
> is too many.
>
> We suggest the initial draft use only prime fields, descriptor 3,
> and trinomial/pentanomial binary fields, descriptors 11 and 12. These
> three are enough to cover all the NIST curves.  They seem to provide
> the advantages which we seek from ECC without multiplying the options
> excessively.
>
> If the group does want to pursue additional field types, we would like
> to see some rationale for the use of prime extension field types 4-9. Our
> concern with the special primes 1-2 is that this area seems to be covered
> by patents.  And descriptors 14-16 are for normal bases, where we see
> two problems.  First, they cannot be efficiently implemented in software;
> and second, we do not think it is possible to convert from a normal basis
> into a polynomial basis representation without additional information
> regarding the specific normal basis chosen.  Hence using normal bases
> as an interchange format is not a good choice.  So we would like to see
> more discussion of that aspect if the group wishes to pursue it.
>
> (One organizational point: section 4.4 actually describes custom curves,
> and we would prefer to see the draft focus on predefined curves.  We have
> ideas on how to reorganize the draft to define specific coordinate
> fields and curves based on them, which we are getting into shape to
> present shortly.)
>
> Hal Finney
> Andrey Jivsov
> Network Associates, Inc.
>
> URLs:
> NIST curves: http://csrc.nist.gov/publications/fips/fips186-2/fips186-2.pdf
>
> ECC groups:
> http://www.ietf.org/internet-drafts/draft-ietf-ipsec-ike-ecc-groups-03.txt
>

--Len.

From: "Michael Young" <[email-masked]>
To: "OpenPGP" <[email-masked]>
Subject: More on key expiration policy (Re: draft-ietf-openpgp-rfc2440bis-06.txt)
Date: Mon, 23 Sep 2002 17:49:34 -0400
Sender: [email-masked]

Subject: More on key expiration policy (Re:
draft-ietf-openpgp-rfc2440bis-06.txt)

From: "Len Sassaman" <[email-masked]>
> Actually, in Jon's proposal, the bad guy can. If we do things Bodo's way,
> he can't.

Bodo originally suggested that clients abide by expiration times when
creating new certifications.  That alone may not prevent a compromised
key from being misused.  Yes, it would work for certifications prior
to the compromise, and for new ones where the signer gets the key
*directly* from the owner, but that still doesn't cover all cases.

Consider this scenario...
    I steal Bob's key.
    I publish it, with an updated expiration time, to an
     out-of-the-way keyserver.
    Bob's new friend Alice gets his key from this keyserver.
    Alice verifies the fingerprint with Bob, and signs his key,
     in accordance with Bodo's rules.
    Alice sends her new signature to Bob, and/or publishes it
     at my keyserver, but I steal it enroute.
    I have a signature that will outlast Bob's intended expiration.

The problem is that fingerprints don't include the expiration time.

Now, Bob *could* insist on getting a copy of Alice's signature, and
check for a mismatched expiration time.  Together, Bob and Alice could
discover that I've compromised Bob.  But this would require more care
in the keysigning process than even some very cautious people apply.

Note that disallowing rewriting won't prevent this attack, as
that also depends on someone noticing a (different) mismatch.
(If I can completely keep people from seeing key updates,
then I can defeat revocations, too, but that's a much broader
attack.)

This may be another fair argument for allowing rewriting.  If you
really wanted irrevocable expiration times, you'd want to hash them
into the fingerprint material, but it's way too late for that.

> The question I see is this: are key expiration dates a "mandate" or a
> "suggestion" to third parties by the key owner?

More precisely, are expiration times rewriteable?

I'm afraid that the answer has to be YES.  The specification has
clearly said so for a while now, and at least one implementation
(GnuPG) offers this capability.  If we change the rules now,
anyone who has taken advantage of it (or set a short expiration
time with the expectation that they can change it) will be
seriously disappointed.

From: "Richie Laager" <[email-masked]>
To: "'Bodo Moeller'" <[email-masked]>
Cc: "'OpenPGP'" <[email-masked]>
Subject: RE: draft-ietf-openpgp-rfc2440bis-06.txt
Date: Mon, 23 Sep 2002 16:33:36 -0500
Organization: Wikstrom Telecom Internet
Importance: Normal
Sender: [email-masked]

> -----Original Message-----
> From: Bodo Moeller [mailto:[email-masked]] 
> Sent: Monday, September 23, 2002 1:57 PM
> To: Richie Laager
> Cc: 'OpenPGP'
> Subject: Re: draft-ietf-openpgp-rfc2440bis-06.txt
> 
> 
> On Mon, Sep 23, 2002 at 01:49:14PM -0500, Richie Laager wrote:
> 
> >> Did you read my original message from the mailing list archives?
> >> There is a simple workaround for the protocol failure, which
> >> does not have the problems of your proposal: whenever someone
> >> certifies someone else's key, then if this key has an expiration
> >> time set, the certification signature should get an expiration
> >> time too such that the signature's validity period extends no
> >> longer into the future than the key's validity period.
> 
> > How does this help? If a "bad guy" gets the private key, he can
> > simply resign everyone's key.
> 
> If the bad guy gets Alice's private key that has expired, he can
> renew Alice's self-signature on the key, but he cannot renew Bob's
> certification for Alice's key, which will have expired too
> according to my proposal.  So no-one will believe it is still
> Alice's key.

Okay. I get it now. Alice's key expires in 5 years from creating, for
example. Two years later, Bob signs Alice's. Bob's PGP client sets an
expiration date of 3 years in the future on Bob's signature on
Alice's key. That way, Bob's signature expires at the same time as
Alice's key. If an attacker gets Alice's private key and extends the
expiration, the attacker would have to regain all of the signatures.

The only flaw I can see is that if Alice sets an expiration date of
Never, gets a signature from Bob, and then sets her expiration time
to 5 years, Bob's signature will likely NOT have an expiration date.
So, an attacker could then exploit Bob's signature. In essence, this
means that someone can't shrink their key validity length (length as
in time) and still have these benefits. My proposal would allow this.
However, my proposal doesn't allow someone to extend his or her key
validity length. And, my proposal requires changes on the client side
of the recipient, while your proposal requires client side changes
for the key signer. Therefore, I'll agree that your proposal is the
best. I just wanted to contribute my thoughts and clarify my
understanding of the issue.

Richard Laager

From: "Michael Young" <[email-masked]>
To: "OpenPGP" <[email-masked]>
Subject: Expiration semantics (Re: draft-ietf-openpgp-rfc2440bis-06.txt)
Date: Mon, 23 Sep 2002 15:50:06 -0400
Sender: [email-masked]

Subject: Expiration semantics (Re: draft-ietf-openpgp-rfc2440bis-06.txt)

From: "Derek Atkins" <[email-masked]>
> A bad guy gets a copy of my private key..  If there is a key
> expiration then they cannot keep it alive indefinitely.  Or is key
> compromise not an attack you care about? ;)

No.

If you allow self-signatures to be rewritten with different
expiration times, then no, key COMPROMISE is NOT an attack
that the expiration time can ever mitigate.  Revocation
is the only option.

Now, it WOULD HAVE been reasonable to outright disallow multiple
self-signatures with different expiration times.  Then, the presence
of multiple expiration times could be taken as a clear sign of
compromise.  I would favor this approach, but others clearly do not,
and the spec has clearly allowed rewriting expiration times.

The usage pattern Jon Callas described does help deal with LOST keys,
though, preventing them from being used by legitimate clients.  In
the unlikely event that Jon loses his key, the flood of mail encrypted
to it will end at his most recently chosen expiration time :-).

This applies primarily to encryption.  I suppose it might also prevent
some fool from signing Jon's key (without asking him) after he has
lost it, but I feel no need to protect such fools.  So, I must admit
that I don't understand why Jon wants this to apply to main keys;
couldn't he update the expiration time in the binding signature for
his encryption keys?  If he has a "dead-man's switch" on all of his
subkeys, what more does he get from having the main key expire?

I would ask that the spec include some language to the sections on
expiration times to remind the reader that they can be rewritten, and
that clients should abide by them but not depend on them to limit
compromise.  (The right to rewrite appears elsewhere, but its
consequences may not immediately occur to someone looking at the
expiration time description.)

[As for the Bodo Moeller's original question, I mostly side with Jon.
Certifications are statements about the ownership of a key, not its
lifetime; it should be legal to make a certification that will outlast
the key's (CURRENT) expiration time.  That said, I wouldn't
strenuously object to mentioning that clients might WANT to consider
the key expiration time when making a new certification.]

Date: Mon, 23 Sep 2002 20:57:29 +0200
From: Bodo Moeller <[email-masked]>
To: Richie Laager <[email-masked]>
Cc: "'OpenPGP'" <[email-masked]>
Subject: Re: draft-ietf-openpgp-rfc2440bis-06.txt
Sender: [email-masked]

On Mon, Sep 23, 2002 at 01:49:14PM -0500, Richie Laager wrote:

>> Did you read my original message from the mailing list archives?
>> There is a simple workaround for the protocol failure, which does
>> not have the problems of your proposal: whenever someone certifies
>> someone else's key, then if this key has an expiration time set,
>> the certification signature should get an expiration time too such
>> that the signature's validity period extends no longer into the
>> future than the key's validity period.

> How does this help? If a "bad guy" gets the private key, he can
> simply resign everyone's key.

If the bad guy gets Alice's private key that has expired, he can renew
Alice's self-signature on the key, but he cannot renew Bob's
certification for Alice's key, which will have expired too according
to my proposal.  So no-one will believe it is still Alice's key.

Well, nearly no-one -- I can't speak for Jon :-)

-- 
Bodo Möller <[email-masked]>
PGP http://www.informatik.tu-darmstadt.de/TI/Mitarbeiter/moeller/0x36d2c658.html
* TU Darmstadt, Theoretische Informatik, Alexanderstr. 10, D-64283 Darmstadt
* Tel. +49-6151-16-6628, Fax +49-6151-16-6036

Date: Mon, 23 Sep 2002 11:53:04 -0700 (PDT)
From: Len Sassaman <[email-masked]>
To: Derek Atkins <[email-masked]>
Cc: Bodo Moeller <[email-masked]>, Jon Callas <[email-masked]>, OpenPGP <[email-masked]>
Subject: Re: draft-ietf-openpgp-rfc2440bis-06.txt
Sender: [email-masked]

On 23 Sep 2002, Derek Atkins wrote:

>
> Bodo Moeller <[email-masked]> writes:
>
> > Please point out an advantage of *key* expiration over
> > *self-signature* expiration in that scenario.
>
> A bad guy gets a copy of my private key..  If there is a key
> expiration then they cannot keep it alive indefinitely.  Or is key
> compromise not an attack you care about? ;)

Actually, in Jon's proposal, the bad guy can. If we do things Bodo's way,
he can't.

Bodo wants to make key expirations permanent and unalterable. This means
that even if a bad guy gets the private key, the key expiration cannot be
changed.

With Jon's way, key expirations are not a defense against key compromise,
because they can be extended indefinitely by the holder of the private
key.

The question I see is this: are key expiration dates a "mandate" or a
"suggestion" to third parties by the key owner?

In Mixmaster, we have key expiration dates that are not even tied to the
key by a signature -- they are just denoted in the key header field. The
intention here is to inform the user that the key will be deleted after
the expiration date, and in no way protects against the compromise of the
key. (Deleting the key does that -- the expiration date protects against
unreadable mail by the key holder).

One might argue that expirations in PGP are intended to be interpreted the
same way, and that the user should revoke the key if he is worried about
Bad Guys possessing it. I think this is how it must be interpreted if we
use Jon's system.

--Len.

From: "Richie Laager" <[email-masked]>
To: "'Bodo Moeller'" <[email-masked]>
Cc: "'OpenPGP'" <[email-masked]>
Subject: RE: draft-ietf-openpgp-rfc2440bis-06.txt
Date: Mon, 23 Sep 2002 13:49:14 -0500
Organization: Wikstrom Telecom Internet
Importance: Normal
Sender: [email-masked]

> -----Original Message-----
> From: Bodo Moeller [mailto:[email-masked]] 
> Sent: Monday, September 23, 2002 1:03 PM
> To: Richie Laager
> Cc: 'Derek Atkins'; 'Jon Callas'; 'OpenPGP'
> Subject: Re: draft-ietf-openpgp-rfc2440bis-06.txt
> 
> 
> On Mon, Sep 23, 2002 at 12:48:16PM -0500, Richie Laager wrote:
> 
> >> Yes he can -- this is exactly the problem [1] that I want to
> >> solve with my suggested change to the specification.  The way
> >> Jon wants to use key expiration, the bad guy can keep the key
> >> alive
> >> indefinitely. I call this a protocol failure, he calls it a
> >> feature.
> 
> > I've been following this thread somewhat, and I have the
> > following suggestion: [...]
> 
> Did you read my original message from the mailing list archives?
> There is a simple workaround for the protocol failure, which does
> not have the problems of your proposal: whenever someone certifies
> someone else's key, then if this key has an expiration time set,
> the certification signature should get an expiration time too such
> that the signature's validity period extends no longer into the
> future than the key's validity period.

How does this help? If a "bad guy" gets the private key, he can
simply resign everyone's key.

Richie

Date: Mon, 23 Sep 2002 20:02:54 +0200
From: Bodo Moeller <[email-masked]>
To: Richie Laager <[email-masked]>
Cc: "'Derek Atkins'" <[email-masked]>, "'Jon Callas'" <[email-masked]>, "'OpenPGP'" <[email-masked]>
Subject: Re: draft-ietf-openpgp-rfc2440bis-06.txt
Sender: [email-masked]

On Mon, Sep 23, 2002 at 12:48:16PM -0500, Richie Laager wrote:

>> Yes he can -- this is exactly the problem [1] that I want to solve
>> with my suggested change to the specification.  The way Jon wants
>> to use key expiration, the bad guy can keep the key alive
>> indefinitely. I call this a protocol failure, he calls it a
>> feature.

> I've been following this thread somewhat, and I have the following
> suggestion: [...]

Did you read my original message from the mailing list archives?
There is a simple workaround for the protocol failure, which does
not have the problems of your proposal: whenever someone certifies
someone else's key, then if this key has an expiration time set, the
certification signature should get an expiration time too such that
the signature's validity period extends no longer into the future than
the key's validity period.

(Obviously if Alice specifically asks Bob to certify her key for a
longer period, he can do so, but we need a default for the typical
case that there is no out-of-band information on this.)

Of course the one problem we cannot avoid is that the legitimate owner
of the key cannot keep the key alive indefinitely.  This is because
this "problem" is exactly the security feature that me and Florian
Weimer and Derek Atkins want to have: we don't want the bad guy to be
able to unexpire the key if he gets hold of the secret key.

-- 
Bodo Möller <[email-masked]>
PGP http://www.informatik.tu-darmstadt.de/TI/Mitarbeiter/moeller/0x36d2c658.html
* TU Darmstadt, Theoretische Informatik, Alexanderstr. 10, D-64283 Darmstadt
* Tel. +49-6151-16-6628, Fax +49-6151-16-6036

From: "Richie Laager" <[email-masked]>
To: "'Bodo Moeller'" <[email-masked]>, "'Derek Atkins'" <[email-masked]>
Cc: "'Jon Callas'" <[email-masked]>, "'OpenPGP'" <[email-masked]>
Subject: RE: draft-ietf-openpgp-rfc2440bis-06.txt
Date: Mon, 23 Sep 2002 12:48:16 -0500
Organization: Wikstrom Telecom Internet
Importance: Normal
Sender: [email-masked]

> -----Original Message-----
> From: [email-masked] 
> [mailto:[email-masked]] On Behalf Of Bodo Moeller
> Sent: Monday, September 23, 2002 9:01 AM
> To: Derek Atkins
> Cc: Jon Callas; OpenPGP
> Subject: Re: draft-ietf-openpgp-rfc2440bis-06.txt
> 
> On Mon, Sep 23, 2002 at 09:55:19AM -0400, Derek Atkins wrote:

> Yes he can -- this is exactly the problem [1] that I want to solve
> with my suggested change to the specification.  The way Jon wants
> to use key expiration, the bad guy can keep the key alive
> indefinitely. I call this a protocol failure, he calls it a
> feature.

I've been following this thread somewhat, and I have the following
suggestion:

IIRC, key expirations are stored in the self-signature. So, a PGP
client could take all of the valid self-signatures, and compare
expiration dates. The oldest one would be honored.

This means that you cannot extend the key expiration. However, if you
don't want an attacker to be able to extend the key expiration if he
or she has the private key, this also means that the legitimate owner
of key cannot be allowed to extend the expiration date.

There is another large flaw with this plan. An attacker would only
need to revoke the self-signature, thus making it invalid. So, for
the meaning of this discussion, a "valid self-signature" would be one
that is correct in cryptographic terms, but revocations are ignored.

Deleting the other self-signatures would work, but since keyservers
only add to a key, synchronization with a keyserver could defeat this
attack method. However, if we ever implement the "no-modify" flag,
there is no reason the attacker (with possession of the private key)
couldn't send the key to the keyserver with the other signatures
deleted and the "no-modify" flag set. So, this may require that
keyservers maintain all self-signatures, even if the "no-modify" flag
is set.

So, to recap, if you ignore my implementation notes, the following
choice needs to be made:
1. Is extending a key expiration date by a key's owner a REQUIRED
action. If not, this is feasible. If so, I can't think of a way to do
it.

Richard Laager

Date: Mon, 23 Sep 2002 16:01:02 +0200
From: Bodo Moeller <[email-masked]>
To: Derek Atkins <[email-masked]>
Cc: Jon Callas <[email-masked]>, OpenPGP <[email-masked]>
Subject: Re: draft-ietf-openpgp-rfc2440bis-06.txt
Sender: [email-masked]

On Mon, Sep 23, 2002 at 09:55:19AM -0400, Derek Atkins wrote:
> Bodo Moeller <[email-masked]> writes:

>> Please point out an advantage of *key* expiration over
>> *self-signature* expiration in that scenario.

> A bad guy gets a copy of my private key..  If there is a key
> expiration then they cannot keep it alive indefinitely.

Yes he can -- this is exactly the problem [1] that I want to solve
with my suggested change to the specification.  The way Jon wants to
use key expiration, the bad guy can keep the key alive indefinitely.
I call this a protocol failure, he calls it a feature.

[1] http://www.imc.org/ietf-openpgp/mail-archive/msg02374.html

-- 
Bodo Möller <[email-masked]>
PGP http://www.informatik.tu-darmstadt.de/TI/Mitarbeiter/moeller/0x36d2c658.html
* TU Darmstadt, Theoretische Informatik, Alexanderstr. 10, D-64283 Darmstadt
* Tel. +49-6151-16-6628, Fax +49-6151-16-6036

To: Bodo Moeller <[email-masked]>
Cc: Jon Callas <[email-masked]>, OpenPGP <[email-masked]>
From: Derek Atkins <[email-masked]>
Subject: Re: draft-ietf-openpgp-rfc2440bis-06.txt
Date: 23 Sep 2002 09:55:19 -0400
Lines: 14
Sender: [email-masked]

Bodo Moeller <[email-masked]> writes:

> Please point out an advantage of *key* expiration over
> *self-signature* expiration in that scenario.

A bad guy gets a copy of my private key..  If there is a key
expiration then they cannot keep it alive indefinitely.  Or is key
compromise not an attack you care about? ;)

-derek

Date: Mon, 23 Sep 2002 08:23:34 +0200
From: Bodo Moeller <[email-masked]>
To: Jon Callas <[email-masked]>
Cc: OpenPGP <[email-masked]>
Subject: Re: draft-ietf-openpgp-rfc2440bis-06.txt
Sender: [email-masked]

On Sun, Sep 22, 2002 at 11:16:16PM -0700, Jon Callas wrote:
> "Bodo Moeller" <[email-masked]>:

>> In
>> your scenario, you specifically don't want the key to finally expire
>> if someone stops updating it, you just want to avoid having valid
>> self-signatures present.

> In my scenario, I specifically want the key expiration. Really I do. Now you
> may disagree with this, but it is what I want.

Please point out an advantage of *key* expiration over
*self-signature* expiration in that scenario.

-- 
Bodo Möller <[email-masked]>
PGP http://www.informatik.tu-darmstadt.de/TI/Mitarbeiter/moeller/0x36d2c658.html
* TU Darmstadt, Theoretische Informatik, Alexanderstr. 10, D-64283 Darmstadt
* Tel. +49-6151-16-6628, Fax +49-6151-16-6036

Date: Sun, 22 Sep 2002 23:16:16 -0700
Subject: Re: draft-ietf-openpgp-rfc2440bis-06.txt
From: Jon Callas <[email-masked]>
To: Bodo Moeller <[email-masked]>, OpenPGP <[email-masked]>
Sender: [email-masked]

On 9/22/02 12:48 AM, "Bodo Moeller" <[email-masked]>
wrote:

> In
> your scenario, you specifically don't want the key to finally expire
> if someone stops updating it, you just want to avoid having valid
> self-signatures present.

In my scenario, I specifically want the key expiration. Really I do. Now you
may disagree with this, but it is what I want.

    Jon

Date: Sun, 22 Sep 2002 09:48:51 +0200 (CEST)
To: [email-masked], Jon Callas <[email-masked]>
From: [email-masked] (Bodo Moeller)
Subject: Re: draft-ietf-openpgp-rfc2440bis-06.txt
Sender: [email-masked]

Jon Callas <[email-masked]>:
> "Bodo Moeller" <[email-masked]>:

>> And assuming there *is* some point in doing self-signature updates
>> like this, whatever it may be, you should use signature expiration
>> time sub-packets, not key expiration sub-packets: it's just the
>> self-signatures that you want to expire, not the key.  So there is no
>> conflict with the proposed workaround for the key expiration protocol
>> failure.

> What I want is something of a dead-man's switch on my own key (and on other
> people's -- Werner is correct in noting that this requires client work,
> server work, and there are a lot of cool features you can load on this). If
> someone stops using their key, then it expires after some reasonable time,
> whether that reasonable time is measured in hours, days, or months.

So use *signature* expiration on the self-signatures for this.  In
your scenario, you specifically don't want the key to finally expire
if someone stops updating it, you just want to avoid having valid
self-signatures present.

> On the flip side of this, let's imagine that I certify Alice's key. When I
> certify it, I'm stating that I believe it belongs to her. If she has a
> dead-woman's switch on her key, it doesn't change my statement. If I wanted
> to limit the duration of my statement, that option was available to me. If
> Alice permits her key to expire, I still believe it's her key!

It might have become someone else's key too, that's the problem with
this: one reason for setting an expiry date is the expectation that
the key may no longer be secure after some time, be it because of
worries about keylengths or because you don't want to keep the
hard-disks of your old computers in a safe forever.

>                                                                It may be
> expired, but it's still her key. She could always un-expire it by putting a
> new self-sig on it. If I don't like all of this, I always have the option of
> revoking my signature, as well.

Compared with key expiry (and I mean final expiry that cannot simply
be undone by anyone who has gotten hold of the secret key), revocation
is somewhat of a kludge.  In some situations it is the best you can
do, but the problem is that the semantics is not monotonous.  This may
be fun for AI people, but security folks should be worried about the
ramifications of denial of service attacks (nothing guarantees that
the revocation reaches everyone who should know about it).

-- 
Bodo Möller <[email-masked]>
PGP http://www.informatik.tu-darmstadt.de/TI/Mitarbeiter/moeller/0x36d2c658.html
* TU Darmstadt, Theoretische Informatik, Alexanderstr. 10, D-64283 Darmstadt
* Tel. +49-6151-16-6628, Fax +49-6151-16-6036

Date: Sat, 21 Sep 2002 15:53:25 -0700
Subject: Re: draft-ietf-openpgp-rfc2440bis-06.txt
From: Jon Callas <[email-masked]>
To: Bodo Moeller <[email-masked]>
CC: OpenPGP <[email-masked]>
Sender: [email-masked]

On 9/21/02 2:54 PM, "Bodo Moeller" <[email-masked]>
wrote:

> And assuming there *is* some point in doing self-signature updates
> like this, whatever it may be, you should use signature expiration
> time sub-packets, not key expiration sub-packets: it's just the
> self-signatures that you want to expire, not the key.  So there is no
> conflict with the proposed workaround for the key expiration protocol
> failure.

What I want is something of a dead-man's switch on my own key (and on other
people's -- Werner is correct in noting that this requires client work,
server work, and there are a lot of cool features you can load on this). If
someone stops using their key, then it expires after some reasonable time,
whether that reasonable time is measured in hours, days, or months.

On the flip side of this, let's imagine that I certify Alice's key. When I
certify it, I'm stating that I believe it belongs to her. If she has a
dead-woman's switch on her key, it doesn't change my statement. If I wanted
to limit the duration of my statement, that option was available to me. If
Alice permits her key to expire, I still believe it's her key! It may be
expired, but it's still her key. She could always un-expire it by putting a
new self-sig on it. If I don't like all of this, I always have the option of
revoking my signature, as well.

    Jon

Date: Sat, 21 Sep 2002 23:54:51 +0200
From: Bodo Moeller <[email-masked]>
To: Jon Callas <[email-masked]>
Cc: OpenPGP <[email-masked]>
Subject: Re: draft-ietf-openpgp-rfc2440bis-06.txt
Sender: [email-masked]

On Sat, Sep 21, 2002 at 10:20:53PM +0200, Bodo Moeller wrote:
> On Sat, Sep 21, 2002 at 11:20:49AM -0700, Jon Callas wrote:
>> "Bodo Moeller" <[email-masked]>:

>>> I am talking about main keys, not subkeys.  Simply don't set an
>>> expiration time for the signing key if you want to be able to continue
>>> to use it indefinitely.

>> So am I. I'm talking about main keys.
>> 
>> I have a vision where my program might (for example) re-create my
>> self-signature every day with a 48-hour expiration, and upload it to the
>> server.

> But why would you want to do this?!  This key "expiration" does not
> provide any security.  You can just as well submit a key without an
> expiration date; instead of stopping to send updated self-signatures,
> you just stop to use the key.

And assuming there *is* some point in doing self-signature updates
like this, whatever it may be, you should use signature expiration
time sub-packets, not key expiration sub-packets: it's just the
self-signatures that you want to expire, not the key.  So there is no
conflict with the proposed workaround for the key expiration protocol
failure.

-- 
Bodo Möller <[email-masked]>
PGP http://www.informatik.tu-darmstadt.de/TI/Mitarbeiter/moeller/0x36d2c658.html
* TU Darmstadt, Theoretische Informatik, Alexanderstr. 10, D-64283 Darmstadt
* Tel. +49-6151-16-6628, Fax +49-6151-16-6036

To: Jon Callas <[email-masked]>
Cc: OpenPGP <[email-masked]>
Subject: Re: draft-ietf-openpgp-rfc2440bis-06.txt
From: Werner Koch <[email-masked]>
Organisation: g10 Code GmbH
Date: Sat, 21 Sep 2002 22:52:14 +0200
Lines: 14
Sender: [email-masked]

On Sat, 21 Sep 2002 11:20:49 -0700, Jon Callas said:

> I have a vision where my program might (for example) re-create my
> self-signature every day with a 48-hour expiration, and upload it to the
> server.

Aihhh, this needs some work on the keyserver side of the story and I
can think of neat features to be implemented on the client side. ;-)

Shalom-Salam,

   Werner

Date: Sat, 21 Sep 2002 22:20:53 +0200
From: Bodo Moeller <[email-masked]>
To: Jon Callas <[email-masked]>
Cc: OpenPGP <[email-masked]>
Subject: Re: draft-ietf-openpgp-rfc2440bis-06.txt
Sender: [email-masked]

On Sat, Sep 21, 2002 at 11:20:49AM -0700, Jon Callas wrote:
> "Bodo Moeller" <[email-masked]>:

>> I am talking about main keys, not subkeys.  Simply don't set an
>> expiration time for the signing key if you want to be able to continue
>> to use it indefinitely.

> So am I. I'm talking about main keys.
> 
> I have a vision where my program might (for example) re-create my
> self-signature every day with a 48-hour expiration, and upload it to the
> server.

But why would you want to do this?!  This key "expiration" does not
provide any security.  You can just as well submit a key without an
expiration date; instead of stopping to send updated self-signatures,
you just stop to use the key.

-- 
Bodo Möller <[email-masked]>
PGP http://www.informatik.tu-darmstadt.de/TI/Mitarbeiter/moeller/0x36d2c658.html
* TU Darmstadt, Theoretische Informatik, Alexanderstr. 10, D-64283 Darmstadt
* Tel. +49-6151-16-6628, Fax +49-6151-16-6036

Date: Sat, 21 Sep 2002 11:20:49 -0700
Subject: Re: draft-ietf-openpgp-rfc2440bis-06.txt
From: Jon Callas <[email-masked]>
To: OpenPGP <[email-masked]>
Sender: [email-masked]

On 9/21/02 4:11 AM, "Bodo Moeller" <[email-masked]>
wrote:

> Jon Callas <[email-masked]>:
>> "Bodo Moeller" <[email-masked]>:
> 
>>> Here's the yearly reminder on the OpenPGP key expiration protocol failure.
>>> 
>>> http://www.imc.org/ietf-openpgp/mail-archive/msg02374.html
>>> http://www.imc.org/ietf-openpgp/mail-archive/msg02848.html
>>> http://www.imc.org/ietf-openpgp/mail-archive/msg03693.html
> 
>> My opinion (still) is that it isn't a bug, it's a feature. I want someday to
>> make keys that have short-lived self-signatures on them that are regularly
>> renewed, [...]
> 
> You are talking about subkeys (encryption subkeys, presumably -- in
> the case of signature keys, you can simply stop using them without
> having announced so in advance).  If you want to regularly renew your
> subkeys, then set appropriate expiration times for these subkeys.
> 
> I am talking about main keys, not subkeys.  Simply don't set an
> expiration time for the signing key if you want to be able to continue
> to use it indefinitely.
> 

So am I. I'm talking about main keys.

I have a vision where my program might (for example) re-create my
self-signature every day with a 48-hour expiration, and upload it to the
server.

OpenPGP has a policy that in the base specification, we permit a variety of
trust models and do not require one; we provide a language that is robust
enough to support all these trust models.

    Jon

Date: Sat, 21 Sep 2002 13:28:44 +0200 (CEST)
To: [email-masked]
Cc: Werner Koch <[email-masked]>, Jon Callas <[email-masked]>
From: [email-masked] (Bodo Moeller)
Subject: Re: draft-ietf-openpgp-rfc2440bis-06.txt
Sender: [email-masked]

Werner Koch <[email-masked]>:
> Jon Callas:

>> My opinion (still) is that it isn't a bug, it's a feature.

> I fully agree.  [...]

With me as well apparently, because this:

> By default GnuPG uses the expiration date of the self-signature as the
> one for a key signature. This is on Florian Weimer's request and afaik
> is sufficient for him and his use of the PGP PKI.

is exactly what I was asking for -- except that I want this to be
recommended in the specification [1][2] so that Florian won't have to
contact all the implementors individually [3].

[1] http://www.imc.org/ietf-openpgp/mail-archive/msg02374.html
[2] http://www.imc.org/ietf-openpgp/mail-archive/msg03693.html
[3] http://lists.gnupg.org/pipermail/gnupg-devel/2001-July/006196.html

-- 
Bodo Möller <[email-masked]>
PGP http://www.informatik.tu-darmstadt.de/TI/Mitarbeiter/moeller/0x36d2c658.html
* TU Darmstadt, Theoretische Informatik, Alexanderstr. 10, D-64283 Darmstadt
* Tel. +49-6151-16-6628, Fax +49-6151-16-6036

Date: Sat, 21 Sep 2002 13:11:23 +0200 (CEST)
To: [email-masked]
From: [email-masked] (Bodo Moeller)
Cc: Jon Callas <[email-masked]>
Subject: Re: draft-ietf-openpgp-rfc2440bis-06.txt
Sender: [email-masked]

Jon Callas <[email-masked]>:
> "Bodo Moeller" <[email-masked]>:

>> Here's the yearly reminder on the OpenPGP key expiration protocol failure.
>> 
>> http://www.imc.org/ietf-openpgp/mail-archive/msg02374.html
>> http://www.imc.org/ietf-openpgp/mail-archive/msg02848.html
>> http://www.imc.org/ietf-openpgp/mail-archive/msg03693.html

> My opinion (still) is that it isn't a bug, it's a feature. I want someday to
> make keys that have short-lived self-signatures on them that are regularly
> renewed, [...]

You are talking about subkeys (encryption subkeys, presumably -- in
the case of signature keys, you can simply stop using them without
having announced so in advance).  If you want to regularly renew your
subkeys, then set appropriate expiration times for these subkeys.

I am talking about main keys, not subkeys.  Simply don't set an
expiration time for the signing key if you want to be able to continue
to use it indefinitely.

-- 
Bodo Möller <[email-masked]>
PGP http://www.informatik.tu-darmstadt.de/TI/Mitarbeiter/moeller/0x36d2c658.html
* TU Darmstadt, Theoretische Informatik, Alexanderstr. 10, D-64283 Darmstadt
* Tel. +49-6151-16-6628, Fax +49-6151-16-6036

Date: Sat, 21 Sep 2002 06:41:57 -0400
From: John Kane <[email-masked]>
To: IETF-OpenPGP <[email-masked]>
Subject: Re: Fixing the MDC language
Sender: [email-masked]

  jc> contains a SHA-1 hash of plaintext data
  jc> The plaintext of the data to be encrypted

An ambiguity quibble.  This is meant to refer to the octets of the
compressed/encoded packet as seen by the CFB envelope, as opposed
to the uncompressed/decoded data as seen by the end users?
I see the hint buried in 5.14, but pleeease make it more explicit in 5.13...

To: Jon Callas <[email-masked]>
Cc: Bodo Moeller <[email-masked]>, OpenPGP <[email-masked]>
Subject: Re: draft-ietf-openpgp-rfc2440bis-06.txt
From: Werner Koch <[email-masked]>
Organisation: g10 Code GmbH
Date: Sat, 21 Sep 2002 11:59:22 +0200
Lines: 25
Sender: [email-masked]

On Fri, 20 Sep 2002 23:09:23 -0700, Jon Callas said:

> My opinion (still) is that it isn't a bug, it's a feature. I want someday to
> make keys that have short-lived self-signatures on them that are regularly

I fully agree.  Furthermore, due to the possibility to set an
expiration date on a key signatature, a "CA" gains the same effect as
with an expiration date on the key.  It is about what a trusted
authority sees as a sound expiration date.  This may either be a key
signator by using the signature expiration time or the key owner by
setting the expiration date on his key signatures (self-signature).

PGP has the tradtion to to let the user decide and not some other
entity.  With the OpenPGP model the user is even free to ask a CA to
set an expiration date on their key signature.  

By default GnuPG uses the expiration date of the self-signature as the
one for a key signature.  This is on Florian Weimer's request and afaik
is sufficient for him and his use of the PGP PKI.

Salam-Shalom,

   Werner

Date: Fri, 20 Sep 2002 23:09:23 -0700
Subject: Re: draft-ietf-openpgp-rfc2440bis-06.txt
From: Jon Callas <[email-masked]>
To: Bodo Moeller <[email-masked]>, OpenPGP <[email-masked]>
Sender: [email-masked]

On 9/20/02 6:40 AM, "Bodo Moeller" <[email-masked]>
wrote:

> 
> Here's the yearly reminder on the OpenPGP key expiration protocol failure.
> 
> http://www.imc.org/ietf-openpgp/mail-archive/msg02374.html
> http://www.imc.org/ietf-openpgp/mail-archive/msg02848.html
> http://www.imc.org/ietf-openpgp/mail-archive/msg03693.html
> 

My opinion (still) is that it isn't a bug, it's a feature. I want someday to
make keys that have short-lived self-signatures on them that are regularly
renewed, and don't want to require the entire PKI to regenerate itself every
week, or day, or month. I think it's horribly limiting to require all the
dates to match up, and ruins a lot of interesting possibilities.

    Jon

Date: Fri, 20 Sep 2002 15:40:36 +0200
From: Bodo Moeller <[email-masked]>
To: [email-masked]
Subject: Re: draft-ietf-openpgp-rfc2440bis-06.txt
Sender: [email-masked]

Here's the yearly reminder on the OpenPGP key expiration protocol failure.

http://www.imc.org/ietf-openpgp/mail-archive/msg02374.html
http://www.imc.org/ietf-openpgp/mail-archive/msg02848.html
http://www.imc.org/ietf-openpgp/mail-archive/msg03693.html

-- 
Bodo Möller <[email-masked]>
PGP http://www.informatik.tu-darmstadt.de/TI/Mitarbeiter/moeller/0x36d2c658.html
* TU Darmstadt, Theoretische Informatik, Alexanderstr. 10, D-64283 Darmstadt
* Tel. +49-6151-16-6628, Fax +49-6151-16-6036

Date: Thu, 19 Sep 2002 23:55:09 -0700
From: "Hal Finney" <[email-masked]>
To: [email-masked], [email-masked]
Subject: Re: Fixing the MDC language
Sender: [email-masked]

A couple of comments:

First, there is another typo I forgot to mention:

> includes all of the plaintext, and then also includes two octets of values
> 0xD0, 0x14.  These represent the encoding of a Modification Detection Code

The D0 was from an older version of the draft when we were going to
use tag 16 for the MDC packet.  In fact we chose tag 19, so 0xD0 should
be 0xD3.

The other point:

> The plaintext of the data to be encrypted is passed through the SHA-1 hash
> function, and the result of the hash is appended to the plaintext in a
> Modification Detection Code packet.  The input to the hash function includes
> the prefix data described above which acts as a weakly keyed hash;

This last sentence is not quite correct, the prefix data per se does not
act as a weakly keyed hash.  It acts as the key to a sort of keyed hash.
But it's not really a normal keyed hash, because the key is usually kept
a lot more secret than our pseudo-IV.

In any case I don't really think we ought to mention this keyed-hash
stuff.  It's not necessary to an implementor, and as a shorthand for
some kind of security analysis it is too brief to be meaningful.  I'd
suggest removing the "which acts as..." clause entirely.

Hal

Date: Thu, 19 Sep 2002 23:30:09 -0700
Subject: Fixing the MDC language
From: Jon Callas <[email-masked]>
To: OpenPGP <[email-masked]>
Sender: [email-masked]

Here's a proposed fix to the oops that Hal found:

-----

The plaintext of the data to be encrypted is passed through the SHA-1 hash
function, and the result of the hash is appended to the plaintext in a
Modification Detection Code packet.  The input to the hash function includes
the prefix data described above which acts as a weakly keyed hash; it
includes all of the plaintext, and then also includes two octets of values
0xD0, 0x14.  These represent the encoding of a Modification Detection Code
packet tag and length field of 20 octets.

The resulting hash value is stored in a Modification Detection Code packet
which MUST use the two octet encoding just given to represent its tag and
length field.  The body of the MDC packet is the 20 octet output of the
SHA-1 hash.

The Modification Detection Code packet is appended to the plaintext and
encrypted along with the plaintext using the same CFB context.

During decryption, the plaintext data should be hashed with SHA-1, including
the prefix data as well as the packet tag and length field of the
Modification Detection Code packet.  The body of the MDC packet, upon
decryption, is compared with the result of the SHA-1 hash.  Any difference
in hash values is an indication that the message has been modified and
SHOULD be reported to the user. Likewise, the absence of an MDC packet, or
an MDC packet in any position other than the end of the plaintext, also
represent message modifications and SHOULD also be reported.

-----

I can quickly (like in 30 minutes) pop off another draft if this is
acceptable. Comments ASAP.

    Jon

From: Trevor Perrin <[email-masked]>
To: "'Jon Callas'" <[email-masked]>, Michael Young <[email-masked]>, Trevor Perrin <[email-masked]>, "'David Wagner'" <[email-masked]>, OpenPGP <[email-masked]>, [email-masked]
Subject:  RE: [Cfrg] OpenPGP security analysis
Date:  Thu, 19 Sep 2002 12:21:21 -0700
Sender: [email-masked]

To keep picking at this, the "chosen-ciphertext" attack of Jallad, Katz, and
Schneier could be used in conjunction with a downgrade attack to discover
the prefix block.  The attacker takes the ciphertext of the prefix block
from an integrity-protected message, then incorporates it into a
non-integrity-protected message, preceding it with a block of zeros.  The
receiver naively responds with "what the heck is this", and the decrypted
prefix block.

Now, the attacker can go ahead with his attack of "shuffling" the ciphertext
blocks around, and then recomputing the hash until he finds a collision on
the first bytes of the existing hash, then bit-flipping the last bytes to
match.  There's a lot of caveats to this attack, so it's probably not
anything to seriously worry about:
 - only works if attacker knows all plaintext
 - only works if data is uncompressed
 - only works if data is encrypted with passphrase
   - if public-key signed, it fails
   - if public-key encrypted, then forgeries are trivial anyways
 - only works if preceded by JKS attack
 - only works if the attacker has resources to find collisions on the first
X bytes of the hash, where X could be as low as 4 with probability 1/16, but
would average 11.
 - only allows attacker to move ciphertext blocks around, not to XOR new
strings into the ciphertext (because doing so would introduce a ciphertext
block which the attacker hasn't seen before and thus can't recover the next
CFB keystream block for, so the change would be unpredictable)
 - requires the attacker to make several other changes to the plaintext,
besides his targeted modification, so that he can search for collisions

The "cut-out" attack is where the attacker embeds a PGP literal data packet
+ MDC packet in a larger plaintext, and then cuts out the corresponding
ciphertext after encryption and uses that.  This attack is tripped up by the
prefix block, and by the check bytes with probability 2^-16.  The JKS
attack, as mentioned, could recover the prefix block's plaintext for one of
these illicit ciphertexts.  However then a shuffling attack would be needed
to make the hash match.  And the check bytes are still a problem.  But an
attacker could embed many illicit plaintexts in a single larger plaintext,
and check for many prefix/check bytes matches in a single JKS attack, so the
probability of 2^-16 could be increased.  For example, if an attacker embeds
1000 illicit plaintexts in a larger plaintext, and then cuts out and submits
1000 prefix block / check block pairs in a single JKS attack for matching,
he increases the odds of finding a match, and thus a successful forgery, to
2^-6.

Both the "shuffling" and "cut-out" attacks would be completely foiled by
using a MAC instead of an MDC, since the session key cannot be recovered in
a JKS attack like the prefix block can, and without it an attacker would not
be able to modify things and then recompute the MAC, as he can do with an
MDC.  Also, there may be other ways of stealing the prefix block;
implementors may not realize that integrity depends on its secrecy, so may
be careless with it.

The JKS attack on integrity-protected data would be foiled by using a Key
Derivation Function to derive a new encryption key from the session key, so
that integrity-protected ciphertext could not be "downgraded" and used in a
non-integrity-protected context with the same session key.  John Kane
suggested (off-list) something like:

Version = Sym. Encrypted Integrity Protected Data Packet Version Number
EncKey  = KDF(SessionKey, Version, 0)
AuthKey = KDF(SessionKey, Version, 1)

The version would be revved to 2, and would be incorporated into the KDF to
prevent rollbacks.  For version 2 and higher, a new type of MDC Packet would
be defined that contains an HMAC-SHA1 instead of SHA1.

Trevor

-----Original Message-----
From: Jon Callas [mailto:[email-masked]]
Sent: Wednesday, September 18, 2002 8:26 PM
To: Michael Young; Trevor Perrin; 'David Wagner'; OpenPGP; [email-masked]
Subject: Re: [Cfrg] OpenPGP security analysis

On 9/17/02 8:20 AM, "Michael Young" <[email-masked]> wrote:

> The MDC in OpenPGP is really no more than a checksum, intended to
> detect accidental damage.  (In fact, during the discussion, I believe
> that some folks suggested that it be just a checksum.)  Before the
> MDC, there was little ability to detect *any* sort of accident -- not
> just truncation, but fairly arbitrary internal damage as well.  (When
> the payload is a compressed packet, the decompression might discover
> damage, but then again, it might not.)  There was discussion of a
> stronger MAC, but I think this was dropped given that OpenPGP has a
> strong signature mechanism.

Yes, and no. The MDC is supposed to detect intentional damage as well as
accidental damage. While a checksum was suggested, it was rejected because
it's pretty obvious that would not have the desired characteristics.

It *is* true that the MDC is not and was never intended to be a MAC. The
goal of the MDC is to reliably detect modification of the data in the
envelope, whether by insertion, deletion, or changing it. If an attacker can
do that, then then MDC has failed and we need a new mechanism.

Also note that the MDC's hash is weakly keyed, as there is an "IV" for it
inside the envelope.

If we need to, there are ways we could turn this into a MAC, including a
function over the key, or key+hashkey, or even including an extra MAC key
inside the ESK.

I think there are a number of separate questions around this that include:

(1) Is there a security problem in the MDC as in bis-06?

(2) Should we change it regardless?

Each of those is important. If the answer to (1) is yes, then we need
something. (2) needs to balance existing deployment and so on.

    Jon

Date: Thu, 19 Sep 2002 01:48:10 -0700
Subject: Re: [Cfrg] OpenPGP security analysis
From: Jon Callas <[email-masked]>
To: Hal Finney <[email-masked]>, <[email-masked]>, <[email-masked]>, OpenPGP <[email-masked]>, <[email-masked]>, <[email-masked]>
Sender: [email-masked]

On 9/18/02 2:40 PM, "Hal Finney" <[email-masked]> wrote:

> 
> Here's something important.  The latest version of the OpenPGP-bis draft
> http://www.ietf.org/internet-drafts/draft-ietf-openpgp-rfc2440bis-06.txt
> has got an error with regard to the MDC feature.  In section 5.13 it
> says,

Well, isn't that seriously irritating?

I'll rev it.

    Jon

Date: Wed, 18 Sep 2002 20:25:59 -0700
Subject: Re: [Cfrg] OpenPGP security analysis
From: Jon Callas <[email-masked]>
To: Michael Young <[email-masked]>, Trevor Perrin <[email-masked]>, "'David Wagner'" <[email-masked]>, OpenPGP <[email-masked]>, <[email-masked]>
Sender: [email-masked]

On 9/17/02 8:20 AM, "Michael Young" <[email-masked]> wrote:

> The MDC in OpenPGP is really no more than a checksum, intended to
> detect accidental damage.  (In fact, during the discussion, I believe
> that some folks suggested that it be just a checksum.)  Before the
> MDC, there was little ability to detect *any* sort of accident -- not
> just truncation, but fairly arbitrary internal damage as well.  (When
> the payload is a compressed packet, the decompression might discover
> damage, but then again, it might not.)  There was discussion of a
> stronger MAC, but I think this was dropped given that OpenPGP has a
> strong signature mechanism.

Yes, and no. The MDC is supposed to detect intentional damage as well as
accidental damage. While a checksum was suggested, it was rejected because
it's pretty obvious that would not have the desired characteristics.

It *is* true that the MDC is not and was never intended to be a MAC. The
goal of the MDC is to reliably detect modification of the data in the
envelope, whether by insertion, deletion, or changing it. If an attacker can
do that, then then MDC has failed and we need a new mechanism.

Also note that the MDC's hash is weakly keyed, as there is an "IV" for it
inside the envelope.

If we need to, there are ways we could turn this into a MAC, including a
function over the key, or key+hashkey, or even including an extra MAC key
inside the ESK.

I think there are a number of separate questions around this that include:

(1) Is there a security problem in the MDC as in bis-06?

(2) Should we change it regardless?

Each of those is important. If the answer to (1) is yes, then we need
something. (2) needs to balance existing deployment and so on.

    Jon

From: Trevor Perrin <[email-masked]>
To: "'Hal Finney'" <[email-masked]>, [email-masked], [email-masked], [email-masked], [email-masked], Trevor Perrin <[email-masked]>
Subject:  RE: [Cfrg] OpenPGP security analysis
Date:  Wed, 18 Sep 2002 16:18:09 -0700
Sender: [email-masked]

This stops both attacks I mentioned, as far as I can tell.  It stops the
first attack (where the attacker embeds an illicit string in the plaintext,
and then later cuts out and uses the corresponding ciphertext), because the
attacker won't be able to predict or control the prefix bytes, so he can't
produce a valid MDC on his embedded string.

The one thing I still see to worry about, is the rollback attack where an
attacker embeds an illicit string in an integrity-protected packet, then
later cuts out and uses the ciphertext as a *non*-integrity-protected
packet.  This requires the attacker also cut out the previous blocksize+2
ciphertext bytes (cause of PGP's CFB resynchronization).  This attack will
only succeed in the 1/65,536 probability the check bytes happen to match.
An attacker could embed lots of illicit strings in a single file, to
increase the odds of this happening, but would have no way of knowing if he
succeeded short of submitting the illicit ciphertexts to the receiver and
observing if they decrypt successfully.

Using a key derivation function on the session key to derive the encryption
key in the integrity-protected case would prevent this attack.  Also
switching from an MDC to a MAC just to be safe still seems a good idea, if
it can be done in a backwards-compatible and rollback-proof way.  I heard a
good suggestion for this offlist, I assume the authors will present it
sometime.  

Trevor

-----Original Message-----
From: Hal Finney [mailto:[email-masked]]
Sent: Wednesday, September 18, 2002 2:41 PM
To: [email-masked]; [email-masked]; [email-masked];
[email-masked]; [email-masked]
Subject: RE: [Cfrg] OpenPGP security analysis

Here's something important.  The latest version of the OpenPGP-bis draft
http://www.ietf.org/internet-drafts/draft-ietf-openpgp-rfc2440bis-06.txt
has got an error with regard to the MDC feature.  In section 5.13 it
says,

   The plaintext of the data to be encrypted is passed through the
   SHA-1 hash function, and the result of the hash is appended to the
   plaintext in a Modification Detection Code packet.  Specifically,
   the input to the hash function does not include the prefix data
   described above;

This is wrong; the input to the hash function DOES include the prefix
data.  This is how it is implemented in the commercial PGP version 7.X
(which only reads but does not yet create this packet), and in GnuPG,
which can both create and read it.  I checked interoperability on this
feature with Werner Koch a long time ago and we are both doing it the
same way.  I also just downloaded GPG and looked at the code to make
sure, and it does hash the prefix.

The error is repeated a couple of paragraphs later,

   During decryption, the plaintext data should be hashed with SHA-1,
   not including the prefix data 

The reason this is important is that it can help to prevent these attacks
which involve controlled modification to the plaintext.  Since the hash
includes the block of prefix data, which is hidden to the attacker,
he cannot predict what the hash is before his modifications, even if he
knows the entire message; and nor can he predict what the hash should be
after modification.  So he can't do as Trevor Perrin describes below,
rearranging blocks, or XORing data into an existing message, and then
compensating for his changes by XORing an appropriate value into the hash.

Guessing the prefix block will only have success 2^128 for the AES and
Twofish ciphers where we mostly use the MDC, or 2^64 for the older ciphers
if it is used there.  In either case this is a very low chance of success.

We should correct the draft to accurately reflect the behavior of the
implementations in the field.  Hashing the prefix data improves the strength
of the MDC construction so it is important for security.

Hal Finney
NAI.com

> From: Trevor Perrin <[email-masked]>
> Subject:  RE: [Cfrg] OpenPGP security analysis
> Date:  Wed, 18 Sep 2002 13:31:27 -0700
> List-Archive: <http://www.imc.org/ietf-openpgp/mail-archive/>
> List-ID: <ietf-openpgp.imc.org>
>
>
>
> [I apologize for holding a monologue here, just wanted to close this up]
>
> >From: Trevor Perrin 
> >
> >There may other ways of making predictable modifications of 
> >the plaintext, which can also take advantage of the fact that 
> >you only need to find a collision on 4 bytes of the hash, then 
> >can bit-flip the rest.
>
> For example, copying-and-pasting a sequence of ciphertext blocks, or
> deleting a sequence, will cause a scrambled block just after each splice
> point, but these scrambled blocks will be predictable by an attacker who
> knows the plaintext, because CFB mode lets an attacker with known
plaintext
> reconstruct the keystream block that follows each ciphertext block.  Thus
> the situation is similar to Bellovin's cut-and-paste attacks against
> non-integrity-protected CBC, with the caveats:
>
>  - the attack requires the attacker know the entire plaintext string, so
he
> can compute the hash value of the modified plaintext that corresponds to
his
> ciphertext modifications
>
>  - the attack depends on the attacker trying out a large number of
potential
> modifications, until he finds one that collides with the first X bytes of
> the current hash, where X is the number of hash bytes that reside in all
but
> the last encryption block, (with a 16-byte block size and 20-byte hash,
> X=4,5,6,..,19 with probability 1/16th each)
>
> So in practice the attacker would choose a targeted modification he wanted
> to make, then choose some imperceptible modifications that he can make in
an
> out-of-the-way corner of the document, and search through their
permutations
> until he finds a collision.
>
> Trevor

Date: Wed, 18 Sep 2002 14:40:50 -0700
From: "Hal Finney" <[email-masked]>
To: [email-masked], [email-masked], [email-masked], [email-masked], [email-masked]
Subject: RE: [Cfrg] OpenPGP security analysis
Sender: [email-masked]

Here's something important.  The latest version of the OpenPGP-bis draft
http://www.ietf.org/internet-drafts/draft-ietf-openpgp-rfc2440bis-06.txt
has got an error with regard to the MDC feature.  In section 5.13 it
says,

   The plaintext of the data to be encrypted is passed through the
   SHA-1 hash function, and the result of the hash is appended to the
   plaintext in a Modification Detection Code packet.  Specifically,
   the input to the hash function does not include the prefix data
   described above;

This is wrong; the input to the hash function DOES include the prefix
data.  This is how it is implemented in the commercial PGP version 7.X
(which only reads but does not yet create this packet), and in GnuPG,
which can both create and read it.  I checked interoperability on this
feature with Werner Koch a long time ago and we are both doing it the
same way.  I also just downloaded GPG and looked at the code to make
sure, and it does hash the prefix.

The error is repeated a couple of paragraphs later,

   During decryption, the plaintext data should be hashed with SHA-1,
   not including the prefix data 

The reason this is important is that it can help to prevent these attacks
which involve controlled modification to the plaintext.  Since the hash
includes the block of prefix data, which is hidden to the attacker,
he cannot predict what the hash is before his modifications, even if he
knows the entire message; and nor can he predict what the hash should be
after modification.  So he can't do as Trevor Perrin describes below,
rearranging blocks, or XORing data into an existing message, and then
compensating for his changes by XORing an appropriate value into the hash.

Guessing the prefix block will only have success 2^128 for the AES and
Twofish ciphers where we mostly use the MDC, or 2^64 for the older ciphers
if it is used there.  In either case this is a very low chance of success.

We should correct the draft to accurately reflect the behavior of the
implementations in the field.  Hashing the prefix data improves the strength
of the MDC construction so it is important for security.

Hal Finney
NAI.com

> From: Trevor Perrin <[email-masked]>
> Subject:  RE: [Cfrg] OpenPGP security analysis
> Date:  Wed, 18 Sep 2002 13:31:27 -0700
> List-Archive: <http://www.imc.org/ietf-openpgp/mail-archive/>
> List-ID: <ietf-openpgp.imc.org>
>
>
>
> [I apologize for holding a monologue here, just wanted to close this up]
>
> >From: Trevor Perrin 
> >
> >There may other ways of making predictable modifications of 
> >the plaintext, which can also take advantage of the fact that 
> >you only need to find a collision on 4 bytes of the hash, then 
> >can bit-flip the rest.
>
> For example, copying-and-pasting a sequence of ciphertext blocks, or
> deleting a sequence, will cause a scrambled block just after each splice
> point, but these scrambled blocks will be predictable by an attacker who
> knows the plaintext, because CFB mode lets an attacker with known plaintext
> reconstruct the keystream block that follows each ciphertext block.  Thus
> the situation is similar to Bellovin's cut-and-paste attacks against
> non-integrity-protected CBC, with the caveats:
>
>  - the attack requires the attacker know the entire plaintext string, so he
> can compute the hash value of the modified plaintext that corresponds to his
> ciphertext modifications
>
>  - the attack depends on the attacker trying out a large number of potential
> modifications, until he finds one that collides with the first X bytes of
> the current hash, where X is the number of hash bytes that reside in all but
> the last encryption block, (with a 16-byte block size and 20-byte hash,
> X=4,5,6,..,19 with probability 1/16th each)
>
> So in practice the attacker would choose a targeted modification he wanted
> to make, then choose some imperceptible modifications that he can make in an
> out-of-the-way corner of the document, and search through their permutations
> until he finds a collision.
>
> Trevor

From: Trevor Perrin <[email-masked]>
To: Trevor Perrin <[email-masked]>, "'Michael Young'" <[email-masked]>, "'David Wagner'" <[email-masked]>, "[email-masked]'" <[email-masked]>, "[email-masked]'" <[email-masked]>
Subject:  RE: [Cfrg] OpenPGP security analysis
Date:  Wed, 18 Sep 2002 13:31:27 -0700
Sender: [email-masked]

[I apologize for holding a monologue here, just wanted to close this up]

>From: Trevor Perrin 
>
>There may other ways of making predictable modifications of 
>the plaintext, which can also take advantage of the fact that 
>you only need to find a collision on 4 bytes of the hash, then 
>can bit-flip the rest.

For example, copying-and-pasting a sequence of ciphertext blocks, or
deleting a sequence, will cause a scrambled block just after each splice
point, but these scrambled blocks will be predictable by an attacker who
knows the plaintext, because CFB mode lets an attacker with known plaintext
reconstruct the keystream block that follows each ciphertext block.  Thus
the situation is similar to Bellovin's cut-and-paste attacks against
non-integrity-protected CBC, with the caveats:

 - the attack requires the attacker know the entire plaintext string, so he
can compute the hash value of the modified plaintext that corresponds to his
ciphertext modifications

 - the attack depends on the attacker trying out a large number of potential
modifications, until he finds one that collides with the first X bytes of
the current hash, where X is the number of hash bytes that reside in all but
the last encryption block, (with a 16-byte block size and 20-byte hash,
X=4,5,6,..,19 with probability 1/16th each)

So in practice the attacker would choose a targeted modification he wanted
to make, then choose some imperceptible modifications that he can make in an
out-of-the-way corner of the document, and search through their permutations
until he finds a collision.

Trevor

From: Trevor Perrin <[email-masked]>
To: Trevor Perrin <[email-masked]>, "'Michael Young'" <[email-masked]>, "'David Wagner'" <[email-masked]>, "[email-masked]'" <[email-masked]>, "[email-masked]'" <[email-masked]>
Subject:  RE: [Cfrg] OpenPGP security analysis
Date:  Tue, 17 Sep 2002 12:08:15 -0700
Sender: [email-masked]

Another attack, based on the fact that the last block containing part of the
hash is subject to bit-flipping, as David Wagner points out:

Suppose a 16-byte block size is being used, so the last 16 bytes of the SHA1
hash are subject to modification.  This means the attacker can make targeted
changes to the ciphertext, and if he is able to predict what effect these
changes have on the corresponding plaintext, then he can compute what the
new SHA1 hash should be.  If this new hash collides with the old hash in the
first 4 bytes, then he can bit-flip the last 16 bytes of the SHA1 hash to
match.  So the attacker can experimentally try around 2^31 ciphertext
modifications, and odds are one of them will collide with the unmodifiable 4
bytes of the hash, and he'll be able to make a forgery.

With CFB (which PGP uses) and known plaintext, the attacker can make
computable alterations in the plaintext by changing the ciphertext.
Px     (the xth plaintext block)
Px+1   (the x+1th plaintext block)
Py     (the yth plaintext block)
.
..

He can change the ciphertext with predictable results on the plaintext by
setting Cy=Cx.  Then he can compute:
Py   = (Py xor Cy) xor Cx
Py+1 = (Px+1 xor Cx+1) xor Cy+1

Note that the attacker can't control Py or Py+1 with precision, because if
he did targeted bit-flipping on the ciphertext he wouldn't know what that
block was encrypted as.  So this would mostly be useful for overwiting a
particular section of incriminating evidence with random data, or somesuch.

There may other ways of making predictable modifications of the plaintext,
which can also take advantage of the fact that you only need to find a
collision on 4 bytes of the hash, then can bit-flip the rest.

Trevor

From: Trevor Perrin <[email-masked]>
To: "'Michael Young'" <[email-masked]>, Trevor Perrin <[email-masked]>, "'David Wagner'" <[email-masked]>, [email-masked], [email-masked]
Subject:  RE: [Cfrg] OpenPGP security analysis
Date:  Tue, 17 Sep 2002 10:24:39 -0700
Sender: [email-masked]

>From: Michael Young [mailto:[email-masked]]
>
>But if this is the scenario, then two facts complicate the attack:
>    M and M' must be formatted as OpenPGP packets; and,

you're right, this does complicate the attack - it means that in the simple
truncation attack (where the evil message ciphertext is just a truncation of
the innocuous message ciphertext) the decrypted literal packet data length
will be wrong.

Unless there's a way to get around that, the only attack I see, then,
requires the attacker to inject make-believe check bytes and OpenPGP packet
formatting, and thus will succeed with probability only 2^-16 cause the
check bytes will probably turn out wrong. 

Trevor

From: Trevor Perrin <[email-masked]>
To: "'Michael Young'" <[email-masked]>, Trevor Perrin <[email-masked]>, "'David Wagner'" <[email-masked]>, [email-masked], [email-masked]
Subject:  RE: [Cfrg] OpenPGP security analysis
Date:  Tue, 17 Sep 2002 09:49:55 -0700
Sender: [email-masked]

>From: Michael Young [mailto:[email-masked]]
>
>[snip]
>
>Assuming the usual PGP public key model, the attacker doesn't need the
>sender to participate in this plan.  In this scenario, the attacker
>can alter message traffic from sender to receiver, so he could simply
>replace a message with is own well-formed PGP message.  
>Nothing new here.

Good point.  If the message is being secured with a passphrase instead of
the recipient's public key, however (which OpenPGP supports), the attack is
more serious, since the attacker would not normally be able to forge
passphrase-encrypted messages.

>
>This assumes that the receiver's public key is really public.
>If it's not, but you can convince the sender to encrypt arbitrary
>messages to it, then it's not really very private anyway.

The messages might not be totally arbitrary.  You might send a seemingly
innocuous (Word or PDF or XML or JPEG or whatever) document to Alice, and
say "forward this to Bob".  Alice reads the document and it looks fine, but
in some hidden field you've squirrelled away a more insidious message which
you plan on cutting out and using later.

>
>But if this is the scenario, then two facts complicate the attack:
>    M and M' must be formatted as OpenPGP packets; and,
>    the OpenPGP OFB scheme includes two redundant check bytes.

I believe the redundant check bytes reduce the probability of this attack
succeeding to 2^-16 when the insidious message is not located at the
beginning of the innocuous-looking message.  The attacker would have to cut
out the ciphertext block previous to where he spliced in his evil message,
and claim this is the ciphertext of the prefix block.  When the legitimate
recipient decrypts this first block, using CFB with an IV of 0, it will
produce bytes that are random from the attacker's perspective, and thus the
attacker won't have been able to anticipate and set the check bytes
appropriately.  If the attacker tries to modify the check bytes by bit
flipping the ciphertext and then submitting multiple tries to the recipient
until they match the prefix bytes, these modifications will be fed into CFB
and will destroy the next block of plaintext, thus invalidating the MDC
(even though the check bytes themselves aren't part of the MDC).

If the attacker places the evil message bytes at the very beginning of the
innocuous-looking message, then this caveat doesn't apply cause the sender
will set the check bytes appropriately, and the attacker just needs to
truncate.

>(I'll explain in more detail in a separate note when I get time.)
>
>The MDC in OpenPGP is really no more than a checksum, intended to
>detect accidental damage.  (In fact, during the discussion, I believe
>that some folks suggested that it be just a checksum.)  Before the
>MDC, there was little ability to detect *any* sort of accident -- not
>just truncation, but fairly arbitrary internal damage as well.  (When
>the payload is a compressed packet, the decompression might discover
>damage, but then again, it might not.)  There was discussion of a
>stronger MAC, but I think this was dropped given that OpenPGP has a
>strong signature mechanism.

The security note at the bottom of page 65 in the current draft indicates
that this MDC is a security feature, and is intended to provide message
integrity.
http://www.ietf.org/internet-drafts/draft-ietf-openpgp-rfc2440bis-06.txt

It stills seems like switching from SHA1 to HMAC-SHA1 would yield the
desired level of security, possibly using a key derivation function on the
session key to generate seemingly-independent encryption and authentication
keys, though I'm not sure if that's necessary.

Trevor

From: "Michael Young" <[email-masked]>
To: "Trevor Perrin" <[email-masked]>, "'David Wagner'" <[email-masked]>, <[email-masked]>, <[email-masked]>
Subject: Re: [Cfrg] OpenPGP security analysis
Date: Tue, 17 Sep 2002 11:20:08 -0400
Sender: [email-masked]

Subject: Re: [Cfrg] OpenPGP security analysis

Trevor Perrin <[email-masked]> forwarded a note from...
> >From: David Wagner [mailto:[email-masked]]
> >http://www.cs.berkeley.edu/~daw/my-posts/mdc-broken
[quoted here for those new to the conversation:]
    I'm not sure I understand what you mean, but there's an attack.
    Suppose you want to make the receiver think message M was sent,
    even thought the sender would never authorize this.  Then you
    should construct M' = M || H(M) || X, where X is arbitrary and
    where || denotes concatenation (it better be at block boundaries).
    Ask the sender to transmit M'; he will form M' || H(M'), encrypt
    it with CBC mode, and transmit the result.  Now you can truncate
    the ciphertext, snipping it just before the "X" part, and the
    receiver will think M was sent, which is an integrity failure.

First, I should point out that, M *was* "sent", just not by the
apparent sender.  An MDC is not a signature.  The receiver should
not treat it as such.

Trevor went on to write:
> I don't see any complications that would trip this attack up in OpenPGP's
> encryption/integrity packet type.

Assuming the usual PGP public key model, the attacker doesn't need the
sender to participate in this plan.  In this scenario, the attacker
can alter message traffic from sender to receiver, so he could simply
replace a message with is own well-formed PGP message.  Nothing new here.

This assumes that the receiver's public key is really public.
If it's not, but you can convince the sender to encrypt arbitrary
messages to it, then it's not really very private anyway.

But if this is the scenario, then two facts complicate the attack:
    M and M' must be formatted as OpenPGP packets; and,
    the OpenPGP OFB scheme includes two redundant check bytes.
(I'll explain in more detail in a separate note when I get time.)

The MDC in OpenPGP is really no more than a checksum, intended to
detect accidental damage.  (In fact, during the discussion, I believe
that some folks suggested that it be just a checksum.)  Before the
MDC, there was little ability to detect *any* sort of accident -- not
just truncation, but fairly arbitrary internal damage as well.  (When
the payload is a compressed packet, the decompression might discover
damage, but then again, it might not.)  There was discussion of a
stronger MAC, but I think this was dropped given that OpenPGP has a
strong signature mechanism.

From: Trevor Perrin <[email-masked]>
To: "'David Wagner'" <[email-masked]>, [email-masked], [email-masked]
Subject:  RE: [Cfrg] OpenPGP security analysis
Date:  Mon, 16 Sep 2002 19:48:15 -0700
Sender: [email-masked]

>-----Original Message-----
>From: David Wagner [mailto:[email-masked]]
>
>Unfortunately, Hash-then-Encrypt has known security weaknesses, in
>general.  For instance, there is a chosen-plaintext attack that 
>lets you truncate a ciphertext without detection.  See, e.g.,
>http://www.cs.berkeley.edu/~daw/my-posts/mdc-broken

I don't see any complications that would trip this attack up in OpenPGP's
encryption/integrity packet type.  If you try to place M anywhere else
within M' besides the beginning, however, you'd have to guess at and prepend
duplicate prefix bytes to M, and snip so as to include the block previous to
these, and the attack would only have a 2^-16 probability of success because
the guessed duplicate prefix bytes probably won't match whatever the initial
prefix bytes turn out to be.

It seems like this could be fixed by using HMAC-SHA1 instead of just SHA1,
with a key derived by some function of the encryption key, but I'm not
sure..

Trevor

Date: Tue, 3 Sep 2002 11:49:57 -0700
From: "Hal Finney" <[email-masked]>
To: [email-masked]
Subject: S/MIME vulnerability
Sender: [email-masked]

There is a report out recently indicating that Microsoft Outlook has a
major S/MIME security vulnerability.  See
http://online.securityfocus.com/archive/1/290107/2002-08-31/2002-09-06/0
or http://www.theregus.com/content/4/26172.html.

It is the same bug which was publicized a few weeks ago regarding SSL
site certificates.  Although at the time Microsoft claimed that the problem
was restricted to IE, it turns out that Outlook is affected too.

Basically the Microsoft software fails to distinguish which keys are
meant to be signers of other keys.  Essentially, all keys are trusted
as signers, if those keys are signed by other valid keys.  The effect
is that virtually any key can be used to sign another.

The S/MIME world uses X.509 certificates, of course, and so what it
means is that if you have a cert from Verisign, say, then you can create
certs on any key with any name you like, and the Microsoft software will
believe them.  Outlook will accept a signed message from one of these
bogus certs and will display the signer name (which you created and can
be anything you want) as valid, without any warnings or error indications.

The Bugtraq article says,

> As it stands, there is virtually no difference between signed and unsigned
> email in Outlook.  Unless carefully inspected, signed email in Outlook is
> essentially meaningless.  This also applies to any signed email received
> over the past 5+ years.

This is a very serious security vulnerability to have gone so long without
being detected.

Hal Finney