[45765] in cryptography@c2.net mail archive

home help back first fref pref prev next nref lref last post

RE: Exponent 3 damage spreads...

daemon@ATHENA.MIT.EDU (Peter Gutmann)
Sat Sep 23 08:53:12 2006

X-Original-To: cryptography@metzdowd.com
X-Original-To: cryptography@metzdowd.com
From: pgut001@cs.auckland.ac.nz (Peter Gutmann)
To: leichter_jerrold@emc.com, pgut001@cs.auckland.ac.nz
Cc: cryptography@metzdowd.com, Ulrich.Kuehn@telekom.de
In-Reply-To: <Pine.SOL.4.61.0609211813400.12287@mental>
Date: Sat, 23 Sep 2006 01:50:19 +1200

"Leichter, Jerry" <leichter_jerrold@emc.com> writes:
>| I don't think it's a problem, you just take the ASN.1 DigestInfo
>| value, since the trailing garbage isn't part of the DigestInfo, you
>| ignore it.  Specifically, the ASN.1 object is entirely self-contained,
>| so you can tell exactly where it ends and what it contains.  Anything
>| outside it is beyond the scope of this specification :-).
>
>This is a rather peculiar interpretation of the spec.  If I look at a C
>specification and it tells me that an integer is a string of digits, when I
>write a C compiler, am I permitted to say that "123@#&%" can be parsed as an
>"entirely contained" integer, with the "@#&%" "beyond the scope of the
>specification"?

No, because the compiler doesn't use a TLV encoding as ASN.1 does.  Take
something like an MPEG, JPEG, MP3, or some other piece of data that uses a TLV
encoding with a clearly defined (by the data) end.  Cat some extra garbage
onto the end of it, and try and view/play it.  If it's a proper TLV encoding
(rather than a TV encoding, i.e. no explicit length info included) then the
decoder/player will ignore the extra garbage at the end*.  That's the whole
point of TLV encodings, you know a priori when to stop, and stop exactly at
that point.

Peter.

* There are some that might keep reading in the hope that something else crops
  up, I don't know, but the ones I've looked at don't care if there's extra
  junk at the end.  This goes back at least as far as CP/M, where you could
  have extra ^Z's and other junk at the end of files that apps had to avoid
  ploughing into.
  

---------------------------------------------------------------------
The Cryptography Mailing List
Unsubscribe by sending "unsubscribe cryptography" to majordomo@metzdowd.com

home help back first fref pref prev next nref lref last post