mirror of
https://github.com/shadps4-emu/ext-cryptopp.git
synced 2024-11-26 19:30:21 +00:00
Update documentation
This commit is contained in:
parent
1cf770628d
commit
20a4626b5d
@ -2027,6 +2027,7 @@ public:
|
|||||||
virtual bool GetNextMessage();
|
virtual bool GetNextMessage();
|
||||||
|
|
||||||
/// \brief Skip a number of meessages
|
/// \brief Skip a number of meessages
|
||||||
|
/// \param count number of messages to skip
|
||||||
/// \return 0 if the requested number of messages was skipped, non-0 otherwise
|
/// \return 0 if the requested number of messages was skipped, non-0 otherwise
|
||||||
/// \details SkipMessages() skips count number of messages. If there is an AttachedTransformation()
|
/// \details SkipMessages() skips count number of messages. If there is an AttachedTransformation()
|
||||||
/// then SkipMessages() is called on the attached transformation. If there is no attached
|
/// then SkipMessages() is called on the attached transformation. If there is no attached
|
||||||
@ -2047,10 +2048,10 @@ public:
|
|||||||
|
|
||||||
/// \brief Copy messages from this object to another BufferedTransformation
|
/// \brief Copy messages from this object to another BufferedTransformation
|
||||||
/// \param target the destination BufferedTransformation
|
/// \param target the destination BufferedTransformation
|
||||||
/// \param count the number of messages to transfer
|
/// \param count the number of messages to copy
|
||||||
/// \param channel the channel on which the transfer should occur
|
/// \param channel the channel on which the copy should occur
|
||||||
/// \return the number of bytes that remain in the current transfer block (i.e., bytes not transferred)
|
/// \return the number of bytes that remain in the current transfer block (i.e., bytes not transferred)
|
||||||
/// \details CopyMessagesTo copies messages from this object and copies them to the destination.
|
/// \details CopyMessagesTo copies messages from this object to the destination.
|
||||||
/// If all bytes are not transferred for a message, then processing stops and the number of remaining
|
/// If all bytes are not transferred for a message, then processing stops and the number of remaining
|
||||||
/// bytes is returned. CopyMessagesTo() does not proceed to the next message.
|
/// bytes is returned. CopyMessagesTo() does not proceed to the next message.
|
||||||
/// \details A return value of 0 indicates all messages were successfully copied.
|
/// \details A return value of 0 indicates all messages were successfully copied.
|
||||||
|
17
serpent.h
17
serpent.h
@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
/// \file serpent.h
|
/// \file serpent.h
|
||||||
/// \brief Classes for the Serpent block cipher
|
/// \brief Classes for the Serpent block cipher
|
||||||
|
/// \sa <a href="https://www.cl.cam.ac.uk/~rja14/serpent.html">A
|
||||||
|
/// Candidate Block Cipher for the Advanced Encryption Standard</a>
|
||||||
|
|
||||||
#ifndef CRYPTOPP_SERPENT_H
|
#ifndef CRYPTOPP_SERPENT_H
|
||||||
#define CRYPTOPP_SERPENT_H
|
#define CRYPTOPP_SERPENT_H
|
||||||
@ -19,10 +21,15 @@ struct Serpent_Info : public FixedBlockSize<16>, public VariableKeyLength<16, 16
|
|||||||
};
|
};
|
||||||
|
|
||||||
/// \brief Serpent block cipher
|
/// \brief Serpent block cipher
|
||||||
/// \sa <a href="http://www.cryptopp.com/wiki/Serpent">Serpent</a>
|
/// \sa <a href="http://www.cryptopp.com/wiki/Serpent">Serpent</a> on the
|
||||||
|
/// Crypto++ wiki, <a href="https://www.cl.cam.ac.uk/~rja14/serpent.html">A
|
||||||
|
/// Candidate Block Cipher for the Advanced Encryption Standard</a>
|
||||||
/// \since Crypto++ 3.1
|
/// \since Crypto++ 3.1
|
||||||
class Serpent : public Serpent_Info, public BlockCipherDocumentation
|
class Serpent : public Serpent_Info, public BlockCipherDocumentation
|
||||||
{
|
{
|
||||||
|
/// \brief Serpen block cipher base implementation
|
||||||
|
/// \details Provides implementation common to encryption and decryption
|
||||||
|
/// \since Crypto++ 3.1
|
||||||
class CRYPTOPP_NO_VTABLE Base : public BlockCipherImpl<Serpent_Info>
|
class CRYPTOPP_NO_VTABLE Base : public BlockCipherImpl<Serpent_Info>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -32,12 +39,20 @@ class Serpent : public Serpent_Info, public BlockCipherDocumentation
|
|||||||
FixedSizeSecBlock<word32, 33*4> m_key;
|
FixedSizeSecBlock<word32, 33*4> m_key;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/// \brief Serpent encryption transformation
|
||||||
|
/// \details Enc provides the encryption transformation.
|
||||||
|
/// All key sizes are supported.
|
||||||
|
/// \since Crypto++ 3.1
|
||||||
class CRYPTOPP_NO_VTABLE Enc : public Base
|
class CRYPTOPP_NO_VTABLE Enc : public Base
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const;
|
void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/// \brief Serpent decryption transformation
|
||||||
|
/// \details Dec provides the decryption transformation.
|
||||||
|
/// All key sizes are supported.
|
||||||
|
/// \since Crypto++ 3.1
|
||||||
class CRYPTOPP_NO_VTABLE Dec : public Base
|
class CRYPTOPP_NO_VTABLE Dec : public Base
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
58
simon.h
58
simon.h
@ -3,11 +3,11 @@
|
|||||||
/// \file simon.h
|
/// \file simon.h
|
||||||
/// \brief Classes for the Simon block cipher
|
/// \brief Classes for the Simon block cipher
|
||||||
/// \details Simon is a block cipher designed by Ray Beaulieu, Douglas Shors, Jason Smith,
|
/// \details Simon is a block cipher designed by Ray Beaulieu, Douglas Shors, Jason Smith,
|
||||||
/// Stefan Treatman-Clark, Bryan Weeks and Louis Wingers.
|
/// Stefan Treatman-Clark, Bryan Weeks and Louis Wingers.
|
||||||
/// \sa <A HREF="http://eprint.iacr.org/2013/404">The SIMON and SPECK Families of
|
/// \sa <A HREF="http://eprint.iacr.org/2013/404">The SIMON and SPECK Families of
|
||||||
/// Lightweight Block Ciphers</A>, <A HREF="http://iadgov.github.io/simon-speck/">
|
/// Lightweight Block Ciphers</A>, <A HREF="http://iadgov.github.io/simon-speck/">
|
||||||
/// The Simon and Speck GitHub</A> and <A HREF="https://www.cryptopp.com/wiki/SIMON">
|
/// The Simon and Speck GitHub</A> and <A HREF="https://www.cryptopp.com/wiki/SIMON">
|
||||||
/// SIMON</A> on the Crypto++ wiki.
|
/// SIMON</A> on the Crypto++ wiki.
|
||||||
/// \since Crypto++ 6.0
|
/// \since Crypto++ 6.0
|
||||||
|
|
||||||
#ifndef CRYPTOPP_SIMON_H
|
#ifndef CRYPTOPP_SIMON_H
|
||||||
@ -54,7 +54,7 @@ struct SIMON_Info : public FixedBlockSize<L>, VariableKeyLength<D, N, M>
|
|||||||
/// \brief The algorithm name
|
/// \brief The algorithm name
|
||||||
/// \returns the algorithm name
|
/// \returns the algorithm name
|
||||||
/// \details StaticAlgorithmName returns the algorithm's name as a static
|
/// \details StaticAlgorithmName returns the algorithm's name as a static
|
||||||
/// member function.
|
/// member function.
|
||||||
static const std::string StaticAlgorithmName()
|
static const std::string StaticAlgorithmName()
|
||||||
{
|
{
|
||||||
// Format is Cipher-Blocksize(Keylength)
|
// Format is Cipher-Blocksize(Keylength)
|
||||||
@ -82,17 +82,17 @@ struct SIMON_Base
|
|||||||
|
|
||||||
/// \brief SIMON 64-bit block cipher
|
/// \brief SIMON 64-bit block cipher
|
||||||
/// \details Simon is a block cipher designed by Ray Beaulieu, Douglas Shors, Jason Smith,
|
/// \details Simon is a block cipher designed by Ray Beaulieu, Douglas Shors, Jason Smith,
|
||||||
/// Stefan Treatman-Clark, Bryan Weeks and Louis Wingers.
|
/// Stefan Treatman-Clark, Bryan Weeks and Louis Wingers.
|
||||||
/// \details SIMON64 provides 64-bit block size. The valid key sizes are 96-bit and 128-bit.
|
/// \details SIMON64 provides 64-bit block size. The valid key sizes are 96-bit and 128-bit.
|
||||||
/// \sa SIMON64, SIMON128, <A HREF="http://eprint.iacr.org/2013/404">The SIMON and SIMON
|
/// \sa SIMON64, SIMON128, <A HREF="http://eprint.iacr.org/2013/404">The SIMON and SIMON
|
||||||
/// Families of Lightweight Block Ciphers</A>, <A HREF="http://iadgov.github.io/simon-speck/">
|
/// Families of Lightweight Block Ciphers</A>, <A HREF="http://iadgov.github.io/simon-speck/">
|
||||||
/// The Simon and Speck GitHub</A>, <a href="http://www.cryptopp.com/wiki/SIMON">SIMON</a> on the
|
/// The Simon and Speck GitHub</A>, <a href="http://www.cryptopp.com/wiki/SIMON">SIMON</a> on the
|
||||||
/// Crypto++ wiki
|
/// Crypto++ wiki
|
||||||
/// \since Crypto++ 6.0
|
/// \since Crypto++ 6.0
|
||||||
class CRYPTOPP_NO_VTABLE SIMON64 : public SIMON_Info<8, 12, 12, 16>, public BlockCipherDocumentation
|
class CRYPTOPP_NO_VTABLE SIMON64 : public SIMON_Info<8, 12, 12, 16>, public BlockCipherDocumentation
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
/// \brief SIMON block cipher transformation functions
|
/// \brief SIMON64 block cipher base implementation
|
||||||
/// \details Provides implementation common to encryption and decryption
|
/// \details Provides implementation common to encryption and decryption
|
||||||
/// \since Crypto++ 6.0
|
/// \since Crypto++ 6.0
|
||||||
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> >
|
||||||
@ -101,7 +101,7 @@ public:
|
|||||||
/// \brief The algorithm name
|
/// \brief The algorithm name
|
||||||
/// \returns the algorithm name
|
/// \returns the algorithm name
|
||||||
/// \details AlgorithmName returns the algorithm's name as a
|
/// \details AlgorithmName returns the algorithm's name as a
|
||||||
/// member function.
|
/// 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) + ")");
|
||||||
@ -118,9 +118,9 @@ public:
|
|||||||
void UncheckedSetKey(const byte *userKey, unsigned int keyLength, const NameValuePairs ¶ms);
|
void UncheckedSetKey(const byte *userKey, unsigned int keyLength, const NameValuePairs ¶ms);
|
||||||
};
|
};
|
||||||
|
|
||||||
/// \brief Encryption transformation
|
/// \brief SIMON64 encryption transformation
|
||||||
/// \details Enc provides implementation for encryption transformation. All key
|
/// \details Enc provides the encryption transformation.
|
||||||
/// sizes are supported.
|
/// All key sizes are supported.
|
||||||
/// \since Crypto++ 6.0
|
/// \since Crypto++ 6.0
|
||||||
class CRYPTOPP_NO_VTABLE Enc : public Base
|
class CRYPTOPP_NO_VTABLE Enc : public Base
|
||||||
{
|
{
|
||||||
@ -131,9 +131,9 @@ public:
|
|||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
/// \brief Decryption transformation
|
/// \brief SIMON64 decryption transformation
|
||||||
/// \details Dec provides implementation for decryption transformation. All key
|
/// \details Dec provides the decryption transformation.
|
||||||
/// sizes are supported.
|
/// All key sizes are supported.
|
||||||
/// \since Crypto++ 6.0
|
/// \since Crypto++ 6.0
|
||||||
class CRYPTOPP_NO_VTABLE Dec : public Base
|
class CRYPTOPP_NO_VTABLE Dec : public Base
|
||||||
{
|
{
|
||||||
@ -150,17 +150,17 @@ public:
|
|||||||
|
|
||||||
/// \brief SIMON 128-bit block cipher
|
/// \brief SIMON 128-bit block cipher
|
||||||
/// \details Simon is a block cipher designed by Ray Beaulieu, Douglas Shors, Jason Smith,
|
/// \details Simon is a block cipher designed by Ray Beaulieu, Douglas Shors, Jason Smith,
|
||||||
/// Stefan Treatman-Clark, Bryan Weeks and Louis Wingers.
|
/// Stefan Treatman-Clark, Bryan Weeks and Louis Wingers.
|
||||||
/// \details SIMON128 provides 128-bit block size. The valid key sizes are 128-bit, 192-bit and 256-bit.
|
/// \details SIMON128 provides 128-bit block size. The valid key sizes are 128-bit, 192-bit and 256-bit.
|
||||||
/// \sa SIMON64, SIMON128, <A HREF="http://eprint.iacr.org/2013/404">The SIMON and SIMON
|
/// \sa SIMON64, SIMON128, <A HREF="http://eprint.iacr.org/2013/404">The SIMON and SIMON
|
||||||
/// Families of Lightweight Block Ciphers</A>, <A HREF="http://iadgov.github.io/simon-speck/">
|
/// Families of Lightweight Block Ciphers</A>, <A HREF="http://iadgov.github.io/simon-speck/">
|
||||||
/// The Simon and Speck GitHub</A>, <a href="http://www.cryptopp.com/wiki/SIMON">SIMON</a> on the
|
/// The Simon and Speck GitHub</A>, <a href="http://www.cryptopp.com/wiki/SIMON">SIMON</a> on the
|
||||||
/// Crypto++ wiki
|
/// Crypto++ wiki
|
||||||
/// \since Crypto++ 6.0
|
/// \since Crypto++ 6.0
|
||||||
class CRYPTOPP_NO_VTABLE SIMON128 : public SIMON_Info<16, 16, 16, 32>, public BlockCipherDocumentation
|
class CRYPTOPP_NO_VTABLE SIMON128 : public SIMON_Info<16, 16, 16, 32>, public BlockCipherDocumentation
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
/// \brief SIMON block cipher transformation functions
|
/// \brief SIMON128 block cipher base implementation
|
||||||
/// \details Provides implementation common to encryption and decryption
|
/// \details Provides implementation common to encryption and decryption
|
||||||
/// \since Crypto++ 6.0
|
/// \since Crypto++ 6.0
|
||||||
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> >
|
||||||
@ -169,7 +169,7 @@ public:
|
|||||||
/// \brief The algorithm name
|
/// \brief The algorithm name
|
||||||
/// \returns the algorithm name
|
/// \returns the algorithm name
|
||||||
/// \details AlgorithmName returns the algorithm's name as a
|
/// \details AlgorithmName returns the algorithm's name as a
|
||||||
/// member function.
|
/// 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) + ")");
|
||||||
@ -186,9 +186,9 @@ public:
|
|||||||
void UncheckedSetKey(const byte *userKey, unsigned int keyLength, const NameValuePairs ¶ms);
|
void UncheckedSetKey(const byte *userKey, unsigned int keyLength, const NameValuePairs ¶ms);
|
||||||
};
|
};
|
||||||
|
|
||||||
/// \brief Encryption transformation
|
/// \brief SIMON128 encryption transformation
|
||||||
/// \details Enc provides implementation for encryption transformation. All key
|
/// \details Enc provides the encryption transformation.
|
||||||
/// sizes are supported.
|
/// All key sizes are supported.
|
||||||
/// \since Crypto++ 6.0
|
/// \since Crypto++ 6.0
|
||||||
class CRYPTOPP_NO_VTABLE Enc : public Base
|
class CRYPTOPP_NO_VTABLE Enc : public Base
|
||||||
{
|
{
|
||||||
@ -199,9 +199,9 @@ public:
|
|||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
/// \brief Decryption transformation
|
/// \brief SIMON128 decryption transformation
|
||||||
/// \details Dec provides implementation for decryption transformation. All key
|
/// \details Dec provides the decryption transformation.
|
||||||
/// sizes are supported.
|
/// All key sizes are supported.
|
||||||
/// \since Crypto++ 6.0
|
/// \since Crypto++ 6.0
|
||||||
class CRYPTOPP_NO_VTABLE Dec : public Base
|
class CRYPTOPP_NO_VTABLE Dec : public Base
|
||||||
{
|
{
|
||||||
|
28
speck.h
28
speck.h
@ -92,7 +92,7 @@ struct SPECK_Base
|
|||||||
class CRYPTOPP_NO_VTABLE SPECK64 : public SPECK_Info<8, 12, 12, 16>, public BlockCipherDocumentation
|
class CRYPTOPP_NO_VTABLE SPECK64 : public SPECK_Info<8, 12, 12, 16>, public BlockCipherDocumentation
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
/// \brief SPECK block cipher transformation functions
|
/// \brief SPECK64 block cipher base implementation
|
||||||
/// \details Provides implementation common to encryption and decryption
|
/// \details Provides implementation common to encryption and decryption
|
||||||
/// \since Crypto++ 6.0
|
/// \since Crypto++ 6.0
|
||||||
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> >
|
||||||
@ -118,9 +118,9 @@ public:
|
|||||||
void UncheckedSetKey(const byte *userKey, unsigned int keyLength, const NameValuePairs ¶ms);
|
void UncheckedSetKey(const byte *userKey, unsigned int keyLength, const NameValuePairs ¶ms);
|
||||||
};
|
};
|
||||||
|
|
||||||
/// \brief Encryption transformation
|
/// \brief SPECK64 encryption transformation
|
||||||
/// \details Enc provides implementation for encryption transformation. All key
|
/// \details Enc provides the encryption transformation.
|
||||||
/// sizes are supported.
|
/// All key sizes are supported.
|
||||||
/// \since Crypto++ 6.0
|
/// \since Crypto++ 6.0
|
||||||
class CRYPTOPP_NO_VTABLE Enc : public Base
|
class CRYPTOPP_NO_VTABLE Enc : public Base
|
||||||
{
|
{
|
||||||
@ -131,9 +131,9 @@ public:
|
|||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
/// \brief Decryption transformation
|
/// \brief SPECK64 decryption transformation
|
||||||
/// \details Dec provides implementation for decryption transformation. All key
|
/// \details Dec provides the decryption transformation.
|
||||||
/// sizes are supported.
|
/// All key sizes are supported.
|
||||||
/// \since Crypto++ 6.0
|
/// \since Crypto++ 6.0
|
||||||
class CRYPTOPP_NO_VTABLE Dec : public Base
|
class CRYPTOPP_NO_VTABLE Dec : public Base
|
||||||
{
|
{
|
||||||
@ -160,7 +160,7 @@ public:
|
|||||||
class CRYPTOPP_NO_VTABLE SPECK128 : public SPECK_Info<16, 16, 16, 32>, public BlockCipherDocumentation
|
class CRYPTOPP_NO_VTABLE SPECK128 : public SPECK_Info<16, 16, 16, 32>, public BlockCipherDocumentation
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
/// \brief SPECK block cipher transformation functions
|
/// \brief SPECK128 block cipher base implementation
|
||||||
/// \details Provides implementation common to encryption and decryption
|
/// \details Provides implementation common to encryption and decryption
|
||||||
/// \since Crypto++ 6.0
|
/// \since Crypto++ 6.0
|
||||||
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> >
|
||||||
@ -186,9 +186,9 @@ public:
|
|||||||
void UncheckedSetKey(const byte *userKey, unsigned int keyLength, const NameValuePairs ¶ms);
|
void UncheckedSetKey(const byte *userKey, unsigned int keyLength, const NameValuePairs ¶ms);
|
||||||
};
|
};
|
||||||
|
|
||||||
/// \brief Encryption transformation
|
/// \brief SPECK128 encryption transformation
|
||||||
/// \details Enc provides implementation for encryption transformation. All key
|
/// \details Enc provides the encryption transformation.
|
||||||
/// sizes are supported.
|
/// All key sizes are supported.
|
||||||
/// \since Crypto++ 6.0
|
/// \since Crypto++ 6.0
|
||||||
class CRYPTOPP_NO_VTABLE Enc : public Base
|
class CRYPTOPP_NO_VTABLE Enc : public Base
|
||||||
{
|
{
|
||||||
@ -199,9 +199,9 @@ public:
|
|||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
/// \brief Decryption transformation
|
/// \brief SPECK128 decryption transformation
|
||||||
/// \details Dec provides implementation for decryption transformation. All key
|
/// \details Dec provides the decryption transformation.
|
||||||
/// sizes are supported.
|
/// All key sizes are supported.
|
||||||
/// \since Crypto++ 6.0
|
/// \since Crypto++ 6.0
|
||||||
class CRYPTOPP_NO_VTABLE Dec : public Base
|
class CRYPTOPP_NO_VTABLE Dec : public Base
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user