Crypto++
wake.h
1 #ifndef CRYPTOPP_WAKE_H
2 #define CRYPTOPP_WAKE_H
3 
4 #include "seckey.h"
5 #include "secblock.h"
6 #include "strciphr.h"
7 
8 NAMESPACE_BEGIN(CryptoPP)
9 
10 //! _
11 template <class B = BigEndian>
12 struct WAKE_OFB_Info : public FixedKeyLength<32>
13 {
14  static const char *StaticAlgorithmName() {return B::ToEnum() == LITTLE_ENDIAN_ORDER ? "WAKE-OFB-LE" : "WAKE-OFB-BE";}
15 };
16 
17 class CRYPTOPP_NO_VTABLE WAKE_Base
18 {
19 protected:
20  word32 M(word32 x, word32 y);
21  void GenKey(word32 k0, word32 k1, word32 k2, word32 k3);
22 
23  word32 t[257];
24  word32 r3, r4, r5, r6;
25 };
26 
27 template <class B = BigEndian>
28 class CRYPTOPP_NO_VTABLE WAKE_Policy : public AdditiveCipherConcretePolicy<word32, 1, 64>, protected WAKE_Base
29 {
30 protected:
31  void CipherSetKey(const NameValuePairs &params, const byte *key, size_t length);
32  // OFB
33  void OperateKeystream(KeystreamOperation operation, byte *output, const byte *input, size_t iterationCount);
34  bool CipherIsRandomAccess() const {return false;}
35 };
36 
37 //! WAKE-OFB
38 template <class B = BigEndian>
40 {
42  typedef Encryption Decryption;
43 };
44 
45 /*
46 template <class B = BigEndian>
47 class WAKE_ROFB_Policy : public WAKE_Policy<B>
48 {
49 protected:
50  void Iterate(KeystreamOperation operation, byte *output, const byte *input, unsigned int iterationCount);
51 };
52 
53 template <class B = BigEndian>
54 struct WAKE_ROFB : public WAKE_Info<B>
55 {
56  typedef SymmetricCipherTemplate<ConcretePolicyHolder<AdditiveCipherTemplate<>, WAKE_ROFB_Policy<B> > > Encryption;
57  typedef Encryption Decryption;
58 };
59 */
60 
61 NAMESPACE_END
62 
63 #endif
to be inherited by keyed algorithms with fixed key length
Definition: seckey.h:66
WAKE-OFB.
Definition: wake.h:39
Definition: wake.h:17
interface for one direction (encryption or decryption) of a stream cipher or cipher mode ...
Definition: cryptlib.h:610
Each class derived from this one defines two types, Encryption and Decryption, both of which implemen...
Definition: seckey.h:201
interface for retrieving values given their names
Definition: cryptlib.h:224