How to generate private/public keys using RSA

Posted by clopes on 21-Sep-2010 08:35

Greetings,

A new policy has been issued, which will require that all documents are signed by the company and verified by a state authority.

This means that my company will have to generate a private key, which  will be kept hidden in the database, and a public key which will be  suplied to the state authority for verification purposes.

As an example www.openssl.org has been shown to us with a few examples.  After downloading and installing this aplication i am able to generate  keys and certificates from the windows command prompt.

Now the state authority asks that i sign the document, which using openssh is done using the command:

cmd>  echo  "2010-05-18;2010-05-18T11:22:19;FAC 001/14;3.12;" | openssl dgst -sha1   -sign myKeyPrivate.pem | openssl enc -base64

Which results in :

Am1K5+CP4LDNVDZYvcLYGpnu8/1b+WWkzgoe8sbZhvk6QFzFvNN77Zsq+cHNm52jCVSEDgWLGHgPS1wcT8ZG7w6KgVq+2/VgOU+xKNt0lcC3gouyarZvcZpZclIReDgLh6m3nv8DYYHKAOQc+eCi/BQ4LqUnuJrca+7emgb/kpU=

RSA algorithm and with these parameters:
Format = x.509 
Charset = UTF-8
Encoding = Base-64
Endianess = Little Endian
OAEP Padding = PKCS1 v1.5 padding
Private Key Size = 1024 bytes
Message Hash Format = SHA-1

Any help at all would be apreciated!

thanks

All Replies

This thread is closed