aboutsummaryrefslogtreecommitdiffstats
path: root/test/crypto/source/testref/ref_gcm.h
blob: cc2d4354487e245b3a9e2af4bc3d7f9ab8428fa2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#ifndef TEST_REF_GCM_H_
#define TEST_REF_GCM_H_



#define K3_LEN      16
#define P3_LEN      16
#define IV3_LEN     (12+4)
#define AAD3_LEN    16
#define C3_LEN      16
#define T3_LEN      16

extern const uint8_t K3[K3_LEN];
extern const uint8_t IV3[IV3_LEN];
extern const uint8_t P3[P3_LEN];
extern const uint8_t A3[AAD3_LEN];
extern const uint8_t C3[C3_LEN];
extern const uint8_t T3[T3_LEN];

///////
// http://csrc.nist.gov/groups/STM/cavp/gcmtestvectors.zip gcmEncryptExtIV128.rsp
// [Keylen = 128]
// [IVlen = 96]
// [PTlen = 256]
// [AADlen = 128]
// [Taglen = 128]
// Count = 0
// K = 298efa1ccf29cf62ae6824bfc19557fc
// IV = 6f58a93fe1d207fae4ed2f6d
// P = cc38bccd6bc536ad919b1395f5d63801f99f8068d65ca5ac63872daf16b93901
// AAD = 021fafd238463973ffe80256e5b1c6b1
// C = dfce4e9cd291103d7fe4e63351d9e79d3dfd391e3267104658212da96521b7db
// T = 542465ef599316f73a7a560509a2d9f2
///////
#define K4_LEN      16
#define P4_LEN      32
#define IV4_LEN     (12+4)
#define AAD4_LEN    16
#define C4_LEN      32
#define T4_LEN      16

extern const uint8_t K4[K4_LEN] ;
extern const uint8_t IV4[IV4_LEN];
extern const uint8_t P4[P4_LEN] ;
extern const uint8_t A4[AAD4_LEN] ;
extern const uint8_t C4[C4_LEN] ;
extern const uint8_t T4[T4_LEN] ;

///////
// http://csrc.nist.gov/groups/STM/cavp/gcmtestvectors.zip gcmEncryptExtIV128.rsp
// [Keylen = 128]
// [IVlen = 96]
// [PTlen = 256]
// [AADlen = 128]
// [Taglen = 128]
// Count = 0
// K = 298efa1ccf29cf62ae6824bfc19557fc
// IV = 6f58a93fe1d207fae4ed2f6d
// P = cc38bccd6bc536ad919b1395f5d63801f99f8068d65ca5ac63872daf16b93901
// AAD = 021fafd238463973ffe80256e5b1c6b1
// C = dfce4e9cd291103d7fe4e63351d9e79d3dfd391e3267104658212da96521b7db
// T = 542465ef599316f73a7a560509a2d9f2
///////
#define K5_LEN      16
#define P5_LEN      32
#define IV5_LEN     (12+4)
#define AAD5_LEN    16
#define C5_LEN      32
#define T5_LEN      16

extern const uint8_t K5[K5_LEN] ;
extern const uint8_t IV5[IV5_LEN];
extern const uint8_t P5[P5_LEN] ;
extern const uint8_t A5[AAD5_LEN] ;
extern const uint8_t C5[C5_LEN] ;
extern const uint8_t T5[T5_LEN] ;





#endif //TEST_REF_GCM_H_