Creating Digest for multipart/signed message with authenticated attributes - Please get back to me

"Frank" <[email protected]> Mon, 26 Jun 2000 14:41:38 +0530
Newsgroups gmane.ietf.smime-dev,gmane.spam.detected
Message-ID <[email protected]>
This is a multi-part message in MIME format.

------=_NextPart_000_0000_01BFDF7C.A2955E60
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

Hi
 I have an intial MIME entity as follows:
   --boundary
 Content-Type: text/plain; charset=us-ascii;
 Content-Transfer-Encoding: 7bit

 Hello World
 --boundary
Content-Type: application/x-pkcs-signature;
---
---

I am creating a multipart/signed message with authenticated attributes.

To create the initial message digest I am sending the following as input to
create digest function:

Content-Type: text/plain; charset=us-ascii;
Content-Transfer-Encoding: 7bit

 Hello World

The last byte that goes for digest creation is the 'd'   in "Hello World".
When I compare this digest with the digest created by Netscape Messenger for
the same content, I am getting a different digest. The digest algorithm in
both the cases are SHA-1. Am I missing something in my input to the digest
creation?

I am sending the message digest of this to the value field of the attribute
type 'message digest' in the authenticated attributes. To create the final
digest for signing, I am taking as input the DER encoding of the SETOF
authenticated attributes field. Am I on the right track? Can someone advice
me with these two points? Thank you ver much for the time.

John and Blake, sorry for the mail to your personal mail account. I have not
yet received any advice for this query I posted two days ago. Please advice
me in this regard. Thank you.

Cheers

Frank

------=_NextPart_000_0000_01BFDF7C.A2955E60
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN">
<HTML>
<HEAD>

<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D'"MSHTML 4.72.3110.7"' name=3DGENERATOR>
</HEAD>
<BODY bgColor=3D#d8d0c8>
<DIV>
<DIV><SPAN class=3D970430707-23062000><FONT color=3D#000000 face=3DArial =

size=3D2>Hi</FONT></SPAN></DIV>
<DIV><SPAN class=3D970430707-23062000><FONT color=3D#000000 face=3DArial =

size=3D2></FONT></SPAN>&nbsp;<SPAN class=3D970430707-23062000><FONT =
color=3D#000000=20
face=3DArial size=3D2>I have an intial MIME entity as =
follows:</FONT></SPAN></DIV>
<DIV><SPAN class=3D970430707-23062000><FONT color=3D#000000 face=3DArial =

size=3D2></FONT></SPAN>&nbsp;<SPAN class=3D970430707-23062000><FONT =
color=3D#000000=20
face=3DArial size=3D2>&nbsp; --boundary</FONT></SPAN></DIV>
<DIV><SPAN class=3D970430707-23062000><FONT color=3D#000000 face=3DArial =

size=3D2>&nbsp;Content-Type: text/plain; =
charset=3Dus-ascii;</FONT></SPAN></DIV>
<DIV><SPAN class=3D970430707-23062000><FONT color=3D#000000 face=3DArial =

size=3D2>&nbsp;Content-Transfer-Encoding: 7bit</FONT></SPAN></DIV>
<DIV><SPAN class=3D970430707-23062000><FONT color=3D#000000 face=3DArial =

size=3D2>&nbsp;</FONT></SPAN></DIV>
<DIV><SPAN class=3D970430707-23062000><FONT color=3D#000000 face=3DArial =

size=3D2>&nbsp;Hello World</FONT></SPAN></DIV>
<DIV><SPAN class=3D970430707-23062000><FONT color=3D#000000 face=3DArial =
size=3D2><SPAN=20
class=3D970430707-23062000><FONT color=3D#000000 face=3DArial=20
size=3D2>&nbsp;--boundary</FONT></SPAN>&nbsp;</FONT></SPAN></DIV>
<DIV><SPAN class=3D970430707-23062000><FONT color=3D#000000 face=3DArial =

