aboutsummaryrefslogtreecommitdiffstats
path: root/doc/pubkey.txt
diff options
context:
space:
mode:
authorlloyd <[email protected]>2011-04-11 20:45:39 +0000
committerlloyd <[email protected]>2011-04-11 20:45:39 +0000
commit053e8963882df7f24797697fc7689e8a32267c95 (patch)
treec738abe5b85113f44f7a8fcb971108549e1085e2 /doc/pubkey.txt
parente10bc6d60af2b53df8fa3933100c8153cee91841 (diff)
Example updates1.9.16
Diffstat (limited to 'doc/pubkey.txt')
-rw-r--r--doc/pubkey.txt21
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