1 // SPDX-License-Identifier: BSD-2-Clause
2 /* LibTomCrypt, modular cryptographic library -- Tom St Denis
3  *
4  * LibTomCrypt is a library that provides various cryptographic
5  * algorithms in a highly modular and flexible manner.
6  *
7  * The library is free for all purposes without any express
8  * guarantee it works.
9  */
10 
11 /**
12    @file ocb3_test.c
13    OCB implementation, self-test by Tom St Denis
14 */
15 #include "tomcrypt_private.h"
16 
17 #ifdef LTC_OCB3_MODE
18 
19 /**
20    Test the OCB protocol
21    @return CRYPT_OK if successful
22 */
ocb3_test(void)23 int ocb3_test(void)
24 {
25 #ifndef LTC_TEST
26    return CRYPT_NOP;
27 #else
28    /* test vectors from: http://tools.ietf.org/html/draft-krovetz-ocb-03 */
29    unsigned char key[16]   = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F };
30    unsigned char nonce[12] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B };
31    const struct {
32          int ptlen;
33          int aadlen;
34          unsigned char pt[64], aad[64], ct[64], tag[16];
35    } tests[] = {
36 
37    { /* index:0 */
38      0, /* PLAINTEXT length */
39      0, /* AAD length */
40      { 0 }, /* PLAINTEXT */
41      { 0 }, /* AAD */
42      { 0 }, /* CIPHERTEXT */
43      { 0x19,0x7b,0x9c,0x3c,0x44,0x1d,0x3c,0x83,0xea,0xfb,0x2b,0xef,0x63,0x3b,0x91,0x82 }, /* TAG */
44    },
45    { /* index:1 */
46      8, /* PLAINTEXT length */
47      8, /* AAD length */
48      { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07 }, /* PLAINTEXT */
49      { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07 }, /* AAD */
50      { 0x92,0xb6,0x57,0x13,0x0a,0x74,0xb8,0x5a }, /* CIPHERTEXT */
51      { 0x16,0xdc,0x76,0xa4,0x6d,0x47,0xe1,0xea,0xd5,0x37,0x20,0x9e,0x8a,0x96,0xd1,0x4e }, /* TAG */
52    },
53    { /* index:2 */
54      0, /* PLAINTEXT length */
55      8, /* AAD length */
56      { 0 }, /* PLAINTEXT */
57      { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07 }, /* AAD */
58      { 0 }, /* CIPHERTEXT */
59      { 0x98,0xb9,0x15,0x52,0xc8,0xc0,0x09,0x18,0x50,0x44,0xe3,0x0a,0x6e,0xb2,0xfe,0x21 }, /* TAG */
60    },
61    { /* index:3 */
62      8, /* PLAINTEXT length */
63      0, /* AAD length */
64      { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07 }, /* PLAINTEXT */
65      { 0 }, /* AAD */
66      { 0x92,0xb6,0x57,0x13,0x0a,0x74,0xb8,0x5a }, /* CIPHERTEXT */
67      { 0x97,0x1e,0xff,0xca,0xe1,0x9a,0xd4,0x71,0x6f,0x88,0xe8,0x7b,0x87,0x1f,0xbe,0xed }, /* TAG */
68    },
69    { /* index:4 */
70      16, /* PLAINTEXT length */
71      16, /* AAD length */
72      { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f }, /* PLAINTEXT */
73      { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f }, /* AAD */
74      { 0xbe,0xa5,0xe8,0x79,0x8d,0xbe,0x71,0x10,0x03,0x1c,0x14,0x4d,0xa0,0xb2,0x61,0x22 }, /* CIPHERTEXT */
75      { 0x77,0x6c,0x99,0x24,0xd6,0x72,0x3a,0x1f,0xc4,0x52,0x45,0x32,0xac,0x3e,0x5b,0xeb }, /* TAG */
76    },
77    { /* index:5 */
78      0, /* PLAINTEXT length */
79      16, /* AAD length */
80      { 0 }, /* PLAINTEXT */
81      { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f }, /* AAD */
82      { 0 }, /* CIPHERTEXT */
83      { 0x7d,0xdb,0x8e,0x6c,0xea,0x68,0x14,0x86,0x62,0x12,0x50,0x96,0x19,0xb1,0x9c,0xc6 }, /* TAG */
84    },
85    { /* index:6 */
86      16, /* PLAINTEXT length */
87      0, /* AAD length */
88      { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f }, /* PLAINTEXT */
89      { 0 }, /* AAD */
90      { 0xbe,0xa5,0xe8,0x79,0x8d,0xbe,0x71,0x10,0x03,0x1c,0x14,0x4d,0xa0,0xb2,0x61,0x22 }, /* CIPHERTEXT */
91      { 0x13,0xcc,0x8b,0x74,0x78,0x07,0x12,0x1a,0x4c,0xbb,0x3e,0x4b,0xd6,0xb4,0x56,0xaf }, /* TAG */
92    },
93    { /* index:7 */
94      24, /* PLAINTEXT length */
95      24, /* AAD length */
96      { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17 }, /* PLAINTEXT */
97      { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17 }, /* AAD */
98      { 0xbe,0xa5,0xe8,0x79,0x8d,0xbe,0x71,0x10,0x03,0x1c,0x14,0x4d,0xa0,0xb2,0x61,0x22,0xfc,0xfc,0xee,0x7a,0x2a,0x8d,0x4d,0x48 }, /* CIPHERTEXT */
99      { 0x5f,0xa9,0x4f,0xc3,0xf3,0x88,0x20,0xf1,0xdc,0x3f,0x3d,0x1f,0xd4,0xe5,0x5e,0x1c }, /* TAG */
100    },
101    { /* index:8 */
102      0, /* PLAINTEXT length */
103      24, /* AAD length */
104      { 0 }, /* PLAINTEXT */
105      { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17 }, /* AAD */
106      { 0 }, /* CIPHERTEXT */
107      { 0x28,0x20,0x26,0xda,0x30,0x68,0xbc,0x9f,0xa1,0x18,0x68,0x1d,0x55,0x9f,0x10,0xf6 }, /* TAG */
108    },
109    { /* index:9 */
110      24, /* PLAINTEXT length */
111      0, /* AAD length */
112      { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17 }, /* PLAINTEXT */
113      { 0 }, /* AAD */
114      { 0xbe,0xa5,0xe8,0x79,0x8d,0xbe,0x71,0x10,0x03,0x1c,0x14,0x4d,0xa0,0xb2,0x61,0x22,0xfc,0xfc,0xee,0x7a,0x2a,0x8d,0x4d,0x48 }, /* CIPHERTEXT */
115      { 0x6e,0xf2,0xf5,0x25,0x87,0xfd,0xa0,0xed,0x97,0xdc,0x7e,0xed,0xe2,0x41,0xdf,0x68 }, /* TAG */
116    },
117    { /* index:10 */
118      32, /* PLAINTEXT length */
119      32, /* AAD length */
120      { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1a,0x1b,0x1c,0x1d,0x1e,0x1f }, /* PLAINTEXT */
121      { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1a,0x1b,0x1c,0x1d,0x1e,0x1f }, /* AAD */
122      { 0xbe,0xa5,0xe8,0x79,0x8d,0xbe,0x71,0x10,0x03,0x1c,0x14,0x4d,0xa0,0xb2,0x61,0x22,0xce,0xaa,0xb9,0xb0,0x5d,0xf7,0x71,0xa6,0x57,0x14,0x9d,0x53,0x77,0x34,0x63,0xcb }, /* CIPHERTEXT */
123      { 0xb2,0xa0,0x40,0xdd,0x3b,0xd5,0x16,0x43,0x72,0xd7,0x6d,0x7b,0xb6,0x82,0x42,0x40 }, /* TAG */
124    },
125    { /* index:11 */
126      0, /* PLAINTEXT length */
127      32, /* AAD length */
128      { 0 }, /* PLAINTEXT */
129      { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1a,0x1b,0x1c,0x1d,0x1e,0x1f }, /* AAD */
130      { 0 }, /* CIPHERTEXT */
131      { 0xe1,0xe0,0x72,0x63,0x3b,0xad,0xe5,0x1a,0x60,0xe8,0x59,0x51,0xd9,0xc4,0x2a,0x1b }, /* TAG */
132    },
133    { /* index:12 */
134      32, /* PLAINTEXT length */
135      0, /* AAD length */
136      { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1a,0x1b,0x1c,0x1d,0x1e,0x1f }, /* PLAINTEXT */
137      { 0 }, /* AAD */
138      { 0xbe,0xa5,0xe8,0x79,0x8d,0xbe,0x71,0x10,0x03,0x1c,0x14,0x4d,0xa0,0xb2,0x61,0x22,0xce,0xaa,0xb9,0xb0,0x5d,0xf7,0x71,0xa6,0x57,0x14,0x9d,0x53,0x77,0x34,0x63,0xcb }, /* CIPHERTEXT */
139      { 0x4a,0x3b,0xae,0x82,0x44,0x65,0xcf,0xda,0xf8,0xc4,0x1f,0xc5,0x0c,0x7d,0xf9,0xd9 }, /* TAG */
140    },
141    { /* index:13 */
142      40, /* PLAINTEXT length */
143      40, /* AAD length */
144      { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1a,0x1b,0x1c,0x1d,0x1e,0x1f,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27 }, /* PLAINTEXT */
145      { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1a,0x1b,0x1c,0x1d,0x1e,0x1f,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27 }, /* AAD */
146      { 0xbe,0xa5,0xe8,0x79,0x8d,0xbe,0x71,0x10,0x03,0x1c,0x14,0x4d,0xa0,0xb2,0x61,0x22,0xce,0xaa,0xb9,0xb0,0x5d,0xf7,0x71,0xa6,0x57,0x14,0x9d,0x53,0x77,0x34,0x63,0xcb,0x68,0xc6,0x57,0x78,0xb0,0x58,0xa6,0x35 }, /* CIPHERTEXT */
147      { 0x65,0x9c,0x62,0x32,0x11,0xde,0xea,0x0d,0xe3,0x0d,0x2c,0x38,0x18,0x79,0xf4,0xc8 }, /* TAG */
148    },
149    { /* index:14 */
150      0, /* PLAINTEXT length */
151      40, /* AAD length */
152      { 0 }, /* PLAINTEXT */
153      { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1a,0x1b,0x1c,0x1d,0x1e,0x1f,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27 }, /* AAD */
154      { 0 }, /* CIPHERTEXT */
155      { 0x7a,0xeb,0x7a,0x69,0xa1,0x68,0x7d,0xd0,0x82,0xca,0x27,0xb0,0xd9,0xa3,0x70,0x96 }, /* TAG */
156    },
157    { /* index:15 */
158      40, /* PLAINTEXT length */
159      0, /* AAD length */
160      { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1a,0x1b,0x1c,0x1d,0x1e,0x1f,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27 }, /* PLAINTEXT */
161      { 0 }, /* AAD */
162      { 0xbe,0xa5,0xe8,0x79,0x8d,0xbe,0x71,0x10,0x03,0x1c,0x14,0x4d,0xa0,0xb2,0x61,0x22,0xce,0xaa,0xb9,0xb0,0x5d,0xf7,0x71,0xa6,0x57,0x14,0x9d,0x53,0x77,0x34,0x63,0xcb,0x68,0xc6,0x57,0x78,0xb0,0x58,0xa6,0x35 }, /* CIPHERTEXT */
163      { 0x06,0x0c,0x84,0x67,0xf4,0xab,0xab,0x5e,0x8b,0x3c,0x20,0x67,0xa2,0xe1,0x15,0xdc }, /* TAG */
164    },
165 
166 };
167    /* As of RFC 7253 - 'Appendix A.  Sample Results'
168     *    The next tuple shows a result with a tag length of 96 bits and a
169    different key.
170 
171      K: 0F0E0D0C0B0A09080706050403020100
172 
173      N: BBAA9988776655443322110D
174      A: 000102030405060708090A0B0C0D0E0F1011121314151617
175         18191A1B1C1D1E1F2021222324252627
176      P: 000102030405060708090A0B0C0D0E0F1011121314151617
177         18191A1B1C1D1E1F2021222324252627
178      C: 1792A4E31E0755FB03E31B22116E6C2DDF9EFD6E33D536F1
179         A0124B0A55BAE884ED93481529C76B6AD0C515F4D1CDD4FD
180         AC4F02AA
181 
182         The C has been split up in C and T (tag)
183     */
184    const unsigned char K[] = { 0x0F,0x0E,0x0D,0x0C,0x0B,0x0A,0x09,0x08,
185                                0x07,0x06,0x05,0x04,0x03,0x02,0x01,0x00 };
186    const unsigned char N[] = { 0xBB,0xAA,0x99,0x88,0x77,0x66,0x55,0x44,
187                                0x33,0x22,0x11,0x0D };
188    const unsigned char A[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,
189                                0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
190                                0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,
191                                0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
192                                0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27 };
193    const unsigned char P[] = { 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,
194                                0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
195                                0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,
196                                0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
197                                0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27 };
198    const unsigned char C[] = { 0x17,0x92,0xA4,0xE3,0x1E,0x07,0x55,0xFB,
199                                0x03,0xE3,0x1B,0x22,0x11,0x6E,0x6C,0x2D,
200                                0xDF,0x9E,0xFD,0x6E,0x33,0xD5,0x36,0xF1,
201                                0xA0,0x12,0x4B,0x0A,0x55,0xBA,0xE8,0x84,
202                                0xED,0x93,0x48,0x15,0x29,0xC7,0x6B,0x6A };
203    const unsigned char T[] = { 0xD0,0xC5,0x15,0xF4,0xD1,0xCD,0xD4,0xFD,
204                                0xAC,0x4F,0x02,0xAA };
205 
206    int err, x, idx, res;
207    unsigned long len;
208    unsigned char outct[MAXBLOCKSIZE]  = { 0 };
209    unsigned char outtag[MAXBLOCKSIZE] = { 0 };
210    ocb3_state ocb;
211 
212     /* AES can be under rijndael or aes... try to find it */
213     if ((idx = find_cipher("aes")) == -1) {
214        if ((idx = find_cipher("rijndael")) == -1) {
215           return CRYPT_NOP;
216        }
217     }
218 
219     for (x = 0; x < (int)(sizeof(tests)/sizeof(tests[0])); x++) {
220         len = 16; /* must be the same as the required taglen */
221         if ((err = ocb3_encrypt_authenticate_memory(idx,
222                                                    key, sizeof(key),
223                                                    nonce, sizeof(nonce),
224                                                    tests[x].aadlen != 0 ? tests[x].aad : NULL, tests[x].aadlen,
225                                                    tests[x].ptlen != 0 ? tests[x].pt : NULL, tests[x].ptlen,
226                                                    tests[x].ptlen != 0 ? outct : NULL, outtag, &len)) != CRYPT_OK) {
227            return err;
228         }
229 
230         if (compare_testvector(outtag, len, tests[x].tag, sizeof(tests[x].tag), "OCB3 Tag", x) ||
231               compare_testvector(outct, tests[x].ptlen, tests[x].ct, tests[x].ptlen, "OCB3 CT", x)) {
232            return CRYPT_FAIL_TESTVECTOR;
233         }
234 
235         if ((err = ocb3_decrypt_verify_memory(idx,
236                                              key, sizeof(key),
237                                              nonce, sizeof(nonce),
238                                              tests[x].aadlen != 0 ? tests[x].aad : NULL, tests[x].aadlen,
239                                              tests[x].ptlen != 0 ? outct : NULL, tests[x].ptlen,
240                                              tests[x].ptlen != 0 ? outct : NULL, tests[x].tag, len, &res)) != CRYPT_OK) {
241            return err;
242         }
243         if ((res != 1) || compare_testvector(outct, tests[x].ptlen, tests[x].pt, tests[x].ptlen, "OCB3", x)) {
244 #ifdef LTC_TEST_DBG
245            printf("\n\nOCB3: Failure-decrypt - res = %d\n", res);
246 #endif
247            return CRYPT_FAIL_TESTVECTOR;
248         }
249     }
250 
251     /* RFC 7253 - test vector with a tag length of 96 bits - part 1 */
252     x = 99;
253     len = 12;
254     if ((err = ocb3_encrypt_authenticate_memory(idx,
255                                                 K, sizeof(K),
256                                                 N, sizeof(N),
257                                                 A, sizeof(A),
258                                                 P, sizeof(P),
259                                                 outct, outtag, &len)) != CRYPT_OK) {
260        return err;
261     }
262 
263     if (compare_testvector(outtag, len, T, sizeof(T), "OCB3 Tag", x) ||
264           compare_testvector(outct, sizeof(P), C, sizeof(C), "OCB3 CT", x)) {
265        return CRYPT_FAIL_TESTVECTOR;
266     }
267 
268     if ((err = ocb3_decrypt_verify_memory(idx,
269                                           K, sizeof(K),
270                                           N, sizeof(N),
271                                           A, sizeof(A),
272                                           C, sizeof(C),
273                                           outct, T, sizeof(T), &res)) != CRYPT_OK) {
274        return err;
275     }
276     if ((res != 1) || compare_testvector(outct, sizeof(C), P, sizeof(P), "OCB3", x)) {
277 #ifdef LTC_TEST_DBG
278        printf("\n\nOCB3: Failure-decrypt - res = %d\n", res);
279 #endif
280        return CRYPT_FAIL_TESTVECTOR;
281     }
282 
283     /* RFC 7253 - test vector with a tag length of 96 bits - part 2 */
284     x = 100;
285     if ((err = ocb3_init(&ocb, idx, K, sizeof(K), N, sizeof(N), 12)) != CRYPT_OK)  return err;
286     if ((err = ocb3_add_aad(&ocb, A, sizeof(A))) != CRYPT_OK)                      return err;
287     if ((err = ocb3_encrypt(&ocb, P, 32, outct)) != CRYPT_OK)                      return err;
288     if ((err = ocb3_encrypt_last(&ocb, P+32, sizeof(P)-32, outct+32)) != CRYPT_OK) return err;
289     len = sizeof(outtag); /* intentionally more than 12 */
290     if ((err = ocb3_done(&ocb, outtag, &len)) != CRYPT_OK)                         return err;
291     if (compare_testvector(outct, sizeof(P), C, sizeof(C), "OCB3 CT", x))          return CRYPT_FAIL_TESTVECTOR;
292     if (compare_testvector(outtag, len, T, sizeof(T), "OCB3 Tag.enc", x))          return CRYPT_FAIL_TESTVECTOR;
293     if ((err = ocb3_init(&ocb, idx, K, sizeof(K), N, sizeof(N), 12)) != CRYPT_OK)  return err;
294     if ((err = ocb3_add_aad(&ocb, A, sizeof(A))) != CRYPT_OK)                      return err;
295     if ((err = ocb3_decrypt(&ocb, C, 32, outct)) != CRYPT_OK)                      return err;
296     if ((err = ocb3_decrypt_last(&ocb, C+32, sizeof(C)-32, outct+32)) != CRYPT_OK) return err;
297     len = sizeof(outtag); /* intentionally more than 12 */
298     if ((err = ocb3_done(&ocb, outtag, &len)) != CRYPT_OK)                         return err;
299     if (compare_testvector(outct, sizeof(C), P, sizeof(P), "OCB3 PT", x))          return CRYPT_FAIL_TESTVECTOR;
300     if (compare_testvector(outtag, len, T, sizeof(T), "OCB3 Tag.dec", x))          return CRYPT_FAIL_TESTVECTOR;
301 
302     return CRYPT_OK;
303 #endif /* LTC_TEST */
304 }
305 
306 #endif /* LTC_OCB3_MODE */
307 
308 /* ref:         $Format:%D$ */
309 /* git commit:  $Format:%H$ */
310 /* commit time: $Format:%ai$ */
311