size=3D2>Content-Type: application/x-pkcs-signature;</FONT></SPAN></DIV>
<DIV><SPAN class=3D970430707-23062000><FONT color=3D#000000 face=3DArial =

size=3D2>---</FONT></SPAN></DIV>
<DIV><SPAN class=3D970430707-23062000><FONT color=3D#000000 face=3DArial =

size=3D2>---</FONT></SPAN></DIV>
<DIV>&nbsp;</DIV>
<DIV><SPAN class=3D970430707-23062000><FONT color=3D#000000 face=3DArial =
size=3D2>I am=20
creating a multipart/signed message with authenticated=20
attributes.</FONT></SPAN></DIV>
<DIV><SPAN class=3D970430707-23062000><FONT color=3D#000000 face=3DArial =

size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D970430707-23062000><FONT color=3D#000000 face=3DArial =
size=3D2>To=20
create the initial message digest I am sending the following as input to =
create=20
digest function:</FONT></SPAN></DIV>
<DIV><SPAN class=3D970430707-23062000><FONT color=3D#000000 face=3DArial =

size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV>Content-Type: text/plain; charset=3Dus-ascii;=20
<DIV><SPAN class=3D970430707-23062000><FONT color=3D#000000 face=3DArial =

size=3D2>Content-Transfer-Encoding: 7bit</FONT></SPAN></DIV>
<DIV><SPAN class=3D970430707-23062000><FONT color=3D#000000 face=3DArial =

size=3D2>&nbsp;</FONT></SPAN></DIV>
<DIV><SPAN class=3D970430707-23062000><FONT color=3D#000000 face=3DArial =

size=3D2>&nbsp;Hello World</FONT></SPAN></DIV></DIV>
<DIV><SPAN class=3D970430707-23062000><FONT color=3D#000000 face=3DArial =

size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D970430707-23062000><FONT color=3D#000000 face=3DArial =
size=3D2>The=20
last byte <SPAN class=3D510035908-26062000><FONT color=3D#000000 =
face=3DArial=20
size=3D2>that goes for digest creation is </FONT></SPAN>the 'd'<SPAN=20
class=3D510035908-26062000><FONT color=3D#000000 face=3DArial =
size=3D2>&nbsp;&nbsp; in=20
&quot;Hello World&quot;</FONT></SPAN>.&nbsp; When I compare this digest =
with the=20
digest created by Netscape Messenger for the same content, I am getting =
a=20
different digest. The digest algorithm in both the cases are SHA-1. Am I =
missing=20
something in my input to the digest creation? </FONT></SPAN></DIV>
<DIV><SPAN class=3D970430707-23062000><FONT color=3D#000000 face=3DArial =

size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D970430707-23062000><FONT color=3D#000000 face=3DArial =
size=3D2>I am=20
sending the message digest of this to the value field of the attribute =
type=20
'message digest' in the authenticated attributes. To create the final =
digest for=20
signing, I am taking as input the DER encoding of the SETOF =
authenticated=20
attributes field. Am I on the right track? Can someone advice me with =
these two=20
points? Thank you ver much for the time.</FONT></SPAN></DIV>
<DIV><SPAN class=3D970430707-23062000><FONT color=3D#000000 face=3DArial =

size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D510035908-26062000><FONT color=3D#000000 face=3DArial =
size=3D2>John=20
and Blake, sorry for the mail to your personal mail account. I have not =
yet=20
received any advice for this query I posted two days ago. Please advice =
me in=20
this regard. Thank you.</FONT></SPAN></DIV>
<DIV>&nbsp;</DIV>
<DIV><SPAN class=3D970430707-23062000><FONT color=3D#000000 face=3DArial =

size=3D2>Cheers</FONT></SPAN></DIV>
<DIV><SPAN class=3D970430707-23062000><FONT color=3D#000000 face=3DArial =

size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D970430707-23062000><FONT color=3D#000000 face=3DArial =

size=3D2>Frank&nbsp;&nbsp; </FONT></SPAN></DIV></DIV></BODY></HTML>

------=_NextPart_000_0000_01BFDF7C.A2955E60--