summaryrefslogtreecommitdiff
path: root/aria.h
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2017-04-11 11:39:45 -0400
committerJeffrey Walton <noloader@gmail.com>2017-04-11 11:39:45 -0400
commit0d742591e06904ed885c82ccd27e478b2b43d7eb (patch)
treee90fba0495ca55e693f48f04ff2000135acf5f3d /aria.h
parent7990da2c02933dc31cdd41c4ec603ee310c4e87a (diff)
downloadcryptopp-git-0d742591e06904ed885c82ccd27e478b2b43d7eb.tar.gz
Switch to code based on 32-bit implementation
The 32-bit code is based on Aaram Yun's code. Yun's code combined with a few library specific tweaks improves performance to roughly Camellia.
Diffstat (limited to 'aria.h')
-rw-r--r--aria.h17
1 files changed, 8 insertions, 9 deletions
diff --git a/aria.h b/aria.h
index de041f96..3c81e24f 100644
--- a/aria.h
+++ b/aria.h
@@ -2,6 +2,10 @@
//! \file aria.h
//! \brief Classes for the ARIA block cipher
+//! \details The Crypto++ ARIA implementation is based on the 32-bit implementation by Aaram Yun
+//! from the National Security Research Institute, KOREA. Aaram Yun's implementation is based on
+//! the 8-bit implementation provided by Jin Hong. The source files are available in ARIA.zip
+//! from the Korea Internet & Security Agency website.
//! \sa <A HREF="http://tools.ietf.org/html/rfc5794">RFC 5794, A Description of the ARIA Encryption Algorithm</A>,
//! <A HREF="http://seed.kisa.or.kr/iwt/ko/bbs/EgovReferenceList.do?bbsId=BBSMSTR_000000000002">Korea
//! Internet & Security Agency homepage</A>
@@ -34,15 +38,10 @@ public:
void UncheckedSetKey(const byte *key, unsigned int keylen, const NameValuePairs &params);
void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const;
- protected:
- CRYPTOPP_ALIGN_DATA(16)
- static const byte S[4][256];
-
- CRYPTOPP_ALIGN_DATA(16)
- static const byte KRK[3][16];
-
- FixedSizeAlignedSecBlock<byte, 16*17> m_rkey; // round keys
- FixedSizeAlignedSecBlock<byte, 16*6> m_w; // scratch, w0, w1, w2, w3 and t
+ private:
+ // Reference implementation allocates a table for 17 sub-keys
+ FixedSizeAlignedSecBlock<byte, 16*17> m_rk; // round keys
+ FixedSizeAlignedSecBlock<word32, 4*6> m_w; // w0, w1, w2, w3 and t
unsigned int m_rounds;
};