[EMAIL PROTECTED] wrote:
> 
> Hi all,
> I want to wrap data into the SEQUENCE (PKCS#1)
> 
> DigestInfo ::= SEQUENCE {
>      digestAlgorithm DigestAlgorithmIdentifier,
>      digest Digest
> }
> 
> and then DER encode it.
> 
> Using OpenSSL 0.9.6b (EVP and ASN1 routines) I'm able to obtain the
> digested data as OCTET STRING, but how can I build and encode
> the final SEQUENCE?
> 
> Looking in the ASN1 sources I found a X509_SIG object;
> can I use it for my job?
> 

Yes X509_SIG is OpenSSLs version of DigestInfo. However if you wan't to
do PKCS#1 operations then OpenSSL already supports them through its
RSA_sign, RSA_verify EVP_Sign*() and EVP_Verify*() APIs.

Steve.
-- 
Dr Stephen N. Henson.   http://www.drh-consultancy.demon.co.uk/
Personal Email: [EMAIL PROTECTED] 
Senior crypto engineer, Gemplus: http://www.gemplus.com/
Core developer of the   OpenSSL project: http://www.openssl.org/
Business Email: [EMAIL PROTECTED] PGP key: via homepage.
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to