1 |
2 |
ruschi |
--------------------------------------------------------------------------------
|
2 |
10 |
ruschi |
-- This file is part of the project avs_aes
|
3 |
|
|
-- see: http://opencores.org/project,avs_aes
|
4 |
2 |
ruschi |
--
|
5 |
|
|
-- description: (THIS IS ONLY THE ENTITY FOR THE SHIFTROW COMPONENTS)
|
6 |
|
|
-- Shift Row rotates the Rows of the AES Block
|
7 |
|
|
-- This module takes the whole Rijdael state as input, extracts the rows,
|
8 |
|
|
-- shifts them and rebuilts the state.
|
9 |
|
|
--
|
10 |
|
|
-------------------------------------------------------------------------------
|
11 |
|
|
--
|
12 |
|
|
-- Author(s):
|
13 |
|
|
-- Thomas Ruschival -- ruschi@opencores.org (www.ruschival.de)
|
14 |
|
|
--
|
15 |
|
|
--------------------------------------------------------------------------------
|
16 |
|
|
-- Copyright (c) 2009, Authors and opencores.org
|
17 |
|
|
-- All rights reserved.
|
18 |
|
|
--
|
19 |
|
|
-- Redistribution and use in source and binary forms, with or without modification,
|
20 |
|
|
-- are permitted provided that the following conditions are met:
|
21 |
|
|
-- * Redistributions of source code must retain the above copyright notice,
|
22 |
|
|
-- this list of conditions and the following disclaimer.
|
23 |
|
|
-- * Redistributions in binary form must reproduce the above copyright notice,
|
24 |
|
|
-- this list of conditions and the following disclaimer in the documentation
|
25 |
|
|
-- and/or other materials provided with the distribution.
|
26 |
|
|
-- * Neither the name of the organization nor the names of its contributors
|
27 |
|
|
-- may be used to endorse or promote products derived from this software without
|
28 |
|
|
-- specific prior written permission.
|
29 |
|
|
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
30 |
|
|
-- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
31 |
|
|
-- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
32 |
|
|
-- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
33 |
|
|
-- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
|
34 |
|
|
-- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
35 |
|
|
-- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
36 |
|
|
-- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
37 |
|
|
-- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
38 |
|
|
-- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
39 |
|
|
-- THE POSSIBILITY OF SUCH DAMAGE
|
40 |
|
|
-------------------------------------------------------------------------------
|
41 |
|
|
-- version management:
|
42 |
|
|
-- $Author$
|
43 |
|
|
-- $Date$
|
44 |
|
|
-- $Revision$
|
45 |
|
|
-------------------------------------------------------------------------------
|
46 |
|
|
|
47 |
|
|
library IEEE;
|
48 |
|
|
use IEEE.numeric_std.all;
|
49 |
|
|
use IEEE.std_logic_1164.all;
|
50 |
|
|
|
51 |
11 |
ruschi |
library avs_aes_lib;
|
52 |
|
|
use avs_aes_lib.avs_aes_pkg.all;
|
53 |
2 |
ruschi |
|
54 |
|
|
entity Shiftrow is
|
55 |
|
|
port (
|
56 |
|
|
state_in : in STATE; -- Raw input data to be shifted
|
57 |
|
|
state_out : out STATE -- shifted result
|
58 |
|
|
);
|
59 |
|
|
end entity Shiftrow;
|
60 |
|
|
|