Created
June 24, 2011 11:32
-
-
Save zacharyvoase/1044611 to your computer and use it in GitHub Desktop.
DSA signing using openssl CLI
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
openssl dsaparam 1024 < /dev/random > dsa_param.pem | |
openssl gendsa dsa_param.pem -out dsa_priv.pem | |
openssl dsa -in dsa_priv.pem -pubout -out dsa_pub.pem | |
# DSA system now made up of: dsa_param.pem, dsa_pub.pem, dsa_priv.pem | |
echo "foobar" > foo.txt | |
openssl sha1 < foo.txt > foo.txt.sha1 | |
openssl dgst -dss1 -sign dsa_priv.pem foo.txt.sha1 > foo.txt.sig | |
openssl dgst -dss1 -verify dsa_pub.pem -signature foo.txt.sig foo.txt.sha1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment