<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Message</TITLE>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2800.1264" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=937574019-09102003><FONT face=Arial size=2>Hello, I am in the
middle of learning all this business about XmlDigital signatures and
Encryption.</FONT></SPAN></DIV>
<DIV><SPAN class=937574019-09102003><FONT face=Arial size=2>To try and
understand things, I've been trying different libraries and trying to verify
results.</FONT></SPAN></DIV>
<DIV><SPAN class=937574019-09102003><FONT face=Arial size=2>I have run into one
issue that I was wondering if somebody could shed some light
into.</FONT></SPAN></DIV>
<DIV><SPAN class=937574019-09102003><FONT face=Arial size=2>I have the XML file
shown at the bottom of the e-mail.</FONT></SPAN></DIV>
<DIV><SPAN class=937574019-09102003><FONT face=Arial size=2>When I calculate a
signature using XmlSec, the digest value generated is:</FONT></SPAN></DIV>
<DIV><SPAN class=937574019-09102003><FONT face=Arial
size=2><DigestValue>UT4+z2LQyKSxNWWdS7VE8uTo+wE=</DigestValue><BR></FONT></SPAN></DIV>
<DIV><SPAN class=937574019-09102003><FONT face=Arial size=2>However, when I
calculate a signature on the same file using .NET, the digest value is
different:</FONT></SPAN></DIV>
<DIV><SPAN class=937574019-09102003><FONT face=Arial
size=2><DigestValue>sUD7jzvAdt3liQEkrpGsJukqftU=</DigestValue><BR></FONT></SPAN></DIV>
<DIV><SPAN class=937574019-09102003><FONT face=Arial size=2>I have tracked it
down to the following. The XmlSec library is calculating the digest on the
canonicalized form without the procession instruction </FONT></SPAN></DIV>
<DIV><SPAN class=937574019-09102003><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=937574019-09102003><FONT face=Arial size=2><?xml-stylesheet
type="text/xsl" href="myfile.xsl" ?><BR></DIV></FONT></SPAN>
<DIV><SPAN class=937574019-09102003><FONT face=Arial size=2>at the top of the
file. The .NET implementation includes the processing instruction in it's
calculation of the digest. According to what I have read, I believe that .NET is
correct to include the processing instruction in it's calculation of the
digest.</FONT></SPAN></DIV>
<DIV><SPAN class=937574019-09102003><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=937574019-09102003><FONT face=Arial size=2>Does anyone know why
this should be the case?</FONT></SPAN></DIV>
<DIV><SPAN class=937574019-09102003><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=937574019-09102003><FONT face=Arial
size=2>Thanks.</FONT></SPAN></DIV>
<DIV><SPAN class=937574019-09102003><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=937574019-09102003><FONT face=Arial size=2>--
Sanjay</FONT></SPAN></DIV>
<DIV><SPAN class=937574019-09102003><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=937574019-09102003><FONT face=Arial size=2>Here is the Xml
file:</FONT></SPAN></DIV>
<DIV><SPAN class=937574019-09102003><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=937574019-09102003><FONT face=Arial size=2><?xml
version="1.0"?><BR><?xml-stylesheet type="text/xsl" href="myfile.xsl"
?><BR><!DOCTYPE sales [<BR><!ELEMENT sales
(region*)><BR><!ATTLIST sales quarter CDATA #IMPLIED><BR><!ELEMENT
region (units, amount)><BR><!ATTLIST region name ID
#IMPLIED><BR><!ELEMENT units (#PCDATA) ><BR><!ELEMENT amount
(#PCDATA) ><BR>]><BR><sales quarter="2001-01"><BR>
<region name="Northeast"><BR>
<units>374</units><BR>
<amount>12500.26</amount><BR>
</region><BR> <region
name="Southeast"><BR>
<units>512</units><BR>
<amount>17692</amount><BR>
</region><BR> <region
name="Southwest"><BR>
<units>161</units><BR>
<amount>8349.72</amount><BR>
</region><BR> <region
name="Northwest"><BR>
<units>465</units><BR>
<amount>15239.6</amount><BR>
</region><BR></sales><BR></FONT></SPAN></DIV></BODY></HTML>