diff options
author | René Korthaus <[email protected]> | 2016-10-18 11:41:33 +0200 |
---|---|---|
committer | René Korthaus <[email protected]> | 2016-10-19 09:13:38 +0200 |
commit | 61a7875fb261a049c70382517e83176b4108bb61 (patch) | |
tree | 0cf884b160918002abb72c53868152fa574668fb /src/lib/pubkey/dsa | |
parent | 47532b63e947e020df15a03d91f9d67657cd11dd (diff) |
Improve pubkey doxygen [ci skip]
Diffstat (limited to 'src/lib/pubkey/dsa')
-rw-r--r-- | src/lib/pubkey/dsa/dsa.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/lib/pubkey/dsa/dsa.h b/src/lib/pubkey/dsa/dsa.h index 57c7b7c5c..5ca7b8698 100644 --- a/src/lib/pubkey/dsa/dsa.h +++ b/src/lib/pubkey/dsa/dsa.h @@ -25,12 +25,22 @@ class BOTAN_DLL DSA_PublicKey : public virtual DL_Scheme_PublicKey size_t message_part_size() const override { return group_q().bytes(); } size_t max_input_bits() const override { return group_q().bits(); } + /** + * Load a public key. + * @param alg_id the X.509 algorithm identifier + * @param key_bits DER encoded public key bits + */ DSA_PublicKey(const AlgorithmIdentifier& alg_id, const secure_vector<byte>& key_bits) : DL_Scheme_PublicKey(alg_id, key_bits, DL_Group::ANSI_X9_57) { } + /** + * Create a public key. + * @param group the underlying DL group + * @param y the public value y = g^x mod p + */ DSA_PublicKey(const DL_Group& group, const BigInt& y); std::unique_ptr<PK_Ops::Verification> @@ -47,10 +57,22 @@ class BOTAN_DLL DSA_PrivateKey : public DSA_PublicKey, public virtual DL_Scheme_PrivateKey { public: + /** + * Load a private key. + * @param alg_id the X.509 algorithm identifier + * @param key_bits PKCS#8 structure + * @param rng the RNG to use + */ DSA_PrivateKey(const AlgorithmIdentifier& alg_id, const secure_vector<byte>& key_bits, RandomNumberGenerator& rng); + /** + * Create a private key. + * @param rng the RNG to use + * @param group the underlying DL group + * @param private_key the private key (if zero, a new random key is generated) + */ DSA_PrivateKey(RandomNumberGenerator& rng, const DL_Group& group, const BigInt& private_key = 0); |