diff options
author | lloyd <[email protected]> | 2011-04-11 20:45:39 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2011-04-11 20:45:39 +0000 |
commit | 053e8963882df7f24797697fc7689e8a32267c95 (patch) | |
tree | c738abe5b85113f44f7a8fcb971108549e1085e2 /doc/pubkey.txt | |
parent | e10bc6d60af2b53df8fa3933100c8153cee91841 (diff) |
Example updates1.9.16
Diffstat (limited to 'doc/pubkey.txt')
-rw-r--r-- | doc/pubkey.txt | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/doc/pubkey.txt b/doc/pubkey.txt index 538710441..07aa0be80 100644 --- a/doc/pubkey.txt +++ b/doc/pubkey.txt @@ -83,6 +83,27 @@ ECDSA, ECDH, or GOST 34.10 private key with .. cpp:function:: GOST_3410_PrivateKey::GOST_3410_PrivateKey(RandomNumberGenerator& rng, const EC_Group& domain, const BigInt& x = 0) + +Generating RSA keys +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +This example will generate an RSA key of a specified bitlength, and +put it into a pair of key files. One is the public key in X.509 format +(PEM encoded), the private key is in PKCS #8 format (also PEM +encoded), either encrypted or unencrypted depending on if a password +was given. + +.. literalinclude:: examples/rsa_kgen.cpp + +Generate DSA keys +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +This example generates a 2048 bit DSA key + +.. literalinclude:: examples/dsa_kgen.cpp + + + .. _serializing_private_keys: Serializing Private Keys Using PKCS #8 |