6 #ifndef CRYPTOPP_LUBYRACK_H 7 #define CRYPTOPP_LUBYRACK_H 33 this->AssertValidKeyLength(length);
38 key.Assign(userKey, 2*L);
55 #define KR this->key+this->L 56 #define BL this->buffer 57 #define BR this->buffer+this->S 59 #define IR inBlock+this->S 61 #define OR outBlock+this->S 65 this->hm.Update(
KL, this->L);
66 this->hm.Update(
IL, this->
S);
70 this->hm.Update(
KR, this->L);
71 this->hm.Update(
BR, this->
S);
75 this->hm.Update(
KL, this->L);
76 this->hm.Update(
BL, this->
S);
77 this->hm.Final(this->digest);
80 this->hm.Update(
KR, this->L);
81 this->hm.Update(
OR, this->
S);
82 this->hm.Final(this->digest);
86 xorbuf(outBlock, xorBlock, this->buffer, 2*this->
S);
88 memcpy_s(outBlock, 2*this->
S, this->buffer, 2*this->
S);
97 this->hm.Update(
KR, this->L);
98 this->hm.Update(
IR, this->
S);
102 this->hm.Update(
KL, this->L);
103 this->hm.Update(
BL, this->
S);
107 this->hm.Update(
KR, this->L);
108 this->hm.Update(
BR, this->
S);
109 this->hm.Final(this->digest);
112 this->hm.Update(
KL, this->L);
113 this->hm.Update(
OL, this->
S);
114 this->hm.Final(this->digest);
118 xorbuf(outBlock, xorBlock, this->buffer, 2*this->
S);
120 memcpy(outBlock, this->buffer, 2*this->
S);
Classes providing basic library services.
Luby-Rackoff block cipher information.
Provides Encryption and Decryption typedefs used by derived classes to implement a block cipher...
#define NAMESPACE_BEGIN(x)
void memcpy_s(void *dest, size_t sizeInBytes, const void *src, size_t count)
Bounds checking replacement for memcpy()
BlockCipherFinal< ENCRYPTION, Enc > Encryption
BlockCipherFinal< DECRYPTION, Dec > Decryption
Classes and functions for secure memory allocations.
Inherited by algorithms with fixed block size.
void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const
Encrypt or decrypt a block.
void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const
Encrypt or decrypt a block.
#define CRYPTOPP_CONSTANT(x)
void xorbuf(byte *buf, const byte *mask, size_t count)
Performs an XOR of a buffer with a mask.
Inherited by keyed algorithms with variable key length.
#define CRYPTOPP_NO_VTABLE
void * memcpy(void *a, const void *b, size_t c)
static std::string StaticAlgorithmName()
Provides a base implementation of Algorithm and SimpleKeyingInterface for block ciphers.
Luby-Rackoff block cipher.
void UncheckedSetKey(const byte *userKey, unsigned int length, const NameValuePairs ¶ms)
Sets the key for this object without performing parameter validation.
Interface for retrieving values given their names.