> From: owner-openssl-us...@openssl.org On Behalf Of Dr. Stephen Henson > Sent: Wednesday, 20 February, 2013 19:06 > On Tue, Feb 19, 2013, Ulises S. wrote: > > > There is this odd behavior in which one in many signed > files with PKCS#7 on JAVA won't > > pass the validation with Openssl, all Openssl signed data > is correctly verified in JAVA though. > > > > Currently I have not a test case but according to certain > ppl that claim > > that there is this "remain" in some situations in which for > example JAVA > > fill with random bytes according to the RSA Labs Standard > Specification of
Either you or "certain ppl" is confused. SignedData as defined by PKCS#7 did not have anything that could reasonably be described as "remain" and randomized. RSA-PSS signatures, which didnm't exist in the timeframe PKCS#7 was written and mostly implemented, are randomized but that random is (1) always required and present and (2) opaque in the resulting signature. Ditto for DSA and ECDSA, the latter of which also didn't exist then; but most people who don't know multiple publickey algorithms exist are using RSA, just as most people who don't know multiple operating systems exist are using MSWindows. I suggest you (OP) cnofirm whether they really want the very-old RSA Labs spec (see below) or the functionally very similar but newer and maintained IETF spec CMS. > > the structure and that Openssl don't do this, I'm wondering > if this has > > something to do with the openssl.org entry: > > > > "This PKCS#7 routines only understand PKCS#7 v 1.5 as > specified in RFC2315 > > they cannot currently parse, for example, the new CMS as > described in > > RFC2630" > > > > If this is true, can someone explain with more details why > openssl don't > > follow the "standard" or explain the behavior so we can build a more > > accurate validator? > > > > PKCS#7 and CMS are two similar standards but with a few > subtle differences. Beg to differ. The *first version* of CMS was almost the same as PKCS#7. But after that no further work was done on PKCS#7 while numerous new features and extensions were added to CMS, so today CMS is maybe twice as big as fossilized PKCS#7. This is like the way TLS 1.0 was almost the same as SSL 3, but TLS 1.1 and 1.2 -- and DTLS -- have increasing differences while still sharing the basic concepts and architecture. And AFAICT both of these progressed for similar reasons. > If you want to process CMS then use the CMS routines instead. > The interface > is almost identical at the application level except the APIs > begin CMS_ > instead of PKCS7_. > And similarly the CMS_ (and SMIME_) API is quite a bit more capable than PKCS7_ -- although the part of CMS_ that implements the original PKCS7_ functionality is similar. ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager majord...@openssl.org