]> git.cryptolib.org Git - avr-crypto-lib.git/blob - seed/seed_sbox.c
fixing E-Mail-Address & Copyright
[avr-crypto-lib.git] / seed / seed_sbox.c
1 /* seed_sbox.c */
2 /*
3     This file is part of the AVR-Crypto-Lib.
4     Copyright (C) 2006-2015 Daniel Otte (bg@nerilex.org)
5
6     This program is free software: you can redistribute it and/or modify
7     it under the terms of the GNU General Public License as published by
8     the Free Software Foundation, either version 3 of the License, or
9     (at your option) any later version.
10
11     This program is distributed in the hope that it will be useful,
12     but WITHOUT ANY WARRANTY; without even the implied warranty of
13     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14     GNU General Public License for more details.
15
16     You should have received a copy of the GNU General Public License
17     along with this program.  If not, see <http://www.gnu.org/licenses/>.
18 */
19 /**
20  * \file        seed_sbox.c
21  * \author      Daniel Otte 
22  * \date        2007-06-1
23  * \brief       sboxes and constants for seed
24  * \par License 
25  * GPL
26  * 
27  */
28
29 #include <stdint.h>
30 #include <avr/pgmspace.h>
31
32 const uint8_t seed_sbox1[256] PROGMEM ={
33         169,  133,  214,  211,   84,   29,  172,   37, 
34          93,   67,   24,   30,   81,  252,  202,   99, 
35          40,   68,   32,  157,  224,  226,  200,   23, 
36         165,  143,    3,  123,  187,   19,  210,  238, 
37         112,  140,   63,  168,   50,  221,  246,  116, 
38         236,  149,   11,   87,   92,   91,  189,    1, 
39          36,   28,  115,  152,   16,  204,  242,  217, 
40          44,   231, 114,  131,  155,  209,  134,  201, 
41          96,   80,  163,  235,   13,  182,  158,   79, 
42         183,   90,  198,  120,  166,   18,  175,  213, 
43          97,  195,  180,   65,   82,  125,  141,    8, 
44          31,  153,    0,   25,    4,   83,  247,  225, 
45         253,  118,   47,   39,  176,  139,   14,  171, 
46         162,  110,  147,   77,  105,  124,    9,   10, 
47         191,  239,  243,  197,  135,   20,  254,  100, 
48         222,   46,   75,   26,    6,   33,  107,  102, 
49           2,  245,  146,  138,   12,  179,  126,  208, 
50         122,   71,  150,  229,   38,  128,  173,  223, 
51         161,   48,   55,  174,   54,   21,   34,   56, 
52         244,  167,   69,   76,  129,  233,  132,  151, 
53          53,  203,  206,   60,  113,   17,  199,  137, 
54         117,  251,  218,  248,  148,   89,  130,  196, 
55         255,   73,   57,  103,  192,  207,  215,  184, 
56          15,  142,   66,   35,  145,  108,  219,  164, 
57          52,  241,   72,  194,  111,   61,   45,   64, 
58         190,   62,  188,  193,  170,  186,   78,   85, 
59          59,  220,  104,  127,  156,  216,   74,   86, 
60         119,  160,  237,   70,  181,   43,  101,  250, 
61         227,  185,  177,  159,   94,  249,  230,  178, 
62          49,  234,  109,   95,  228,  240,  205,  136, 
63          22,   58,   88,  212,   98,   41,    7,   51, 
64         232,   27,    5,  121,  144,  106,   42,  154
65 };
66
67 const uint8_t seed_sbox2[256] PROGMEM ={
68          56,  232,   45,  166,  207,  222,  179,  184, 
69         175,   96,   85,  199,   68,  111,  107,   91, 
70         195,   98,   51,  181,   41,  160,  226,  167, 
71         211,  145,   17,    6,   28,  188,   54,   75, 
72         239,  136,  108,  168,   23,  196,   22,  244, 
73         194,   69,  225,  214,   63,   61,  142,  152, 
74          40,   78,  246,   62,  165,  249,   13,  223, 
75         216,   43,  102,  122,   39,   47,  241,  114, 
76          66,  212,   65,  192,  115,  103,  172,  139, 
77         247,  173,  128,   31,  202,   44,  170,   52, 
78         210,   11,  238,  233,   93,  148,   24,  248, 
79          87,  174,    8,  197,   19,  205,  134,  185, 
80         255,  125,  193,   49,  245,  138,  106,  177, 
81         209,   32,  215,    2,   34,    4,  104,  113, 
82           7,  219,  157,  153,   97,  190,  230,   89, 
83         221,   81,  144,  220,  154,  163,  171,  208, 
84         129,   15,   71,   26,  227,  236,  141,  191, 
85         150,  123,   92,  162,  161,   99,   35,   77, 
86         200,  158,  156,   58,   12,   46,  186,  110, 
87         159,   90,  242,  146,  243,   73,  120,  204, 
88          21,  251,  112,  117,  127,   53,   16,    3, 
89         100,  109,  198,  116,  213,  180,  234,    9, 
90         118,   25,  254,   64,   18,  224,  189,    5, 
91         250,    1,  240,   42,   94,  169,   86,   67, 
92         133,   20,  137,  155,  176,  229,   72,  121, 
93         151,  252,   30,  130,   33,  140,   27,   95, 
94         119,   84,  178,   29,   37,   79,    0,   70, 
95         237,   88,   82,  235,  126,  218,  201,  253, 
96          48,  149,  101,   60,  182,  228,  187,  124, 
97          14,   80,   57,   38,   50,  132,  105,  147, 
98          55,  231,   36,  164,  203,   83,   10,  135, 
99         217,   76,  131,  143,  206,   59,   74,  183 
100 };
101
102 /* key constants */
103 const uint32_t seed_kc[16] PROGMEM ={
104         0xb979379e, 
105         0x73f36e3c,
106         0xe6e6dd78, 
107         0xcccdbbf1, 
108         0x999b77e3, 
109         0x3337efc6, 
110         0x676ede8d, 
111         0xcfdcbc1b, 
112         0x9eb97937,
113         0x3c73f36e,     
114         0x78e6e6dd,
115         0xf1cccdbb,
116         0xe3999b77,
117         0xc63337ef,
118         0x8d676ede,
119         0x1bcfdcbc
120 };
121