File indexing completed on 2025-01-18 09:55:03
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #ifndef CRYPTOPP_HIGHT_H
0012 #define CRYPTOPP_HIGHT_H
0013
0014 #include "config.h"
0015 #include "seckey.h"
0016 #include "secblock.h"
0017 #include "algparam.h"
0018
0019 NAMESPACE_BEGIN(CryptoPP)
0020
0021
0022
0023 struct HIGHT_Info : public FixedBlockSize<8>, public FixedKeyLength<16>
0024 {
0025 static const std::string StaticAlgorithmName()
0026 {
0027
0028 return "HIGHT";
0029 }
0030 };
0031
0032
0033
0034
0035
0036
0037
0038
0039 class CRYPTOPP_NO_VTABLE HIGHT : public HIGHT_Info, public BlockCipherDocumentation
0040 {
0041 public:
0042
0043
0044
0045 class CRYPTOPP_NO_VTABLE Base : public BlockCipherImpl<HIGHT_Info>
0046 {
0047 protected:
0048 void UncheckedSetKey(const byte *userKey, unsigned int keyLength, const NameValuePairs ¶ms);
0049
0050 FixedSizeSecBlock<byte, 136> m_rkey;
0051 mutable FixedSizeSecBlock<word32, 8> m_xx;
0052 };
0053
0054
0055
0056
0057 class CRYPTOPP_NO_VTABLE Enc : public Base
0058 {
0059 public:
0060 void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const;
0061 };
0062
0063
0064
0065
0066 class CRYPTOPP_NO_VTABLE Dec : public Base
0067 {
0068 public:
0069 void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const;
0070 };
0071
0072 typedef BlockCipherFinal<ENCRYPTION, Enc> Encryption;
0073 typedef BlockCipherFinal<DECRYPTION, Dec> Decryption;
0074 };
0075
0076 typedef HIGHT::Encryption HIGHTEncryption;
0077 typedef HIGHT::Decryption HIGHTDecryption;
0078
0079 NAMESPACE_END
0080
0081 #endif