// aria.h - written and placed in the public domain by Jeffrey Walton //! \file aria.h //! \brief Classes for the ARIA block cipher //! \sa RFC 5794, A Description of the ARIA Encryption Algorithm, //! Korea //! Internet & Security Agency homepage #ifndef CRYPTOPP_ARIA_H #define CRYPTOPP_ARIA_H #include "config.h" #include "seckey.h" #include "secblock.h" NAMESPACE_BEGIN(CryptoPP) //! \class ARIA_Info //! \brief ARIA block cipher information struct ARIA_Info : public FixedBlockSize<16>, public VariableKeyLength<16, 16, 32, 8> { CRYPTOPP_STATIC_CONSTEXPR const char* StaticAlgorithmName() {return "ARIA";} }; //! \class ARIA //! \brief ARIA block cipher //! \sa ARIA class ARIA : public ARIA_Info, public BlockCipherDocumentation { public: class CRYPTOPP_NO_VTABLE Base : public BlockCipherImpl { public: void UncheckedSetKey(const byte *key, unsigned int keylen, const NameValuePairs ¶ms); 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 m_rkey; // round keys FixedSizeAlignedSecBlock m_w; // scratch, w0, w1, w2, w3 and t unsigned int m_rounds; }; public: typedef BlockCipherFinal Encryption; typedef BlockCipherFinal Decryption; }; typedef ARIA::Encryption ARIAEncryption; typedef ARIA::Decryption ARIADecryption; NAMESPACE_END #endif