summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/add_vhdltbc/decrypt/crypt_pack.vhd6
-rw-r--r--src/add_vhdltbc/decrypt/top.vhd34
-rw-r--r--src/add_vhdltbc/encrypt/crypt_pack.vhd6
3 files changed, 21 insertions, 25 deletions
diff --git a/src/add_vhdltbc/decrypt/crypt_pack.vhd b/src/add_vhdltbc/decrypt/crypt_pack.vhd
index a97c373..f0ea0b9 100644
--- a/src/add_vhdltbc/decrypt/crypt_pack.vhd
+++ b/src/add_vhdltbc/decrypt/crypt_pack.vhd
@@ -50,8 +50,8 @@ package crypt_pack is
end crypt_pack;
package body crypt_pack is
- constant ROUND : integer := ROUND_NB-1; -- round number - 1
- constant TWEAK_KEY_LEN : integer := TWEAK_LEN+KEY_LEN-1; -- tweak key lenght - 1
- constant LANE_NB : integer := ((TWEAK_LEN+KEY_LEN)/64); --nuber of lane
+ constant ROUND : integer := ROUND_NB-2;
+ constant TWEAK_KEY_LEN : integer := TWEAK_LEN+KEY_LEN-1;
+ constant LANE_NB : integer := ((TWEAK_LEN+KEY_LEN)/64);
end crypt_pack;
\ No newline at end of file
diff --git a/src/add_vhdltbc/decrypt/top.vhd b/src/add_vhdltbc/decrypt/top.vhd
index 7ccdd61..db676f1 100644
--- a/src/add_vhdltbc/decrypt/top.vhd
+++ b/src/add_vhdltbc/decrypt/top.vhd
@@ -33,15 +33,14 @@ architecture top_arch of top is
component roundexe_liliput port(
clock_i : in std_logic;
reset_i : in std_logic;
- data_i : in bit128; --donnée d'entrée lors du premier Round
+ data_i : in bit128; --donn�e d'entr�e lors du premier Round
keyb_i : in bit_key;
- tweak_i : in bit_tweak;
+ tweak_i : in bit_tweak;
invert_i : in std_logic;
round_number_i : in std_logic_vector(7 downto 0);
- permut_valid_i : in std_logic; --permet de savoir si on fait la permutation à la fin
- muxsel_i : in std_logic; --En lien avec data_i permet la selection des données d'entrée au cours d'un Round
- data_out_valid_i: in std_logic;
- initroundkey_i : in std_logic;
+ permut_valid_i : in std_logic; --permet de savoir si on fait la permutation � la fin
+ muxsel_i : in std_logic; --En lien avec data_i permet la selection des donn�es d'entr�e au cours d'un Round
+ data_out_valid_i: in std_logic;
data_o : out bit128
);
end component;
@@ -51,10 +50,9 @@ component fsm_chiffrement port (
clock_i : in std_logic;
reset_i : in std_logic;
compteur_o : out std_logic_vector(7 downto 0);
- liliput_on_out : out std_logic; --Sortie à titre informative
- data_out_valid_o : out std_logic; --Vient à l'entrée du round exe pour s
- initroundkey_o : out std_logic;
- permutation_o : out std_logic;
+ liliput_on_out : out std_logic; --Sortie � titre informative
+ data_out_valid_o : out std_logic; --Vient � l'entr�e du round exe pour s
+ permutation_o : out std_logic;
invert_o : out std_logic;
muxsel_o : out std_logic);
end component;
@@ -62,8 +60,8 @@ end component;
signal data_out_valid_o_s : std_logic;
signal permutation_o_s : std_logic;
signal compteur_o_s : std_logic_vector(7 downto 0);
-signal muxsel_o_s : std_logic;
-signal initroundkey_s : std_logic;
+signal muxsel_o_s : std_logic;
+signal initroundkey_s : std_logic;
signal invert_s : std_logic;
@@ -74,10 +72,9 @@ machine_a_etat : fsm_chiffrement port map(
clock_i => clock_i,
reset_i => reset_i,
compteur_o => compteur_o_s,
- liliput_on_out => liliput_on_out, --Sortie à titre informative
- data_out_valid_o => data_out_valid_o_s, --Vient à l'entrée du round exe pour s
- initroundkey_o => initroundkey_s,
- permutation_o => permutation_o_s,
+ liliput_on_out => liliput_on_out, --Sortie � titre informative
+ data_out_valid_o => data_out_valid_o_s, --Vient � l'entr�e du round exe pour s
+ permutation_o => permutation_o_s,
invert_o => invert_s,
muxsel_o => muxsel_o_s
);
@@ -88,13 +85,12 @@ roundexe_general : roundexe_liliput port map(
reset_i => reset_i,
data_i => data_i,
keyb_i => key_i,
- tweak_i => tweak_i,
+ tweak_i => tweak_i,
invert_i => invert_s,
round_number_i => compteur_o_s,
permut_valid_i => permutation_o_s,
muxsel_i => muxsel_o_s,
- data_out_valid_i => data_out_valid_o_s,
- initroundkey_i => initroundkey_s,
+ data_out_valid_i => data_out_valid_o_s,
data_o => data_o
);
diff --git a/src/add_vhdltbc/encrypt/crypt_pack.vhd b/src/add_vhdltbc/encrypt/crypt_pack.vhd
index 026ad14..f2140e3 100644
--- a/src/add_vhdltbc/encrypt/crypt_pack.vhd
+++ b/src/add_vhdltbc/encrypt/crypt_pack.vhd
@@ -50,8 +50,8 @@ package crypt_pack is
end crypt_pack;
package body crypt_pack is
- constant ROUND : integer := ROUND_NB-2; -- round number - 1
- constant TWEAK_KEY_LEN : integer := TWEAK_LEN+KEY_LEN-1; -- tweak key lenght - 1
- constant LANE_NB : integer := ((TWEAK_LEN+KEY_LEN)/64); --nuber of lane
+ constant ROUND : integer := ROUND_NB-2;
+ constant TWEAK_KEY_LEN : integer := TWEAK_LEN+KEY_LEN-1;
+ constant LANE_NB : integer := ((TWEAK_LEN+KEY_LEN)/64);
end crypt_pack;
\ No newline at end of file