summaryrefslogtreecommitdiff
path: root/implementations/vhdl/Decrypt/lilliputtbcii192v1/state_key_register.vhd
diff options
context:
space:
mode:
authorGaetan Leplus <gaetan.leplus@airbus.com>2019-03-26 14:36:07 +0100
committerKévin Le Gouguec <kevin.legouguec@airbus.com>2019-03-26 15:44:53 +0100
commit4a43b7c66d3f5e0e7933391921c2dba2eec84426 (patch)
treeaf7291cfaf074f2f2adc1fca40c895b48998a039 /implementations/vhdl/Decrypt/lilliputtbcii192v1/state_key_register.vhd
parent94cd233460e4b52521702f4431eab4f68a4f410c (diff)
downloadlilliput-ae-implem-4a43b7c66d3f5e0e7933391921c2dba2eec84426.tar.xz
[implem-vhdl] Ajout des sources VHDL
Diffstat (limited to 'implementations/vhdl/Decrypt/lilliputtbcii192v1/state_key_register.vhd')
-rw-r--r--implementations/vhdl/Decrypt/lilliputtbcii192v1/state_key_register.vhd26
1 files changed, 26 insertions, 0 deletions
diff --git a/implementations/vhdl/Decrypt/lilliputtbcii192v1/state_key_register.vhd b/implementations/vhdl/Decrypt/lilliputtbcii192v1/state_key_register.vhd
new file mode 100644
index 0000000..60b9403
--- /dev/null
+++ b/implementations/vhdl/Decrypt/lilliputtbcii192v1/state_key_register.vhd
@@ -0,0 +1,26 @@
+library IEEE;
+library work;
+use IEEE.numeric_std.ALL;
+use IEEE.STD_LOGIC_1164.ALL;
+use work.crypt_pack.ALL;
+
+entity state_key_register is
+ port(
+ state_key_i : in type_tweak_key_array; -- Etat d'entrée
+ state_key_o : out type_tweak_key_array; -- Etat de sortie
+ clock_i : in std_logic; -- Permet de gérer la clock
+ reset_i : in std_logic);
+end state_key_register;
+
+architecture state_key_register_arch of state_key_register is
+begin
+ process(reset_i, clock_i) -- On définit ici un process car les fonctions ne doivent pas se faire en même temps
+ begin
+ if(reset_i = '0') then
+ state_key_o <= (others => (others => (others => '0'))); --si rest_i est nul c'est que les valeurs de state_o sont nuls
+ elsif(clock_i'event and clock_i = '1') then -- Dans le cas d'un front descendant d'horloge state_o prend la valeur de state_i. On utilise un front descendant d'horloge pour un soucis de synchronisation avec sbox
+ state_key_o <= state_key_i;
+ end if;
+ end process;
+
+ end state_key_register_arch;