diff options
author | Jeffrey Walton <noloader@gmail.com> | 2017-09-27 06:24:58 -0400 |
---|---|---|
committer | Jeffrey Walton <noloader@gmail.com> | 2017-09-27 06:24:58 -0400 |
commit | 69fd4a040d67cc915599c1de07455b5889e1bc70 (patch) | |
tree | 23293f7fe0e68dfca235168235931ecfd315afdf /authenc.h | |
parent | 69a40e992ccd5107f0c62e7d044df58719971c1a (diff) | |
download | cryptopp-git-69fd4a040d67cc915599c1de07455b5889e1bc70.tar.gz |
Update documentation
Diffstat (limited to 'authenc.h')
-rw-r--r-- | authenc.h | 32 |
1 files changed, 28 insertions, 4 deletions
@@ -1,8 +1,20 @@ // authenc.h - originally written and placed in the public domain by Wei Dai
//! \file
-//! \headerfile authenc.h
-//! \brief Base classes for working with authenticated encryption modes of encryption
+//! \brief Classes for authenticated encryption modes of operation
+//! \details Authenticated encryption (AE) schemes combine confidentiality and authenticity
+//! into a single mode of operation They gained traction in the early 2000's because manually
+//! combining them was error prone for the typical developer. Around that time, the desire to
+//! authenticate but not ecrypt additional data (AAD) was also identified. When both features
+//! are available from a scheme, the system is referred to as an AEAD scheme.
+//! \details Crypto++ provides four authenticated encryption modes of operation - CCM, EAX, GCM
+//! and OCB mode. All modes derive from AuthenticatedSymmetricCipherBase() and the
+//! motivation for the API, like calling AAD a "header", can be found in Bellare,
+//! Rogaway and Wagner's <A HREF="http://web.cs.ucdavis.edu/~rogaway/papers/eax.pdf">The EAX
+//! Mode of Operation</A>. The EAX paper suggested a basic API to help standardize AEAD
+//! schemes in software and promote adoption of the modes.
+//! \sa <A HREF="http://www.cryptopp.com/wiki/Authenticated_Encryption">Authenticated
+//! Encryption</A> on the Crypto++ wiki.
//! \since Crypto++ 5.6.0
#ifndef CRYPTOPP_AUTHENC_H
@@ -14,7 +26,17 @@ NAMESPACE_BEGIN(CryptoPP)
//! \class AuthenticatedSymmetricCipherBase
-//! \brief Base implementation for one direction (encryption or decryption) of a stream cipher or block cipher mode with authentication
+//! \brief Base class for authenticated encryption modes of operation
+//! \details AuthenticatedSymmetricCipherBase() serves as a base implementation for one direction
+//! (encryption or decryption) of a stream cipher or block cipher mode with authentication.
+//! \details Crypto++ provides four authenticated encryption modes of operation - CCM, EAX, GCM
+//! and OCB mode. All modes derive from AuthenticatedSymmetricCipherBase() and the
+//! motivation for the API, like calling AAD a "header", can be found in Bellare,
+//! Rogaway and Wagner's <A HREF="http://web.cs.ucdavis.edu/~rogaway/papers/eax.pdf">The EAX
+//! Mode of Operation</A>. The EAX paper suggested a basic API to help standardize AEAD
+//! schemes in software and promote adoption of the modes.
+//! \sa <A HREF="http://www.cryptopp.com/wiki/Authenticated_Encryption">Authenticated
+//! Encryption</A> on the Crypto++ wiki.
//! \since Crypto++ 5.6.0
class CRYPTOPP_DLL CRYPTOPP_NO_VTABLE AuthenticatedSymmetricCipherBase : public AuthenticatedSymmetricCipher
{
@@ -22,6 +44,7 @@ public: AuthenticatedSymmetricCipherBase() : m_state(State_Start), m_bufferedDataLength(0),
m_totalHeaderLength(0), m_totalMessageLength(0), m_totalFooterLength(0) {}
+ // StreamTransformation interface
bool IsRandomAccess() const {return false;}
bool IsSelfInverting() const {return true;}
@@ -42,7 +65,8 @@ public: protected:
void AuthenticateData(const byte *data, size_t len);
- const SymmetricCipher & GetSymmetricCipher() const {return const_cast<AuthenticatedSymmetricCipherBase *>(this)->AccessSymmetricCipher();};
+ const SymmetricCipher & GetSymmetricCipher() const
+ {return const_cast<AuthenticatedSymmetricCipherBase *>(this)->AccessSymmetricCipher();};
virtual SymmetricCipher & AccessSymmetricCipher() =0;
virtual bool AuthenticationIsOnPlaintext() const =0;
|