seed_sbox.c 4.2 KB

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