Wednesday, March 17, 2010

Sign & Verify using openssl

http://www.madboa.com/geek/openssl/
http://en.wikibooks.org/wiki/Transwiki:Generate_a_keypair_using_OpenSSL

$ openssl genrsa -out mykey.pem 1024
$ openssl rsa -pubout -in mykey.pem -out pubkey.pem
$ openssl dgst -sha1 -sign mykey.pem -out test.tbz2.sha1 test.tbz2
$ openssl dgst -sha1 -verify public_key.pem -signature test.tbz2.sha1 test.tbz2

No comments:

Related Posts Plugin for WordPress, Blogger...