Can anyone help me with the procedure to calculate the message integrity
check in this RFC?

it's about calculating the sha1 checksum over a multipart message.
  
This is the text in the RFC (http://www.ietf.org/rfc/rfc4130.txt), chapter
7.1, paragraph 8)

   The EC Interchange and the RFC 1767 MIME EDI content header can
   actually be part of a multi-part MIME content-type.  When the EDI
   Interchange is part of a multi-part MIME content-type, the MIC MUST
   be calculated across the entire multi-part content, including the
   MIME headers.


My problem is that i think I understood, but another software gives me a
different checksum for the same message.


I canonicalize headers, no problem
I process signature of message with openssl which provides a multipart file
I calculate sha1 over exactly that output file


Is there something done wrong in this procedure?  Whant to try some
examples?
This file is a multipart output from openssl 
http://www.nabble.com/file/p18034577/mictest.txt mictest.txt 

Ok, not directly.  Because openssl produces the base64 signature, which I
detach to then transform to binary or "DER" and I attach it back, with the
corresponding change in Content-enconding: binary.

For this file I get IpWFspJ2hKwfja5CkOPnDW2ctT8= 
The other trading partner says: Uiaz1kOChhlSb/f3SJsmJ/O/8SI= 

Could this be a mere misunderstanding of the RFC?, I've seen  way different
"interpretations" on the net, which I have tried but don't work either.

Well thanks for the help
-- 
View this message in context: 
http://www.nabble.com/RFC-4130-checksum-in-SHA1-tp18034577p18034577.html
Sent from the OpenSSL - User mailing list archive at Nabble.com.

Reply via email to