summaryrefslogtreecommitdiff
path: root/implementations/vhdl/Decrypt/lilliputtbci256v1/inner_sbox_c.vhd
diff options
context:
space:
mode:
authorKévin Le Gouguec <kevin.legouguec@airbus.com>2019-03-26 15:04:31 +0100
committerKévin Le Gouguec <kevin.legouguec@airbus.com>2019-03-26 15:44:53 +0100
commita555bb68a86a8d57cd3cae3d5e3c14acfda6fd6d (patch)
tree7a7485852756a76085c54bb7d863d5c726a480c9 /implementations/vhdl/Decrypt/lilliputtbci256v1/inner_sbox_c.vhd
parent89a026b31fa8a65c756eed53cada41fab99d2edc (diff)
downloadlilliput-ae-implem-a555bb68a86a8d57cd3cae3d5e3c14acfda6fd6d.tar.xz
[implem-vhdl] Factorisation du code
Diffstat (limited to 'implementations/vhdl/Decrypt/lilliputtbci256v1/inner_sbox_c.vhd')
-rw-r--r--implementations/vhdl/Decrypt/lilliputtbci256v1/inner_sbox_c.vhd43
1 files changed, 0 insertions, 43 deletions
diff --git a/implementations/vhdl/Decrypt/lilliputtbci256v1/inner_sbox_c.vhd b/implementations/vhdl/Decrypt/lilliputtbci256v1/inner_sbox_c.vhd
deleted file mode 100644
index a794485..0000000
--- a/implementations/vhdl/Decrypt/lilliputtbci256v1/inner_sbox_c.vhd
+++ /dev/null
@@ -1,43 +0,0 @@
-library IEEE;
-library work;
-use IEEE.std_logic_1164.all;
-
-
-entity inner_sbox_c is
- port(
- sbox_i : in std_logic_vector(3 downto 0);
- sbox_o : out std_logic_vector(3 downto 0)
- );
-end inner_sbox_c;
-
-
-architecture inner_sbox_c_arch of inner_sbox_c is
-
-signal a,b,c,d,x,y,z,t :std_logic;
-signal a1,b1,c1,d1,e :std_logic;
-
-begin
-
-a <= sbox_i(3);
-b <= sbox_i(2);
-c <= sbox_i(1);
-d <= sbox_i(0);
-
-a1 <= e xor a;
-b1 <= b xor c1;
-c1 <= a xor c;
-d1 <= not (d xor (b and c));
-e <= b xor d1;
-
-x <= c1 and e;
-y <= a and d1;
-z <= e;
-t <= a1 and b1;
-
-sbox_o(3) <= x;
-sbox_o(2) <= y;
-sbox_o(1) <= z;
-sbox_o(0) <= t;
-
-end;
-