const_pack.vhd (1425B)
1 -- Implementation of the Lilliput-TBC tweakable block cipher by the 2 -- Lilliput-AE team, hereby denoted as "the implementer". 3 -- 4 -- For more information, feedback or questions, refer to our website: 5 -- https://paclido.fr/lilliput-ae 6 -- 7 -- To the extent possible under law, the implementer has waived all copyright 8 -- and related or neighboring rights to the source code in this file. 9 -- http://creativecommons.org/publicdomain/zero/1.0/library IEEE; 10 11 library IEEE; 12 library work; 13 use IEEE.STD_LOGIC_1164.ALL; 14 15 package const_pack is 16 --Lilliput constants 17 constant NONCE_LEN : integer := 120; 18 constant TAG_LEN : integer := 128; 19 constant DATA_LEN : integer := 128; 20 21 --Lilliput parameters 22 constant ROUND_NB : integer := 42; 23 constant TWEAK_LEN : integer := 192; 24 constant KEY_LEN : integer := 256; 25 26 -- lenght of inputs 27 constant DATA_IN_LEN : integer := 32; 28 constant KEY_IN_LEN : integer := 32; 29 constant TWEAK_IN_LEN : integer := 32; 30 constant DATA_OUT_LEN : integer := 32; 31 constant sw : integer := 32; 32 constant W : integer := 32; 33 34 35 -- Segment Type Encoding 36 constant TYPE_AD : std_logic_vector(3 downto 0) := "0001"; 37 constant TYPE_MES : std_logic_vector(3 downto 0) := "0100"; 38 constant TYPE_CT : std_logic_vector(3 downto 0) := "1001"; 39 constant TYPE_TAG : std_logic_vector(3 downto 0) := "1000"; 40 constant TYPE_NONCE : std_logic_vector(3 downto 0) := "1100"; 41 end const_pack;