Thursday, April 17, 2014

Cryptographic: Digital Signature Algorithms

RSA 2048 Private key and Public Key Pair Generation
Example 1:
$ openssl genrsa -out privkey.pem 2048
$ openssl rsa -pubout -in privkey.pem -out pubkey.pem

Example 2:
# Generate aes256 encrypted private key
$ openssl genrsa -aes256 -out privkey.pem 2048

# Generate public key from previously created private key.
$ openssl rsa -pubout -in privkey.pem -out pubkey.pem

Elliptic Curve DSA
# Generating params file
$ openssl ecparam -name prime256v1 -out ecparams.pem

# Generate a private key from params file
$ openssl ecparam -in ecparams.pem -genkey -noout -out ecprivkey.pem

# Generate a public key from private key
$ openssl ec -in ecprivkey.pem -pubout -out ecpubkey.pem


Ref:
Crypto Key Length Recommendation

No comments: