ref_sha.c 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. /*
  2. ChibiOS - Copyright (C) 2006..2017 Giovanni Di Sirio
  3. Licensed under the Apache License, Version 2.0 (the "License");
  4. you may not use this file except in compliance with the License.
  5. You may obtain a copy of the License at
  6. http://www.apache.org/licenses/LICENSE-2.0
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License.
  12. */
  13. #include "hal.h"
  14. const uint8_t refSHA_SHA1_EMPTY[]={
  15. 0xDA,0x39,0xA3,0xEE,0x5E,0x6B,0x4B,0x0D,0x32,0x55,
  16. 0xBF,0xEF,0x95,0x60,0x18,0x90,0xAF,0xD8,0x07,0x09,
  17. 0x0D,0x0A,
  18. };
  19. const uint8_t refSHA_SHA1_3[]={
  20. 0xA9,0x99,0x3E,0x36,0x47,0x06,0x81,0x6A,0xBA,0x3E,
  21. 0x25,0x71,0x78,0x50,0xC2,0x6C,0x9C,0xD0,0xD8,0x9D,
  22. };
  23. const uint8_t refSHA_SHA1_56[]={
  24. 0x84,0x98,0x3E,0x44,0x1C,0x3B,0xD2,0x6E,0xBA,0xAE,
  25. 0x4A,0xA1,0xF9,0x51,0x29,0xE5,0xE5,0x46,0x70,0xF1,
  26. };
  27. const uint8_t refSHA_SHA1_64[]={
  28. 0x00,0x98,0xBA,0x82,0x4B,0x5C,0x16,0x42,0x7B,0xD7,
  29. 0xA1,0x12,0x2A,0x5A,0x44,0x2A,0x25,0xEC,0x64,0x4D,
  30. };
  31. const uint8_t refSHA_SHA1_128[]={
  32. 0xAD,0x5B,0x3F,0xDB,0xCB,0x52,0x67,0x78,0xC2,0x83,
  33. 0x9D,0x2F,0x15,0x1E,0xA7,0x53,0x99,0x5E,0x26,0xA0,
  34. };
  35. const uint8_t refSHA_SHA256_3[]={
  36. 0xBA,0x78,0x16,0xBF,0x8F,0x01,0xCF,0xEA,0x41,0x41,
  37. 0x40,0xDE,0x5D,0xAE,0x22,0x23,0xB0,0x03,0x61,0xA3,
  38. 0x96,0x17,0x7A,0x9C,0xB4,0x10,0xFF,0x61,0xF2,0x00,
  39. 0x15,0xAD,
  40. };
  41. const uint8_t refSHA_SHA256_56[]={
  42. 0x24,0x8D,0x6A,0x61,0xD2,0x06,0x38,0xB8,0xE5,0xC0,
  43. 0x26,0x93,0x0C,0x3E,0x60,0x39,0xA3,0x3C,0xE4,0x59,
  44. 0x64,0xFF,0x21,0x67,0xF6,0xEC,0xED,0xD4,0x19,0xDB,
  45. 0x06,0xC1,
  46. };
  47. const uint8_t refSHA_SHA256_64[]={
  48. 0xFF,0xE0,0x54,0xFE,0x7A,0xE0,0xCB,0x6D,0xC6,0x5C,
  49. 0x3A,0xF9,0xB6,0x1D,0x52,0x09,0xF4,0x39,0x85,0x1D,
  50. 0xB4,0x3D,0x0B,0xA5,0x99,0x73,0x37,0xDF,0x15,0x46,
  51. 0x68,0xEB,
  52. };
  53. const uint8_t refSHA_SHA256_128[]={
  54. 0x68,0x36,0xCF,0x13,0xBA,0xC4,0x00,0xE9,0x10,0x50,
  55. 0x71,0xCD,0x6A,0xF4,0x70,0x84,0xDF,0xAC,0xAD,0x4E,
  56. 0x5E,0x30,0x2C,0x94,0xBF,0xED,0x24,0xE0,0x13,0xAF,
  57. 0xB7,0x3E,
  58. };
  59. const uint8_t refSHA_SHA512_3[]={
  60. 0xDD,0xAF,0x35,0xA1,0x93,0x61,0x7A,0xBA,0xCC,0x41,
  61. 0x73,0x49,0xAE,0x20,0x41,0x31,0x12,0xE6,0xFA,0x4E,
  62. 0x89,0xA9,0x7E,0xA2,0x0A,0x9E,0xEE,0xE6,0x4B,0x55,
  63. 0xD3,0x9A,0x21,0x92,0x99,0x2A,0x27,0x4F,0xC1,0xA8,
  64. 0x36,0xBA,0x3C,0x23,0xA3,0xFE,0xEB,0xBD,0x45,0x4D,
  65. 0x44,0x23,0x64,0x3C,0xE8,0x0E,0x2A,0x9A,0xC9,0x4F,
  66. 0xA5,0x4C,0xA4,0x9F,
  67. };
  68. const uint8_t refSHA_SHA512_56[]={
  69. 0x20,0x4A,0x8F,0xC6,0xDD,0xA8,0x2F,0x0A,0x0C,0xED,
  70. 0x7B,0xEB,0x8E,0x08,0xA4,0x16,0x57,0xC1,0x6E,0xF4,
  71. 0x68,0xB2,0x28,0xA8,0x27,0x9B,0xE3,0x31,0xA7,0x03,
  72. 0xC3,0x35,0x96,0xFD,0x15,0xC1,0x3B,0x1B,0x07,0xF9,
  73. 0xAA,0x1D,0x3B,0xEA,0x57,0x78,0x9C,0xA0,0x31,0xAD,
  74. 0x85,0xC7,0xA7,0x1D,0xD7,0x03,0x54,0xEC,0x63,0x12,
  75. 0x38,0xCA,0x34,0x45,
  76. };
  77. const uint8_t refSHA_SHA512_64[]={
  78. 0x01,0xD3,0x5C,0x10,0xC6,0xC3,0x8C,0x2D,0xCF,0x48,
  79. 0xF7,0xEE,0xBB,0x32,0x35,0xFB,0x5A,0xD7,0x4A,0x65,
  80. 0xEC,0x4C,0xD0,0x16,0xE2,0x35,0x4C,0x63,0x7A,0x8F,
  81. 0xB4,0x9B,0x69,0x5E,0xF3,0xC1,0xD6,0xF7,0xAE,0x4C,
  82. 0xD7,0x4D,0x78,0xCC,0x9C,0x9B,0xCA,0xC9,0xD4,0xF2,
  83. 0x3A,0x73,0x01,0x99,0x98,0xA7,0xF7,0x30,0x38,0xA5,
  84. 0xC9,0xB2,0xDB,0xDE,
  85. };
  86. const uint8_t refSHA_SHA512_128[]={
  87. 0xB7,0x3D,0x19,0x29,0xAA,0x61,0x59,0x34,0xE6,0x1A,
  88. 0x87,0x15,0x96,0xB3,0xF3,0xB3,0x33,0x59,0xF4,0x2B,
  89. 0x81,0x75,0x60,0x2E,0x89,0xF7,0xE0,0x6E,0x5F,0x65,
  90. 0x8A,0x24,0x36,0x67,0x80,0x7E,0xD3,0x00,0x31,0x4B,
  91. 0x95,0xCA,0xCD,0xD5,0x79,0xF3,0xE3,0x3A,0xBD,0xFB,
  92. 0xE3,0x51,0x90,0x95,0x19,0xA8,0x46,0xD4,0x65,0xC5,
  93. 0x95,0x82,0xF3,0x21,
  94. };