OpenCores
URL https://opencores.org/ocsvn/aes_decry_ip_128bit/aes_decry_ip_128bit/trunk

Subversion Repositories aes_decry_ip_128bit

[/] [aes_decry_ip_128bit/] [trunk/] [rtl/] [inv_mix_column.vhd] - Blame information for rev 4

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 4 ghegde
--************************************************************
2
--Copyright 2015, Ganesh Hegde < ghegde@opencores.org >      
3
--                                                           
4
--This source file may be used and distributed without  
5
--restriction provided that this copyright statement is not 
6
--removed from the file and that any derivative work contains
7
--the original copyright notice and the associated disclaimer.
8
--
9
--This source is distributed in the hope that it will be
10
--useful, but WITHOUT ANY WARRANTY; without even the implied
11
--warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12
--PURPOSE.  See the GNU Lesser General Public License for more
13
--details.
14
--
15
--You should have received a copy of the GNU Lesser General
16
--Public License along with this source; if not, download it
17
--from http://www.opencores.org/lgpl.shtml
18
--
19
--*************************************************************
20
 
21
--*************************************************************
22
--Multiply one column 
23
--
24
--Logic type : Combinational
25
--*************************************************************
26
 
27
 
28
library ieee;
29
use ieee.std_logic_1164.all;
30
 
31
entity inv_mix_column is
32
   port(
33
           column: in std_logic_vector(31 downto 0);
34
                   p0,p1,p2,p3: out std_logic_vector(31 downto 0)
35
        );
36
end inv_mix_column;
37
 
38
architecture beh_inv_mix_column of inv_mix_column is
39
   component GF_mul
40
   port(
41
        in_byte: in std_logic_vector(7 downto 0);
42
                out_word: out std_logic_vector(31 downto 0)--0x0E,0x09,0x0D,0x0B
43
        );
44
   end component;
45
 
46
   signal b0,b1,b2,b3: std_logic_vector(7 downto 0);
47
   signal k0,k1,k2,k3: std_logic_vector(31 downto 0);
48
begin
49
 
50
   GF_mul_inst1:GF_mul
51
   port map(in_byte=>b0,out_word=>k0);
52
 
53
   GF_mul_inst2:GF_mul
54
   port map(in_byte=>b1,out_word=>k1);
55
 
56
   GF_mul_inst3:GF_mul
57
   port map(in_byte=>b2,out_word=>k2);
58
 
59
   GF_mul_inst4:GF_mul
60
   port map(in_byte=>b3,out_word=>k3);
61
 
62
   b0 <= column(31 downto 24);
63
   b1 <= column(23 downto 16);
64
   b2 <= column(15 downto 8);
65
   b3 <= column(7 downto 0);
66
 
67
   p0 <= k0;
68
   p1 <= k1(7 downto 0) & k1(31 downto 8);
69
   p2 <= k2(15 downto 0) & k2(31 downto 16);
70
   p3 <= k3(23 downto 0) & k3(31 downto 24);
71
end beh_inv_mix_column;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.