summaryrefslogtreecommitdiff
path: root/ida.h
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2016-10-26 00:38:51 -0400
committerJeffrey Walton <noloader@gmail.com>2016-10-26 00:38:51 -0400
commitc77029f142e053ee6b1735144abe82baf4bd96d9 (patch)
tree5b7ecf1cd592aa3a3c6577eb584f9d59214f0ee2 /ida.h
parent374105198d4472f511f23300aaa6912079173c3e (diff)
downloadcryptopp-git-c77029f142e053ee6b1735144abe82baf4bd96d9.tar.gz
Updated documentation for Crypto++ 1.0 algorithms
Diffstat (limited to 'ida.h')
-rw-r--r--ida.h34
1 files changed, 29 insertions, 5 deletions
diff --git a/ida.h b/ida.h
index 525a7d65..0532a816 100644
--- a/ida.h
+++ b/ida.h
@@ -1,7 +1,7 @@
// ida.h - written and placed in the public domain by Wei Dai
//! \file ida.h
-//! \brief Classes for Information Dispersal Algorithm (IDA)
+//! \brief Classes for Rabin's Information Dispersal and Shamir's Secret Sharing algorithms
#ifndef CRYPTOPP_IDA_H
#define CRYPTOPP_IDA_H
@@ -16,7 +16,9 @@
NAMESPACE_BEGIN(CryptoPP)
-/// base class for secret sharing and information dispersal
+//! \class RawIDA
+//! \brief Secret sharing and information dispersal base class
+//! \since Crypto++ 1.0
class RawIDA : public AutoSignaling<Unflushable<Multichannel<Filter> > >
{
public:
@@ -61,10 +63,15 @@ protected:
SecBlock<word32> m_u, m_w, m_y;
};
-/// a variant of Shamir's Secret Sharing Algorithm
+//! \class SecretSharing
+//! \brief Shamir's Secret Sharing Algorithm
+//! \details SecretSharing is a variant of Shamir's secret sharing algorithm
+//! \sa SecretRecovery, SecretRecovery, InformationDispersal, InformationRecovery
+//! \since Crypto++ 1.0
class SecretSharing : public CustomFlushPropagation<Filter>
{
public:
+ //! \brief Construct a SecretSharing
SecretSharing(RandomNumberGenerator &rng, int threshold, int nShares, BufferedTransformation *attachment=NULL, bool addPadding=true)
: m_rng(rng), m_ida(new OutputProxy(*this, true))
{
@@ -82,10 +89,15 @@ protected:
bool m_pad;
};
-/// a variant of Shamir's Secret Sharing Algorithm
+//! \class SecretRecovery
+//! \brief Shamir's Secret Sharing Algorithm
+//! \details SecretSharing is a variant of Shamir's secret sharing algorithm
+//! \sa SecretRecovery, SecretRecovery, InformationDispersal, InformationRecovery
+//! \since Crypto++ 1.0
class SecretRecovery : public RawIDA
{
public:
+ //! \brief Construct a SecretRecovery
SecretRecovery(int threshold, BufferedTransformation *attachment=NULL, bool removePadding=true)
: RawIDA(attachment)
{IsolatedInitialize(MakeParameters("RecoveryThreshold", threshold)("RemovePadding", removePadding));}
@@ -100,9 +112,16 @@ protected:
};
/// a variant of Rabin's Information Dispersal Algorithm
+
+//! \class InformationDispersal
+//! \brief Rabin's Information Dispersal Algorithm
+//! \details InformationDispersal is a variant of Rabin's information dispersal algorithm
+//! \sa SecretRecovery, SecretRecovery, InformationDispersal, InformationRecovery
+//! \since Crypto++ 1.0
class InformationDispersal : public CustomFlushPropagation<Filter>
{
public:
+ //! \brief Construct a InformationDispersal
InformationDispersal(int threshold, int nShares, BufferedTransformation *attachment=NULL, bool addPadding=true)
: m_ida(new OutputProxy(*this, true)), m_pad(false), m_nextChannel(0)
{
@@ -120,10 +139,15 @@ protected:
unsigned int m_nextChannel;
};
-/// a variant of Rabin's Information Dispersal Algorithm
+//! \class InformationRecovery
+//! \brief Rabin's Information Dispersal Algorithm
+//! \details InformationDispersal is a variant of Rabin's information dispersal algorithm
+//! \sa SecretRecovery, SecretRecovery, InformationDispersal, InformationRecovery
+//! \since Crypto++ 1.0
class InformationRecovery : public RawIDA
{
public:
+ //! \brief Construct a InformationRecovery
InformationRecovery(int threshold, BufferedTransformation *attachment=NULL, bool removePadding=true)
: RawIDA(attachment), m_pad(false)
{IsolatedInitialize(MakeParameters("RecoveryThreshold", threshold)("RemovePadding", removePadding));}