[72] | 1 | #ifndef morpheo_behavioural_custom_encryption_h |
---|
| 2 | #define morpheo_behavioural_custom_encryption_h |
---|
| 3 | |
---|
| 4 | /* |
---|
| 5 | * $Id$ |
---|
| 6 | * |
---|
| 7 | * [ Description ] |
---|
| 8 | * |
---|
| 9 | */ |
---|
| 10 | |
---|
| 11 | #include "Behavioural/Custom/include/Custom.h" |
---|
| 12 | |
---|
| 13 | namespace morpheo { |
---|
| 14 | namespace behavioural { |
---|
| 15 | namespace custom { |
---|
| 16 | namespace encryption { |
---|
| 17 | |
---|
| 18 | enum |
---|
| 19 | { |
---|
| 20 | num_register_key , |
---|
| 21 | num_register_shift, |
---|
| 22 | num_register_role |
---|
| 23 | }; |
---|
| 24 | |
---|
| 25 | class Encryption |
---|
| 26 | { |
---|
| 27 | private : const Toperation_t _operation_encrypt; |
---|
| 28 | private : const Toperation_t _operation_decrypt; |
---|
| 29 | |
---|
| 30 | public : Encryption (uint32_t num_group, |
---|
| 31 | Toperation_t operation_encrypt, |
---|
| 32 | Toperation_t operation_decrypt); |
---|
| 33 | |
---|
| 34 | public : uint32_t get_nb_register (void); |
---|
| 35 | public : access_mode_t get_access_mode (uint32_t reg); |
---|
| 36 | public : custom_decod_t * get_custom_decod (Toperation_t operation); |
---|
| 37 | public : custom_execute_genMoore_t * get_custom_execute_genMoore (Toperation_t operation); |
---|
| 38 | public : custom_execute_transition_t * get_custom_execute_transition (void); |
---|
| 39 | public : custom_execute_transition_t * get_custom_execute_reset (void); |
---|
| 40 | |
---|
| 41 | private : static void function_encrypt (morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::functionnal_unit::execute_operation_t * op, |
---|
| 42 | morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::functionnal_unit::execute_register_t * reg, |
---|
| 43 | morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::functionnal_unit::execute_param_t * param); |
---|
| 44 | private : static void function_decrypt (morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::functionnal_unit::execute_operation_t * op, |
---|
| 45 | morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::functionnal_unit::execute_register_t * reg, |
---|
| 46 | morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::functionnal_unit::execute_param_t * param); |
---|
| 47 | }; |
---|
| 48 | |
---|
| 49 | }; // end namespace encryption |
---|
| 50 | }; // end namespace custom |
---|
| 51 | }; // end namespace behavioural |
---|
| 52 | }; // end namespace morpheo |
---|
| 53 | |
---|
| 54 | #endif |
---|