summaryrefslogtreecommitdiff
path: root/src/add_vhdltbc/decrypt/inner_sbox_c.vhd
diff options
context:
space:
mode:
authorGaetan Leplus <gaetan.leplus@airbus.com>2019-07-04 14:01:34 +0200
committerGaetan Leplus <gaetan.leplus@airbus.com>2019-07-04 14:09:13 +0200
commit7b4050583d09e3d0ecfd7e7c51b9c77792d4b098 (patch)
tree91417728bad80e945029cd946949bd745af19e77 /src/add_vhdltbc/decrypt/inner_sbox_c.vhd
parent6589f3ef20f8f93168be49135764764cd0c02a23 (diff)
downloadlilliput-ae-implem-7b4050583d09e3d0ecfd7e7c51b9c77792d4b098.tar.xz
Remplacement de la version vhdltbc par la version optimisée et corrigée
Diffstat (limited to 'src/add_vhdltbc/decrypt/inner_sbox_c.vhd')
-rw-r--r--src/add_vhdltbc/decrypt/inner_sbox_c.vhd53
1 files changed, 0 insertions, 53 deletions
diff --git a/src/add_vhdltbc/decrypt/inner_sbox_c.vhd b/src/add_vhdltbc/decrypt/inner_sbox_c.vhd
deleted file mode 100644
index 140772e..0000000
--- a/src/add_vhdltbc/decrypt/inner_sbox_c.vhd
+++ /dev/null
@@ -1,53 +0,0 @@
--- 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.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;
-