From 2bfdfca30831a55b938fedf1c8737d4674fb709d Mon Sep 17 00:00:00 2001 From: lloyd Date: Mon, 13 Oct 2008 18:21:14 +0000 Subject: Add Doxygen comments to if_algo.h (from InSiTo) --- src/pubkey/if_algo/if_algo.h | 39 ++++++++++++++++++++++++++++++++------- 1 file changed, 32 insertions(+), 7 deletions(-) (limited to 'src/pubkey/if_algo/if_algo.h') diff --git a/src/pubkey/if_algo/if_algo.h b/src/pubkey/if_algo/if_algo.h index c58b2cb8f..7afd7fed5 100644 --- a/src/pubkey/if_algo/if_algo.h +++ b/src/pubkey/if_algo/if_algo.h @@ -12,15 +12,25 @@ namespace Botan { -/************************************************* -* IF Public Key * -*************************************************/ +/** +* This class represents public keys +* of integer factorization based (IF) public key schemes. +*/ class BOTAN_DLL IF_Scheme_PublicKey : public virtual Public_Key { public: bool check_key(RandomNumberGenerator& rng, bool) const; + /** + * Get n = p * q. + * @return n + */ const BigInt& get_n() const { return n; } + + /** + * Get the public exponent used by the key. + * @return the public exponent + */ const BigInt& get_e() const { return e; } u32bit max_input_bits() const { return (n.bits() - 1); } @@ -33,17 +43,32 @@ class BOTAN_DLL IF_Scheme_PublicKey : public virtual Public_Key IF_Core core; }; -/************************************************* -* IF Private Key * -*************************************************/ +/** +* This class represents public keys +* of integer factorization based (IF) public key schemes. +*/ class BOTAN_DLL IF_Scheme_PrivateKey : public virtual IF_Scheme_PublicKey, - public virtual Private_Key + public virtual Private_Key { public: bool check_key(RandomNumberGenerator& rng, bool) const; + /** + * Get the first prime p. + * @return the prime p + */ const BigInt& get_p() const { return p; } + + /** + * Get the second prime q. + * @return the prime q + */ const BigInt& get_q() const { return q; } + + /** + * Get d with exp * d = 1 mod (p - 1, q - 1). + * @return d + */ const BigInt& get_d() const { return d; } PKCS8_Encoder* pkcs8_encoder() const; -- cgit v1.2.3