ref_gcm.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. #ifndef TEST_REF_GCM_H_
  2. #define TEST_REF_GCM_H_
  3. #define K3_LEN 16
  4. #define P3_LEN 16
  5. #define IV3_LEN (12+4)
  6. #define AAD3_LEN 16
  7. #define C3_LEN 16
  8. #define T3_LEN 16
  9. extern const uint8_t K3[K3_LEN];
  10. extern const uint8_t IV3[IV3_LEN];
  11. extern const uint8_t P3[P3_LEN];
  12. extern const uint8_t A3[AAD3_LEN];
  13. extern const uint8_t C3[C3_LEN];
  14. extern const uint8_t T3[T3_LEN];
  15. ///////
  16. // http://csrc.nist.gov/groups/STM/cavp/gcmtestvectors.zip gcmEncryptExtIV128.rsp
  17. // [Keylen = 128]
  18. // [IVlen = 96]
  19. // [PTlen = 256]
  20. // [AADlen = 128]
  21. // [Taglen = 128]
  22. // Count = 0
  23. // K = 298efa1ccf29cf62ae6824bfc19557fc
  24. // IV = 6f58a93fe1d207fae4ed2f6d
  25. // P = cc38bccd6bc536ad919b1395f5d63801f99f8068d65ca5ac63872daf16b93901
  26. // AAD = 021fafd238463973ffe80256e5b1c6b1
  27. // C = dfce4e9cd291103d7fe4e63351d9e79d3dfd391e3267104658212da96521b7db
  28. // T = 542465ef599316f73a7a560509a2d9f2
  29. ///////
  30. #define K4_LEN 16
  31. #define P4_LEN 32
  32. #define IV4_LEN (12+4)
  33. #define AAD4_LEN 16
  34. #define C4_LEN 32
  35. #define T4_LEN 16
  36. extern const uint8_t K4[K4_LEN] ;
  37. extern const uint8_t IV4[IV4_LEN];
  38. extern const uint8_t P4[P4_LEN] ;
  39. extern const uint8_t A4[AAD4_LEN] ;
  40. extern const uint8_t C4[C4_LEN] ;
  41. extern const uint8_t T4[T4_LEN] ;
  42. ///////
  43. // http://csrc.nist.gov/groups/STM/cavp/gcmtestvectors.zip gcmEncryptExtIV128.rsp
  44. // [Keylen = 128]
  45. // [IVlen = 96]
  46. // [PTlen = 256]
  47. // [AADlen = 128]
  48. // [Taglen = 128]
  49. // Count = 0
  50. // K = 298efa1ccf29cf62ae6824bfc19557fc
  51. // IV = 6f58a93fe1d207fae4ed2f6d
  52. // P = cc38bccd6bc536ad919b1395f5d63801f99f8068d65ca5ac63872daf16b93901
  53. // AAD = 021fafd238463973ffe80256e5b1c6b1
  54. // C = dfce4e9cd291103d7fe4e63351d9e79d3dfd391e3267104658212da96521b7db
  55. // T = 542465ef599316f73a7a560509a2d9f2
  56. ///////
  57. #define K5_LEN 16
  58. #define P5_LEN 32
  59. #define IV5_LEN (12+4)
  60. #define AAD5_LEN 16
  61. #define C5_LEN 32
  62. #define T5_LEN 16
  63. extern const uint8_t K5[K5_LEN] ;
  64. extern const uint8_t IV5[IV5_LEN];
  65. extern const uint8_t P5[P5_LEN] ;
  66. extern const uint8_t A5[AAD5_LEN] ;
  67. extern const uint8_t C5[C5_LEN] ;
  68. extern const uint8_t T5[T5_LEN] ;
  69. #endif //TEST_REF_GCM_H_