Bunny2.0

- Main Page
- Classes
- Files

- File List

Headers/Bunny24m24k.h

    00001
    00002 #include "Bunny.h"
    00003
    00005
    00008 template <unsigned nb_sbox, unsigned nround>
    00009 class Bunny24m24k : public Bunny<24,24,nb_sbox,nround> {
    00010 public:
    00011
    00012   typedef Bunny<24,24,nb_sbox,nround> BUNNY ;
    00013
    00014   typedef typename BUNNY::msgType      msgType ;
    00015   typedef typename BUNNY::keyType      keyType ;
    00016   typedef typename BUNNY::sboxType     sboxType ;
    00017   typedef typename BUNNY::wordType     wordType ;
    00018   typedef typename BUNNY::roundkeyType roundkeyType ;
    00019
    00021   roundkeyType rk;
    00022
    00023   // CONSTRUCTORS
    00024   Bunny24m24k() ;
    00025
    00026   // CODING FUNCTIONS
    00027   virtual msgType encode(msgType m, keyType k) ;
    00028   virtual msgType decode(msgType m, keyType k) ;
    00029
    00030 //private:
    00031
    00032   // SBOX
    00033   virtual sboxType sbox( unsigned nbox, sboxType x ) ;
    00034   virtual sboxType sboxInverse( unsigned nbox, sboxType x ) ;
    00035
    00036   // MIXING LAYER
    00037   virtual msgType mixingLayer (msgType m ) ;
    00038   virtual msgType mixingLayerInverse (msgType m ) ;
    00039
    00040   // ADD ROUND KEY
    00041   virtual msgType addRoundKey (msgType m, msgType k) ;
    00042
    00043   // KEY SCHEDULE
    00044   virtual void keySchedule(keyType k) ;
    00045
    00046 } ;
    00047
    00048
    00049 #include "Bunny24m24k.hxx"

All Classes Functions Variables Typedefs