aboutsummaryrefslogtreecommitdiffstats
path: root/src/pubkey
diff options
context:
space:
mode:
authorlloyd <[email protected]>2008-10-13 18:21:14 +0000
committerlloyd <[email protected]>2008-10-13 18:21:14 +0000
commit2bfdfca30831a55b938fedf1c8737d4674fb709d (patch)
treedb8770814270a897fb713f056d536e4de68782f1 /src/pubkey
parent63718b1e9a14ba211610daf867b338557baa5f1a (diff)
Add Doxygen comments to if_algo.h (from InSiTo)
Diffstat (limited to 'src/pubkey')
-rw-r--r--src/pubkey/if_algo/if_algo.h39
1 files changed, 32 insertions, 7 deletions
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;