-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCryptoCore.vhd
50 lines (44 loc) · 1.14 KB
/
CryptoCore.vhd
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
library ieee ;
use ieee.std_logic_1164.all ;
use ieee.numeric_std.all ;
entity CryptoCore is
port (
clock, start : IN STD_LOGIC;
algorithmSelect : IN STD_LOGIC_VECTOR(1 DOWNTO 0);
textIn, key1, key2, key3 : IN STD_LOGIC_VECTOR(63 DOWNTO 0);
done : OUT STD_LOGIC;
textOut : OUT STD_LOGIC_VECTOR(63 DOWNTO 0 )
) ;
end entity ; -- CryptoCore
architecture arch of CryptoCore is
COMPONENT AlgorithmSelect is
port (
clock : IN STD_LOGIC;
algorithmSelect : IN STD_LOGIC_VECTOR(1 DOWNTO 0);
tMode, encryptionMode : OUT STD_LOGIC
) ;
end COMPONENT;
COMPONENT DES is
port (
clock, start, reset, decryption : IN STD_LOGIC;
plainText, key : IN STD_LOGIC_VECTOR(63 DOWNTO 0);
done : OUT STD_LOGIC;
ciperText : OUT STD_LOGIC_VECTOR(63 DOWNTO 0)
) ;
end COMPONENT;
COMPONENT KeyStore is
port (
clock : IN STD_LOGIC;
keyIn : IN STD_LOGIC_VECTOR(63 DOWNTO 0);
keyOut : OUT STD_LOGIC_VECTOR(63 DOWNTO 0)
) ;
end COMPONENT;
COMPONENT Mux64 is
port (
sel : IN STD_LOGIC;
A, B : IN STD_LOGIC_VECTOR(63 DOWNTO 0);
Y : OUT STD_LOGIC_VECTOR(63 DOWNTO 0)
) ;
end COMPONENT;
begin
end architecture ; -- arch