Yes, I believe the messageDigest in the ASN.1 dump is, indeed, the hash of the data that was signed.
javierm wrote: > > Ok following your quoted note, I got the asn1 structure to see what was inside there: > Which value contains the hash you mention? Is it the messageDigest? > > Thanks > > > > jkoehring wrote: >> >> >> Another way to look at it is when the original AS2 message is signed, the >> MIC for the MDN should be exactly the same as the hash used in the >> calculation of the signature for the multipart/signed. >> > > > > > $> openssl asn1parse -in SIGB64-pk7.txt > > 0:d=0 hl=4 l=1101 cons: SEQUENCE > 4:d=1 hl=2 l= 9 prim: OBJECT :pkcs7-signedData > 15:d=1 hl=4 l=1086 cons: cont [ 0 ] > 19:d=2 hl=4 l=1082 cons: SEQUENCE > 23:d=3 hl=2 l= 1 prim: INTEGER :01 > 26:d=3 hl=2 l= 11 cons: SET > 28:d=4 hl=2 l= 9 cons: SEQUENCE > 30:d=5 hl=2 l= 5 prim: OBJECT :sha1 > 37:d=5 hl=2 l= 0 prim: NULL > 39:d=3 hl=2 l= 11 cons: SEQUENCE > 41:d=4 hl=2 l= 9 prim: OBJECT :pkcs7-data > 52:d=3 hl=4 l= 643 cons: cont [ 0 ] > 56:d=4 hl=4 l= 639 cons: SEQUENCE > 60:d=5 hl=4 l= 488 cons: SEQUENCE > 64:d=6 hl=2 l= 3 cons: cont [ 0 ] > 66:d=7 hl=2 l= 1 prim: INTEGER :02 > 69:d=6 hl=2 l= 4 prim: INTEGER :468D29E6 > 75:d=6 hl=2 l= 13 cons: SEQUENCE > 77:d=7 hl=2 l= 9 prim: OBJECT :md5WithRSAEncryption > 88:d=7 hl=2 l= 0 prim: NULL > 90:d=6 hl=3 l= 131 cons: SEQUENCE > 93:d=7 hl=2 l= 11 cons: SET > 95:d=8 hl=2 l= 9 cons: SEQUENCE > 97:d=9 hl=2 l= 3 prim: OBJECT :countryName > 102:d=9 hl=2 l= 2 prim: PRINTABLESTRING :MX > 106:d=7 hl=2 l= 14 cons: SET > 108:d=8 hl=2 l= 12 cons: SEQUENCE > 110:d=9 hl=2 l= 3 prim: OBJECT :postalCode > 115:d=9 hl=2 l= 5 prim: PRINTABLESTRING :66260 > 122:d=7 hl=2 l= 11 cons: SET > 124:d=8 hl=2 l= 9 cons: SEQUENCE > 126:d=9 hl=2 l= 3 prim: OBJECT :stateOrProvinceName > 131:d=9 hl=2 l= 2 prim: PRINTABLESTRING :NL > 135:d=7 hl=2 l= 18 cons: SET > 137:d=8 hl=2 l= 16 cons: SEQUENCE > 139:d=9 hl=2 l= 3 prim: OBJECT :localityName > 144:d=9 hl=2 l= 9 prim: PRINTABLESTRING :Monterrey > 155:d=7 hl=2 l= 26 cons: SET > 157:d=8 hl=2 l= 24 cons: SEQUENCE > 159:d=9 hl=2 l= 3 prim: OBJECT :organizationName > 164:d=9 hl=2 l= 17 prim: PRINTABLESTRING :removed > 183:d=7 hl=2 l= 12 cons: SET > 185:d=8 hl=2 l= 10 cons: SEQUENCE > 187:d=9 hl=2 l= 3 prim: OBJECT :organizationalUnitName > 192:d=9 hl=2 l= 3 prim: PRINTABLESTRING :ENG > 197:d=7 hl=2 l= 25 cons: SET > 199:d=8 hl=2 l= 23 cons: SEQUENCE > 201:d=9 hl=2 l= 3 prim: OBJECT :commonName > 206:d=9 hl=2 l= 16 prim: PRINTABLESTRING :removed > 224:d=6 hl=2 l= 30 cons: SEQUENCE > 226:d=7 hl=2 l= 13 prim: UTCTIME :070705172702Z > 241:d=7 hl=2 l= 13 prim: UTCTIME :080704172702Z > 256:d=6 hl=3 l= 131 cons: SEQUENCE > 259:d=7 hl=2 l= 11 cons: SET > 261:d=8 hl=2 l= 9 cons: SEQUENCE > 263:d=9 hl=2 l= 3 prim: OBJECT :countryName > 268:d=9 hl=2 l= 2 prim: PRINTABLESTRING :MX > 272:d=7 hl=2 l= 14 cons: SET > 274:d=8 hl=2 l= 12 cons: SEQUENCE > 276:d=9 hl=2 l= 3 prim: OBJECT :postalCode > 281:d=9 hl=2 l= 5 prim: PRINTABLESTRING :66260 > 288:d=7 hl=2 l= 11 cons: SET > 290:d=8 hl=2 l= 9 cons: SEQUENCE > 292:d=9 hl=2 l= 3 prim: OBJECT :stateOrProvinceName > 297:d=9 hl=2 l= 2 prim: PRINTABLESTRING :NL > 301:d=7 hl=2 l= 18 cons: SET > 303:d=8 hl=2 l= 16 cons: SEQUENCE > 305:d=9 hl=2 l= 3 prim: OBJECT :localityName > 310:d=9 hl=2 l= 9 prim: PRINTABLESTRING :Monterrey > 321:d=7 hl=2 l= 26 cons: SET > 323:d=8 hl=2 l= 24 cons: SEQUENCE > 325:d=9 hl=2 l= 3 prim: OBJECT :organizationName > 330:d=9 hl=2 l= 17 prim: PRINTABLESTRING :removed > 349:d=7 hl=2 l= 12 cons: SET > 351:d=8 hl=2 l= 10 cons: SEQUENCE > 353:d=9 hl=2 l= 3 prim: OBJECT :organizationalUnitName > 358:d=9 hl=2 l= 3 prim: PRINTABLESTRING :ENG > 363:d=7 hl=2 l= 25 cons: SET > 365:d=8 hl=2 l= 23 cons: SEQUENCE > 367:d=9 hl=2 l= 3 prim: OBJECT :commonName > 372:d=9 hl=2 l= 16 prim: PRINTABLESTRING :removed > 390:d=6 hl=3 l= 159 cons: SEQUENCE > 393:d=7 hl=2 l= 13 cons: SEQUENCE > 395:d=8 hl=2 l= 9 prim: OBJECT :rsaEncryption > 406:d=8 hl=2 l= 0 prim: NULL > 408:d=7 hl=3 l= 141 prim: BIT STRING > 552:d=5 hl=2 l= 13 cons: SEQUENCE > 554:d=6 hl=2 l= 9 prim: OBJECT :md5WithRSAEncryption > 565:d=6 hl=2 l= 0 prim: NULL > 567:d=5 hl=3 l= 129 prim: BIT STRING > 699:d=3 hl=4 l= 402 cons: SET > 703:d=4 hl=4 l= 398 cons: SEQUENCE > 707:d=5 hl=2 l= 1 prim: INTEGER :01 > 710:d=5 hl=3 l= 140 cons: SEQUENCE > 713:d=6 hl=3 l= 131 cons: SEQUENCE > 716:d=7 hl=2 l= 11 cons: SET > 718:d=8 hl=2 l= 9 cons: SEQUENCE > 720:d=9 hl=2 l= 3 prim: OBJECT :countryName > 725:d=9 hl=2 l= 2 prim: PRINTABLESTRING :MX > 729:d=7 hl=2 l= 14 cons: SET > 731:d=8 hl=2 l= 12 cons: SEQUENCE > 733:d=9 hl=2 l= 3 prim: OBJECT :postalCode > 738:d=9 hl=2 l= 5 prim: PRINTABLESTRING :66260 > 745:d=7 hl=2 l= 11 cons: SET > 747:d=8 hl=2 l= 9 cons: SEQUENCE > 749:d=9 hl=2 l= 3 prim: OBJECT :stateOrProvinceName > 754:d=9 hl=2 l= 2 prim: PRINTABLESTRING :NL > 758:d=7 hl=2 l= 18 cons: SET > 760:d=8 hl=2 l= 16 cons: SEQUENCE > 762:d=9 hl=2 l= 3 prim: OBJECT :localityName > 767:d=9 hl=2 l= 9 prim: PRINTABLESTRING :Monterrey > 778:d=7 hl=2 l= 26 cons: SET > 780:d=8 hl=2 l= 24 cons: SEQUENCE > 782:d=9 hl=2 l= 3 prim: OBJECT :organizationName > 787:d=9 hl=2 l= 17 prim: PRINTABLESTRING :removed > 806:d=7 hl=2 l= 12 cons: SET > 808:d=8 hl=2 l= 10 cons: SEQUENCE > 810:d=9 hl=2 l= 3 prim: OBJECT :organizationalUnitName > 815:d=9 hl=2 l= 3 prim: PRINTABLESTRING :ENG > 820:d=7 hl=2 l= 25 cons: SET > 822:d=8 hl=2 l= 23 cons: SEQUENCE > 824:d=9 hl=2 l= 3 prim: OBJECT :commonName > 829:d=9 hl=2 l= 16 prim: PRINTABLESTRING :removed > 847:d=6 hl=2 l= 4 prim: INTEGER :468D29E6 > 853:d=5 hl=2 l= 9 cons: SEQUENCE > 855:d=6 hl=2 l= 5 prim: OBJECT :sha1 > 862:d=6 hl=2 l= 0 prim: NULL > 864:d=5 hl=2 l= 93 cons: cont [ 0 ] > 866:d=6 hl=2 l= 24 cons: SEQUENCE > 868:d=7 hl=2 l= 9 prim: OBJECT :contentType > 879:d=7 hl=2 l= 11 cons: SET > 881:d=8 hl=2 l= 9 prim: OBJECT :pkcs7-data > 892:d=6 hl=2 l= 28 cons: SEQUENCE > 894:d=7 hl=2 l= 9 prim: OBJECT :signingTime > 905:d=7 hl=2 l= 15 cons: SET > 907:d=8 hl=2 l= 13 prim: UTCTIME :080623140750Z > 922:d=6 hl=2 l= 35 cons: SEQUENCE > 924:d=7 hl=2 l= 9 prim: OBJECT :messageDigest > 935:d=7 hl=2 l= 22 cons: SET > 937:d=8 hl=2 l= 20 prim: OCTET STRING [HEX > DUMP]:F715D2B0C84D0D98ADD5823C3A186CADBE43DE43 > 959:d=5 hl=2 l= 13 cons: SEQUENCE > 961:d=6 hl=2 l= 9 prim: OBJECT :rsaEncryption > 972:d=6 hl=2 l= 0 prim: NULL > 974:d=5 hl=3 l= 128 prim: OCTET STRING [HEX > DUMP]:1F29519CBE7E44EC36DDDBD0C9ACC80D2E2003AC32BBEF8EA5A56EE8C0CB26A4EB964EA2CBCDA6FC023F6953D9EB65C5642EF6CA0D0C6060CEE605C7BE5BA2140D4350F579DFA3AC601F5265C0D5F7458383D7E3A756FED95A42313EF323606B4EDCA227B14E5AD29458C76CBBDA5ACC0D18D9D573DB6FECDE3BD6DBF3A58F87 > > > > > -- View this message in context: http://www.nabble.com/RFC-4130-checksum-in-SHA1-tp18034577p18094840.html Sent from the OpenSSL - User mailing list archive at Nabble.com.