Update documentation

pull/723/head
Jeffrey Walton 2018-10-14 08:21:56 -04:00
parent 7bd9ffcaca
commit 23279dcd45
No known key found for this signature in database
GPG Key ID: B36AB348921B1838
6 changed files with 58 additions and 2 deletions

8
cham.h
View File

@ -31,6 +31,10 @@ NAMESPACE_BEGIN(CryptoPP)
/// \since Crypto++ 7.1 /// \since Crypto++ 7.1
struct CHAM64_Info : public FixedBlockSize<8>, public FixedKeyLength<16> struct CHAM64_Info : public FixedBlockSize<8>, public FixedKeyLength<16>
{ {
/// \brief The algorithm name
/// \returns the algorithm name
/// \details StaticAlgorithmName returns the algorithm's name as a static
/// member function.
static const std::string StaticAlgorithmName() static const std::string StaticAlgorithmName()
{ {
// Format is Cipher-Blocksize // Format is Cipher-Blocksize
@ -42,6 +46,10 @@ struct CHAM64_Info : public FixedBlockSize<8>, public FixedKeyLength<16>
/// \since Crypto++ 7.1 /// \since Crypto++ 7.1
struct CHAM128_Info : public FixedBlockSize<16>, public VariableKeyLength<16,16,32,16> struct CHAM128_Info : public FixedBlockSize<16>, public VariableKeyLength<16,16,32,16>
{ {
/// \brief The algorithm name
/// \returns the algorithm name
/// \details StaticAlgorithmName returns the algorithm's name as a static
/// member function.
static const std::string StaticAlgorithmName() static const std::string StaticAlgorithmName()
{ {
// Format is Cipher-Blocksize // Format is Cipher-Blocksize

4
lea.h
View File

@ -31,6 +31,10 @@ NAMESPACE_BEGIN(CryptoPP)
/// \since Crypto++ 7.1 /// \since Crypto++ 7.1
struct LEA_Info : public FixedBlockSize<16>, public VariableKeyLength<16,16,32,8> struct LEA_Info : public FixedBlockSize<16>, public VariableKeyLength<16,16,32,8>
{ {
/// \brief The algorithm name
/// \returns the algorithm name
/// \details StaticAlgorithmName returns the algorithm's name as a static
/// member function.
static const std::string StaticAlgorithmName() static const std::string StaticAlgorithmName()
{ {
// Format is Cipher-Blocksize // Format is Cipher-Blocksize

View File

@ -33,6 +33,10 @@ NAMESPACE_BEGIN(CryptoPP)
/// \since Crypto++ 7.1 /// \since Crypto++ 7.1
struct SIMECK32_Info : public FixedBlockSize<4>, public FixedKeyLength<8>, public FixedRounds<32> struct SIMECK32_Info : public FixedBlockSize<4>, public FixedKeyLength<8>, public FixedRounds<32>
{ {
/// \brief The algorithm name
/// \returns the algorithm name
/// \details StaticAlgorithmName returns the algorithm's name as a static
/// member function.
static const std::string StaticAlgorithmName() static const std::string StaticAlgorithmName()
{ {
// Format is Cipher-Blocksize // Format is Cipher-Blocksize
@ -44,6 +48,10 @@ struct SIMECK32_Info : public FixedBlockSize<4>, public FixedKeyLength<8>, publi
/// \since Crypto++ 7.1 /// \since Crypto++ 7.1
struct SIMECK64_Info : public FixedBlockSize<8>, public FixedKeyLength<16>, public FixedRounds<44> struct SIMECK64_Info : public FixedBlockSize<8>, public FixedKeyLength<16>, public FixedRounds<44>
{ {
/// \brief The algorithm name
/// \returns the algorithm name
/// \details StaticAlgorithmName returns the algorithm's name as a static
/// member function.
static const std::string StaticAlgorithmName() static const std::string StaticAlgorithmName()
{ {
// Format is Cipher-Blocksize // Format is Cipher-Blocksize
@ -68,7 +76,7 @@ public:
{ {
protected: protected:
void UncheckedSetKey(const byte *userKey, unsigned int keyLength, const NameValuePairs &params); void UncheckedSetKey(const byte *userKey, unsigned int keyLength, const NameValuePairs &params);
std::string AlgorithmProvider() const; std::string AlgorithmProvider() const;
FixedSizeSecBlock<word16, ROUNDS> m_rk; FixedSizeSecBlock<word16, ROUNDS> m_rk;
mutable FixedSizeSecBlock<word16, 5> m_t; mutable FixedSizeSecBlock<word16, 5> m_t;
@ -118,7 +126,7 @@ public:
{ {
protected: protected:
void UncheckedSetKey(const byte *userKey, unsigned int keyLength, const NameValuePairs &params); void UncheckedSetKey(const byte *userKey, unsigned int keyLength, const NameValuePairs &params);
std::string AlgorithmProvider() const; std::string AlgorithmProvider() const;
FixedSizeSecBlock<word32, ROUNDS> m_rk; FixedSizeSecBlock<word32, ROUNDS> m_rk;
mutable FixedSizeSecBlock<word32, 5> m_t; mutable FixedSizeSecBlock<word32, 5> m_t;

12
simon.h
View File

@ -47,6 +47,10 @@ NAMESPACE_BEGIN(CryptoPP)
template <unsigned int L, unsigned int D, unsigned int N, unsigned int M> template <unsigned int L, unsigned int D, unsigned int N, unsigned int M>
struct SIMON_Info : public FixedBlockSize<L>, VariableKeyLength<D, N, M> struct SIMON_Info : public FixedBlockSize<L>, VariableKeyLength<D, N, M>
{ {
/// \brief The algorithm name
/// \returns the algorithm name
/// \details StaticAlgorithmName returns the algorithm's name as a static
/// member function.
static const std::string StaticAlgorithmName() static const std::string StaticAlgorithmName()
{ {
// Format is Cipher-Blocksize(Keylength) // Format is Cipher-Blocksize(Keylength)
@ -90,6 +94,10 @@ public:
class CRYPTOPP_NO_VTABLE Base : protected SIMON_Base<word32>, public BlockCipherImpl<SIMON_Info<8, 12, 12, 16> > class CRYPTOPP_NO_VTABLE Base : protected SIMON_Base<word32>, public BlockCipherImpl<SIMON_Info<8, 12, 12, 16> >
{ {
public: public:
/// \brief The algorithm name
/// \returns the algorithm name
/// \details AlgorithmName returns the algorithm's name as a
/// member function.
std::string AlgorithmName() const { std::string AlgorithmName() const {
return StaticAlgorithmName() + (m_kwords == 0 ? "" : return StaticAlgorithmName() + (m_kwords == 0 ? "" :
"(" + IntToString(m_kwords*sizeof(word32)*8) + ")"); "(" + IntToString(m_kwords*sizeof(word32)*8) + ")");
@ -149,6 +157,10 @@ public:
class CRYPTOPP_NO_VTABLE Base : protected SIMON_Base<word64>, public BlockCipherImpl<SIMON_Info<16, 16, 16, 32> > class CRYPTOPP_NO_VTABLE Base : protected SIMON_Base<word64>, public BlockCipherImpl<SIMON_Info<16, 16, 16, 32> >
{ {
public: public:
/// \brief The algorithm name
/// \returns the algorithm name
/// \details AlgorithmName returns the algorithm's name as a
/// member function.
std::string AlgorithmName() const { std::string AlgorithmName() const {
return StaticAlgorithmName() + (m_kwords == 0 ? "" : return StaticAlgorithmName() + (m_kwords == 0 ? "" :
"(" + IntToString(m_kwords*sizeof(word64)*8) + ")"); "(" + IntToString(m_kwords*sizeof(word64)*8) + ")");

12
speck.h
View File

@ -47,6 +47,10 @@ NAMESPACE_BEGIN(CryptoPP)
template <unsigned int L, unsigned int D, unsigned int N, unsigned int M> template <unsigned int L, unsigned int D, unsigned int N, unsigned int M>
struct SPECK_Info : public FixedBlockSize<L>, VariableKeyLength<D, N, M> struct SPECK_Info : public FixedBlockSize<L>, VariableKeyLength<D, N, M>
{ {
/// \brief The algorithm name
/// \returns the algorithm name
/// \details StaticAlgorithmName returns the algorithm's name as a static
/// member function.
static const std::string StaticAlgorithmName() static const std::string StaticAlgorithmName()
{ {
// Format is Cipher-Blocksize(Keylength) // Format is Cipher-Blocksize(Keylength)
@ -90,6 +94,10 @@ public:
class CRYPTOPP_NO_VTABLE Base : protected SPECK_Base<word32>, public BlockCipherImpl<SPECK_Info<8, 12, 12, 16> > class CRYPTOPP_NO_VTABLE Base : protected SPECK_Base<word32>, public BlockCipherImpl<SPECK_Info<8, 12, 12, 16> >
{ {
public: public:
/// \brief The algorithm name
/// \returns the algorithm name
/// \details AlgorithmName returns the algorithm's name as a
/// member function.
std::string AlgorithmName() const { std::string AlgorithmName() const {
return StaticAlgorithmName() + (m_kwords == 0 ? "" : return StaticAlgorithmName() + (m_kwords == 0 ? "" :
"(" + IntToString(m_kwords*sizeof(word32)*8) + ")"); "(" + IntToString(m_kwords*sizeof(word32)*8) + ")");
@ -149,6 +157,10 @@ public:
class CRYPTOPP_NO_VTABLE Base : protected SPECK_Base<word64>, public BlockCipherImpl<SPECK_Info<16, 16, 16, 32> > class CRYPTOPP_NO_VTABLE Base : protected SPECK_Base<word64>, public BlockCipherImpl<SPECK_Info<16, 16, 16, 32> >
{ {
public: public:
/// \brief The algorithm name
/// \returns the algorithm name
/// \details AlgorithmName returns the algorithm's name as a
/// member function.
std::string AlgorithmName() const { std::string AlgorithmName() const {
return StaticAlgorithmName() + (m_kwords == 0 ? "" : return StaticAlgorithmName() + (m_kwords == 0 ? "" :
"(" + IntToString(m_kwords*sizeof(word64)*8) + ")"); "(" + IntToString(m_kwords*sizeof(word64)*8) + ")");

12
tea.h
View File

@ -15,6 +15,10 @@ NAMESPACE_BEGIN(CryptoPP)
/// \brief TEA block cipher information /// \brief TEA block cipher information
struct TEA_Info : public FixedBlockSize<8>, public FixedKeyLength<16>, public VariableRounds<32> struct TEA_Info : public FixedBlockSize<8>, public FixedKeyLength<16>, public VariableRounds<32>
{ {
/// \brief The algorithm name
/// \returns the algorithm name
/// \details StaticAlgorithmName returns the algorithm's name as a static
/// member function.
CRYPTOPP_STATIC_CONSTEXPR const char* StaticAlgorithmName() {return "TEA";} CRYPTOPP_STATIC_CONSTEXPR const char* StaticAlgorithmName() {return "TEA";}
}; };
@ -58,6 +62,10 @@ typedef TEA::Decryption TEADecryption;
/// \brief XTEA block cipher information /// \brief XTEA block cipher information
struct XTEA_Info : public FixedBlockSize<8>, public FixedKeyLength<16>, public VariableRounds<32> struct XTEA_Info : public FixedBlockSize<8>, public FixedKeyLength<16>, public VariableRounds<32>
{ {
/// \brief The algorithm name
/// \returns the algorithm name
/// \details StaticAlgorithmName returns the algorithm's name as a static
/// member function.
CRYPTOPP_STATIC_CONSTEXPR const char* StaticAlgorithmName() {return "XTEA";} CRYPTOPP_STATIC_CONSTEXPR const char* StaticAlgorithmName() {return "XTEA";}
}; };
@ -98,6 +106,10 @@ public:
/// \brief BTEA block cipher information /// \brief BTEA block cipher information
struct BTEA_Info : public FixedKeyLength<16> struct BTEA_Info : public FixedKeyLength<16>
{ {
/// \brief The algorithm name
/// \returns the algorithm name
/// \details StaticAlgorithmName returns the algorithm's name as a static
/// member function.
CRYPTOPP_STATIC_CONSTEXPR const char* StaticAlgorithmName() {return "BTEA";} CRYPTOPP_STATIC_CONSTEXPR const char* StaticAlgorithmName() {return "BTEA";}
}; };