Dr. Stephen,
Thanks 

> -----Original Message-----
> From: owner-openssl-us...@openssl.org 
> [mailto:owner-openssl-us...@openssl.org] On Behalf Of Dr. 
> Stephen Henson
> Sent: Wednesday, July 08, 2009 3:18 PM
> To: openssl-users@openssl.org
> Subject: Re: Need help please: calculate SHA256.
> 
> On Wed, Jul 08, 2009, Bizhan Gholikhamseh (bgholikh) wrote:
> 
> > > 
> > > > I have a text file, let us call it test.tx, which I 
> need to send 
> > > > it through a secure mechanism to a remote site.
> > > > I have already created a pair of public and private rsa 
> key using 
> > > > openssl.
> > > > I want to use openssl to generate a sha256 hash digest 
> of the text 
> > > > file, i.e. test.tx --> test.hash.
> > > > And encrypt the hash file with my private key i.e. 
> test.hash --> 
> > > > test.sign.
> > > > I believe this process is called signing the image (I am
> > > very new in
> > > > this area).
> > > >
> > > > Any help greatly appreciated,
> > > >
> > > > --B
> > 
> > Here is the requirement I need to address:
> > "Please sign your text message using RSASSA-PKCS1-v1_5 as defined by
> > PKCS#1 v2.1 specification using SHA256 hash algorithm.  
> Please treat 
> > your text message as a big endian byte stream."
> > 
> > I hope this clarify the question I am trying to find answer for.
> > 
> 
> Try:
> 
> openssl dgst -sha256 -sign privkey.pem -out sig.bin textfile.txt
> 
> where "privkey.pem" is the private key, "textfile.txt" is 
> whatever message you are signing and it should produce the 
> file sig.bin with the signature included.
> 
> Steve.
> --
> Dr Stephen N. Henson. OpenSSL project core developer.
> Commercial tech support now available see: 
> http://www.openssl.org 
> ______________________________________________________________________
> OpenSSL Project                                 http://www.openssl.org
> User Support Mailing List                    openssl-users@openssl.org
> Automated List Manager                           majord...@openssl.org
> 
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to