⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 blowfishpirom.vhdl

📁 blowfish vhdl version
💻 VHDL
📖 第 1 页 / 共 2 页
字号:
-- Copyright © 2007 Wesley J. Landaker <wjl@icecavern.net>-- -- This program is free software: you can redistribute it and/or modify-- it under the terms of the GNU General Public License as published by-- the Free Software Foundation, either version 3 of the License, or-- (at your option) any later version.-- -- This program is distributed in the hope that it will be useful,-- but WITHOUT ANY WARRANTY; without even the implied warranty of-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the-- GNU General Public License for more details.-- -- You should have received a copy of the GNU General Public License-- along with this program.  If not, see <http://www.gnu.org/licenses/>.library ieee;use ieee.std_logic_1164.all;use ieee.numeric_std.all;entity BlowfishPiROM is  port (    -- Clock    CLK_I : in std_logic;    -- Pi ROM Interface    ADDR_I : in  std_logic_vector(9 downto 0);    DATA_O : out std_logic_vector(31 downto 0)    );end entity;architecture rtl of BlowfishPiROM is  type rom_t is array (0 to 1023) of std_logic_vector(31 downto 0);  signal rom : rom_t;begin    process (CLK_I, rom) is    subtype addr_t is natural range 0 to 1023;    variable addr : addr_t;  begin    if rising_edge(CLK_I) then      addr := to_integer(unsigned(ADDR_I));    end if;    DATA_O <= rom(addr);  end process;  rom <= (    -- S-Box #1    x"d1310ba6", x"98dfb5ac", x"2ffd72db", x"d01adfb7",    x"b8e1afed", x"6a267e96", x"ba7c9045", x"f12c7f99",    x"24a19947", x"b3916cf7", x"0801f2e2", x"858efc16",    x"636920d8", x"71574e69", x"a458fea3", x"f4933d7e",    x"0d95748f", x"728eb658", x"718bcd58", x"82154aee",    x"7b54a41d", x"c25a59b5", x"9c30d539", x"2af26013",    x"c5d1b023", x"286085f0", x"ca417918", x"b8db38ef",    x"8e79dcb0", x"603a180e", x"6c9e0e8b", x"b01e8a3e",    x"d71577c1", x"bd314b27", x"78af2fda", x"55605c60",    x"e65525f3", x"aa55ab94", x"57489862", x"63e81440",    x"55ca396a", x"2aab10b6", x"b4cc5c34", x"1141e8ce",    x"a15486af", x"7c72e993", x"b3ee1411", x"636fbc2a",    x"2ba9c55d", x"741831f6", x"ce5c3e16", x"9b87931e",    x"afd6ba33", x"6c24cf5c", x"7a325381", x"28958677",    x"3b8f4898", x"6b4bb9af", x"c4bfe81b", x"66282193",    x"61d809cc", x"fb21a991", x"487cac60", x"5dec8032",    x"ef845d5d", x"e98575b1", x"dc262302", x"eb651b88",    x"23893e81", x"d396acc5", x"0f6d6ff3", x"83f44239",    x"2e0b4482", x"a4842004", x"69c8f04a", x"9e1f9b5e",    x"21c66842", x"f6e96c9a", x"670c9c61", x"abd388f0",    x"6a51a0d2", x"d8542f68", x"960fa728", x"ab5133a3",    x"6eef0b6c", x"137a3be4", x"ba3bf050", x"7efb2a98",    x"a1f1651d", x"39af0176", x"66ca593e", x"82430e88",    x"8cee8619", x"456f9fb4", x"7d84a5c3", x"3b8b5ebe",    x"e06f75d8", x"85c12073", x"401a449f", x"56c16aa6",    x"4ed3aa62", x"363f7706", x"1bfedf72", x"429b023d",    x"37d0d724", x"d00a1248", x"db0fead3", x"49f1c09b",    x"075372c9", x"80991b7b", x"25d479d8", x"f6e8def7",    x"e3fe501a", x"b6794c3b", x"976ce0bd", x"04c006ba",    x"c1a94fb6", x"409f60c4", x"5e5c9ec2", x"196a2463",    x"68fb6faf", x"3e6c53b5", x"1339b2eb", x"3b52ec6f",    x"6dfc511f", x"9b30952c", x"cc814544", x"af5ebd09",    x"bee3d004", x"de334afd", x"660f2807", x"192e4bb3",    x"c0cba857", x"45c8740f", x"d20b5f39", x"b9d3fbdb",    x"5579c0bd", x"1a60320a", x"d6a100c6", x"402c7279",    x"679f25fe", x"fb1fa3cc", x"8ea5e9f8", x"db3222f8",    x"3c7516df", x"fd616b15", x"2f501ec8", x"ad0552ab",    x"323db5fa", x"fd238760", x"53317b48", x"3e00df82",    x"9e5c57bb", x"ca6f8ca0", x"1a87562e", x"df1769db",    x"d542a8f6", x"287effc3", x"ac6732c6", x"8c4f5573",    x"695b27b0", x"bbca58c8", x"e1ffa35d", x"b8f011a0",    x"10fa3d98", x"fd2183b8", x"4afcb56c", x"2dd1d35b",    x"9a53e479", x"b6f84565", x"d28e49bc", x"4bfb9790",    x"e1ddf2da", x"a4cb7e33", x"62fb1341", x"cee4c6e8",    x"ef20cada", x"36774c01", x"d07e9efe", x"2bf11fb4",    x"95dbda4d", x"ae909198", x"eaad8e71", x"6b93d5a0",    x"d08ed1d0", x"afc725e0", x"8e3c5b2f", x"8e7594b7",    x"8ff6e2fb", x"f2122b64", x"8888b812", x"900df01c",    x"4fad5ea0", x"688fc31c", x"d1cff191", x"b3a8c1ad",    x"2f2f2218", x"be0e1777", x"ea752dfe", x"8b021fa1",    x"e5a0cc0f", x"b56f74e8", x"18acf3d6", x"ce89e299",    x"b4a84fe0", x"fd13e0b7", x"7cc43b81", x"d2ada8d9",    x"165fa266", x"80957705", x"93cc7314", x"211a1477",    x"e6ad2065", x"77b5fa86", x"c75442f5", x"fb9d35cf",    x"ebcdaf0c", x"7b3e89a0", x"d6411bd3", x"ae1e7e49",    x"00250e2d", x"2071b35e", x"226800bb", x"57b8e0af",    x"2464369b", x"f009b91e", x"5563911d", x"59dfa6aa",    x"78c14389", x"d95a537f", x"207d5ba2", x"02e5b9c5",    x"83260376", x"6295cfa9", x"11c81968", x"4e734a41",    x"b3472dca", x"7b14a94a", x"1b510052", x"9a532915",    x"d60f573f", x"bc9bc6e4", x"2b60a476", x"81e67400",    x"08ba6fb5", x"571be91f", x"f296ec6b", x"2a0dd915",    x"b6636521", x"e7b9f9b6", x"ff34052e", x"c5855664",    x"53b02d5d", x"a99f8fa1", x"08ba4799", x"6e85076a",    -- S-Box #2    x"4b7a70e9", x"b5b32944", x"db75092e", x"c4192623",    x"ad6ea6b0", x"49a7df7d", x"9cee60b8", x"8fedb266",    x"ecaa8c71", x"699a17ff", x"5664526c", x"c2b19ee1",    x"193602a5", x"75094c29", x"a0591340", x"e4183a3e",    x"3f54989a", x"5b429d65", x"6b8fe4d6", x"99f73fd6",    x"a1d29c07", x"efe830f5", x"4d2d38e6", x"f0255dc1",    x"4cdd2086", x"8470eb26", x"6382e9c6", x"021ecc5e",    x"09686b3f", x"3ebaefc9", x"3c971814", x"6b6a70a1",    x"687f3584", x"52a0e286", x"b79c5305", x"aa500737",    x"3e07841c", x"7fdeae5c", x"8e7d44ec", x"5716f2b8",    x"b03ada37", x"f0500c0d", x"f01c1f04", x"0200b3ff",    x"ae0cf51a", x"3cb574b2", x"25837a58", x"dc0921bd",    x"d19113f9", x"7ca92ff6", x"94324773", x"22f54701",    x"3ae5e581", x"37c2dadc", x"c8b57634", x"9af3dda7",    x"a9446146", x"0fd0030e", x"ecc8c73e", x"a4751e41",    x"e238cd99", x"3bea0e2f", x"3280bba1", x"183eb331",    x"4e548b38", x"4f6db908", x"6f420d03", x"f60a04bf",    x"2cb81290", x"24977c79", x"5679b072", x"bcaf89af",    x"de9a771f", x"d9930810", x"b38bae12", x"dccf3f2e",    x"5512721f", x"2e6b7124", x"501adde6", x"9f84cd87",    x"7a584718", x"7408da17", x"bc9f9abc", x"e94b7d8c",    x"ec7aec3a", x"db851dfa", x"63094366", x"c464c3d2",    x"ef1c1847", x"3215d908", x"dd433b37", x"24c2ba16",    x"12a14d43", x"2a65c451", x"50940002", x"133ae4dd",    x"71dff89e", x"10314e55", x"81ac77d6", x"5f11199b",    x"043556f1", x"d7a3c76b", x"3c11183b", x"5924a509",    x"f28fe6ed", x"97f1fbfa", x"9ebabf2c", x"1e153c6e",    x"86e34570", x"eae96fb1", x"860e5e0a", x"5a3e2ab3",    x"771fe71c", x"4e3d06fa", x"2965dcb9", x"99e71d0f",    x"803e89d6", x"5266c825", x"2e4cc978", x"9c10b36a",    x"c6150eba", x"94e2ea78", x"a5fc3c53", x"1e0a2df4",    x"f2f74ea7", x"361d2b3d", x"1939260f", x"19c27960",    x"5223a708", x"f71312b6", x"ebadfe6e", x"eac31f66",    x"e3bc4595", x"a67bc883", x"b17f37d1", x"018cff28",    x"c332ddef", x"be6c5aa5", x"65582185", x"68ab9802",    x"eecea50f", x"db2f953b", x"2aef7dad", x"5b6e2f84",    x"1521b628", x"29076170", x"ecdd4775", x"619f1510",    x"13cca830", x"eb61bd96", x"0334fe1e", x"aa0363cf",    x"b5735c90", x"4c70a239", x"d59e9e0b", x"cbaade14",    x"eecc86bc", x"60622ca7", x"9cab5cab", x"b2f3846e",    x"648b1eaf", x"19bdf0ca", x"a02369b9", x"655abb50",    x"40685a32", x"3c2ab4b3", x"319ee9d5", x"c021b8f7",    x"9b540b19", x"875fa099", x"95f7997e", x"623d7da8",    x"f837889a", x"97e32d77", x"11ed935f", x"16681281",

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -