Crypto++ 8.7
Free C++ class library of cryptographic schemes
aria.h
Go to the documentation of this file.
1// aria.h - written and placed in the public domain by Jeffrey Walton
2
3/// \file aria.h
4/// \brief Classes for the ARIA block cipher
5/// \details The Crypto++ ARIA implementation is based on the 32-bit implementation by Aaram Yun
6/// from the National Security Research Institute, KOREA. Aaram Yun's implementation is based on
7/// the 8-bit implementation by Jin Hong. The source files are available in ARIA.zip from the Korea
8/// Internet & Security Agency website.
9/// \sa <A HREF="http://tools.ietf.org/html/rfc5794">RFC 5794, A Description of the ARIA Encryption Algorithm</A>,
10/// <A HREF="http://seed.kisa.or.kr/iwt/ko/bbs/EgovReferenceList.do?bbsId=BBSMSTR_000000000002">Korea
11/// Internet & Security Agency homepage</A>
12
13#ifndef CRYPTOPP_ARIA_H
14#define CRYPTOPP_ARIA_H
15
16#include "config.h"
17#include "seckey.h"
18#include "secblock.h"
19
20NAMESPACE_BEGIN(CryptoPP)
21
22/// \brief ARIA block cipher information
23/// \since Crypto++ 6.0
24struct ARIA_Info : public FixedBlockSize<16>, public VariableKeyLength<16, 16, 32, 8>
25{
26 CRYPTOPP_STATIC_CONSTEXPR const char* StaticAlgorithmName() {return "ARIA";}
27};
28
29/// \brief ARIA block cipher
30/// \details The Crypto++ ARIA implementation is based on the 32-bit implementation by Aaram Yun
31/// from the National Security Research Institute, KOREA. Aaram Yun's implementation is based on
32/// the 8-bit implementation by Jin Hong. The source files are available in ARIA.zip from the Korea
33/// Internet & Security Agency website.
34/// \sa <A HREF="http://tools.ietf.org/html/rfc5794">RFC 5794, A Description of the ARIA Encryption Algorithm</A>,
35/// <A HREF="http://seed.kisa.or.kr/iwt/ko/bbs/EgovReferenceList.do?bbsId=BBSMSTR_000000000002">Korea
36/// Internet & Security Agency homepage</A>
37/// \sa <a href="http://www.cryptopp.com/wiki/ARIA">ARIA</a>
38/// \since Crypto++ 6.0
40{
41public:
42 class CRYPTOPP_NO_VTABLE Base : public BlockCipherImpl<ARIA_Info>
43 {
44 public:
45 Base() : m_rounds(0) {}
46
47 protected:
48 void UncheckedSetKey(const byte *key, unsigned int keylen, const NameValuePairs &params);
49 void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const;
50
51 private:
52 // Reference implementation allocates a table of 17 round keys.
55
56 AlignedByteBlock m_rk; // round keys
57 AlignedWordBlock m_w; // w0, w1, w2, w3, t and u
58 unsigned int m_rounds;
59 };
60
61public:
64};
65
68
69NAMESPACE_END
70
71#endif
ARIA block cipher.
Definition: aria.h:40
Provides class member functions to key a block cipher.
Definition: seckey.h:318
Provides a base implementation of Algorithm and SimpleKeyingInterface for block ciphers.
Definition: seckey.h:306
Inherited by algorithms with fixed block size.
Definition: seckey.h:41
Interface for retrieving values given their names.
Definition: cryptlib.h:322
Secure memory block with allocator and cleanup.
Definition: secblock.h:731
Inherited by keyed algorithms with variable key length.
Definition: seckey.h:166
Library configuration file.
Crypto++ library namespace.
Classes and functions for secure memory allocations.
Classes and functions for implementing secret key algorithms.
ARIA block cipher information.
Definition: aria.h:25
Provides Encryption and Decryption typedefs used by derived classes to implement a block cipher.
Definition: seckey.h:399