RE: QUESTIONS ?

"Apvrille, Axelle" <[email protected]> Wed, 17 Jul 2002 16:46:49 +0100
Newsgroups gmane.ietf.xmldsig
Message-ID <182AA61AC50CD4118E8400805F0DF6290261ED10@tou-msg01.europe.stortek.com>

This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C22DA9.2A225050
Content-Type: text/plain;
	charset="iso-8859-1"

Hi Phil,
Your answer is very interesting. Actually, I do not think XER can completely
help solve the problem for time stamps -- but maybe I'm wrong. 
I'll try to explain why (but do give me your opinion about that):

the problem is that for time stamping, the time stamp token is first DER
encoded and then included as a signed attribute in a CMS structure.
Now, suppose you XER encode the time stamp. Okay, then, you're going to get
something "nice" for the CMS wrapping, but inside, when you get down to the
signed attribute for time stamping, you'll get an OCTET STRING... which is
the DER encoding of the time stamp token. No way XER can produce something
nice out of that, except if we XER recursively that field...
So, for a time stamp, we'd get something like:
<CMS>
 <Version> 1 </Version>
 <ContentInfo>
	<Type> id-SignedData </Type>
	<Content> <EncapsulatedContentInfo> ...
	<SignedAttributes>
		<Attr> 
			<type> id-timestamping </type>
			<value> 3082104150454 ... </value>
		</Attr>
	</SignedAttributes>
	...	
 </ContentInfo>
</CMS>
(This is roughly what it would show -- I'm writing this by memory, it's
maybe not the exact names).

The problem is that our goal was to read the time stamp token (included in
3082...): we've got an XML output for the CMS message (that's nice, but is
it really useful ?) but nothing for the real payload information...

Unless we can recursively XER encode fields, I do not see how we can get XER
to "output" something really useful -- in the case of time stamps (I'm not
saying XER is not useful at all !).

Is this clear ? Am I wrong about XER ? 
Thanks again for your mail,

Axelle Apvrille.

------_=_NextPart_001_01C22DA9.2A225050
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2653.12">
<TITLE>RE: QUESTIONS ?</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=3D2>Hi Phil,</FONT>
<BR><FONT SIZE=3D2>Your answer is very interesting. Actually, I do not =
think XER can completely help solve the problem for time stamps -- but =
maybe I'm wrong. </FONT></P>

<P><FONT SIZE=3D2>I'll try to explain why (but do give me your opinion =
about that):</FONT>
</P>

<P><FONT SIZE=3D2>the problem is that for time stamping, the time stamp =
token is first DER encoded and then included as a signed attribute in a =
CMS structure.</FONT></P>

<P><FONT SIZE=3D2>Now, suppose you XER encode the time stamp. Okay, =
then, you're going to get something &quot;nice&quot; for the CMS =
wrapping, but inside, when you get down to the signed attribute for =
time stamping, you'll get an OCTET STRING... which is the DER encoding =
of the time stamp token. No way XER can produce something nice out of =
that, except if we XER recursively that field...</FONT></P>

<P><FONT SIZE=3D2>So, for a time stamp, we'd get something like:</FONT>
<BR><FONT SIZE=3D2>&lt;CMS&gt;</FONT>
<BR><FONT SIZE=3D2>&nbsp;&lt;Version&gt; 1 &lt;/Version&gt;</FONT>
<BR><FONT SIZE=3D2>&nbsp;&lt;ContentInfo&gt;</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT =
SIZE=3D2>&lt;Type&gt; id-SignedData &lt;/Type&gt;</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT =
SIZE=3D2>&lt;Content&gt; &lt;EncapsulatedContentInfo&gt; ...</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT =
SIZE=3D2>&lt;SignedAttributes&gt;</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2>&lt;Attr&gt; =
</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2>&lt;type&gt; =
id-timestamping &lt;/type&gt;</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2>&lt;value&gt; =
3082104150454 ... &lt;/value&gt;</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT =
SIZE=3D2>&lt;/Attr&gt;</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT =
SIZE=3D2>&lt;/SignedAttributes&gt;</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT =
SIZE=3D2>...&nbsp;&nbsp;&nbsp;&nbsp; </FONT>
<BR><FONT SIZE=3D2>&nbsp;&lt;/ContentInfo&gt;</FONT>
<BR><FONT SIZE=3D2>&lt;/CMS&gt;</FONT>
<BR><FONT SIZE=3D2>(This is roughly what it would show -- I'm writing =
this by memory, it's maybe not the exact names).</FONT>
</P>

<P><FONT SIZE=3D2>The problem is that our goal was to read the time =
stamp token (included in 3082...): we've got an XML output for the CMS =
message (that's nice, but is it really useful ?) but nothing for the =
real payload information...</FONT></P>

<P><FONT SIZE=3D2>Unless we can recursively XER encode fields, I do not =
see how we can get XER to &quot;output&quot; something really useful -- =
in the case of time stamps (I'm not saying XER is not useful at all =
!).</FONT></P>

<P><FONT SIZE=3D2>Is this clear ? Am I wrong about XER ? </FONT>
<BR><FONT SIZE=3D2>Thanks again for your mail,</FONT>
</P>

<P><FONT SIZE=3D2>Axelle Apvrille.</FONT>
</P>

</BODY>
</HTML>
------_=_NextPart_001_01C22DA9.2A225050--