blob: 6cb8c4097be39c2279342dd5406dd0fb72919040 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
-- Implementation of the Lilliput-TBC tweakable block cipher by the
-- Lilliput-AE team, hereby denoted as "the implementer".
--
-- For more information, feedback or questions, refer to our website:
-- https://paclido.fr/lilliput-ae
--
-- To the extent possible under law, the implementer has waived all copyright
-- and related or neighboring rights to the source code in this file.
-- http://creativecommons.org/publicdomain/zero/1.0/
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;
|