-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path0051-Support-different-R_BITS-lengths-for-KBKDF.patch
2151 lines (2120 loc) · 75.2 KB
/
0051-Support-different-R_BITS-lengths-for-KBKDF.patch
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
From 0e9a265e42890699dfce82f1ff6905de6aafbd41 Mon Sep 17 00:00:00 2001
From: Patrick Uiterwijk <[email protected]>
Date: Thu, 18 Nov 2021 10:47:14 +0100
Subject: [PATCH] Support different R_BITS lengths for KBKDF
Reviewed-by: Tomas Mraz <[email protected]>
Reviewed-by: Paul Dale <[email protected]>
(Merged from https://github.com/openssl/openssl/pull/17063)
---
doc/man7/EVP_KDF-KB.pod | 7 +
include/openssl/core_names.h | 1 +
providers/implementations/kdfs/kbkdf.c | 30 +-
test/evp_kdf_test.c | 47 +-
test/evp_test.c | 6 +
test/recipes/30-test_evp.t | 1 +
.../30-test_evp_data/evpkdf_kbkdf_counter.txt | 1843 +++++++++++++++++
7 files changed, 1924 insertions(+), 11 deletions(-)
create mode 100644 test/recipes/30-test_evp_data/evpkdf_kbkdf_counter.txt
diff --git a/doc/man7/EVP_KDF-KB.pod b/doc/man7/EVP_KDF-KB.pod
index d4fad66f7654..a67268afa7d5 100644
--- a/doc/man7/EVP_KDF-KB.pod
+++ b/doc/man7/EVP_KDF-KB.pod
@@ -58,6 +58,13 @@ Set to B<0> to disable use of the optional Fixed Input data 'zero separator'
(see SP800-108) that is placed between the Label and Context.
The default value of B<1> will be used if unspecified.
+=item "r" (B<OSSL_KDF_PARAM_KBKDF_R>) <integer>
+
+Set the fixed value 'r', indicating the length of the counter in bits.
+
+Supported values are B<8>, B<16>, B<24>, and B<32>.
+The default value of B<32> will be used if unspecified.
+
=back
Depending on whether mac is CMAC or HMAC, either digest or cipher is required
diff --git a/include/openssl/core_names.h b/include/openssl/core_names.h
index b549dae9167c..78418dc6e0a2 100644
--- a/include/openssl/core_names.h
+++ b/include/openssl/core_names.h
@@ -217,6 +217,7 @@ extern "C" {
#define OSSL_KDF_PARAM_PKCS12_ID "id" /* int */
#define OSSL_KDF_PARAM_KBKDF_USE_L "use-l" /* int */
#define OSSL_KDF_PARAM_KBKDF_USE_SEPARATOR "use-separator" /* int */
+#define OSSL_KDF_PARAM_KBKDF_R "r" /* int */
#define OSSL_KDF_PARAM_X942_ACVPINFO "acvp-info"
#define OSSL_KDF_PARAM_X942_PARTYUINFO "partyu-info"
#define OSSL_KDF_PARAM_X942_PARTYVINFO "partyv-info"
diff --git a/providers/implementations/kdfs/kbkdf.c b/providers/implementations/kdfs/kbkdf.c
index 01f7f0d4fd2e..a81cc6e0c0d6 100644
--- a/providers/implementations/kdfs/kbkdf.c
+++ b/providers/implementations/kdfs/kbkdf.c
@@ -60,6 +60,7 @@ typedef struct {
EVP_MAC_CTX *ctx_init;
/* Names are lowercased versions of those found in SP800-108. */
+ int r;
unsigned char *ki;
size_t ki_len;
unsigned char *label;
@@ -100,6 +101,7 @@ static uint32_t be32(uint32_t host)
static void init(KBKDF *ctx)
{
+ ctx->r = 32;
ctx->use_l = 1;
ctx->use_separator = 1;
}
@@ -152,7 +154,7 @@ static int derive(EVP_MAC_CTX *ctx_init, kbkdf_mode mode, unsigned char *iv,
size_t iv_len, unsigned char *label, size_t label_len,
unsigned char *context, size_t context_len,
unsigned char *k_i, size_t h, uint32_t l, int has_separator,
- unsigned char *ko, size_t ko_len)
+ unsigned char *ko, size_t ko_len, int r)
{
int ret = 0;
EVP_MAC_CTX *ctx = NULL;
@@ -186,7 +188,7 @@ static int derive(EVP_MAC_CTX *ctx_init, kbkdf_mode mode, unsigned char *iv,
if (mode == FEEDBACK && !EVP_MAC_update(ctx, k_i, k_i_len))
goto done;
- if (!EVP_MAC_update(ctx, (unsigned char *)&i, 4)
+ if (!EVP_MAC_update(ctx, 4 - (r / 8) + (unsigned char *)&i, r / 8)
|| !EVP_MAC_update(ctx, label, label_len)
|| (has_separator && !EVP_MAC_update(ctx, &zero, 1))
|| !EVP_MAC_update(ctx, context, context_len)
@@ -217,6 +219,7 @@ static int kbkdf_derive(void *vctx, unsigned char *key, size_t keylen,
unsigned char *k_i = NULL;
uint32_t l = 0;
size_t h = 0;
+ uint64_t counter_max;
if (!ossl_prov_is_running() || !kbkdf_set_ctx_params(ctx, params))
return 0;
@@ -248,6 +251,15 @@ static int kbkdf_derive(void *vctx, unsigned char *key, size_t keylen,
goto done;
}
+ if (ctx->mode == COUNTER) {
+ /* Fail if keylen is too large for r */
+ counter_max = (uint64_t)1 << (uint64_t)ctx->r;
+ if ((uint64_t)(keylen / h) >= counter_max) {
+ ERR_raise(ERR_LIB_PROV, PROV_R_INVALID_KEY_LENGTH);
+ goto done;
+ }
+ }
+
if (ctx->use_l != 0)
l = be32(keylen * 8);
@@ -257,7 +269,7 @@ static int kbkdf_derive(void *vctx, unsigned char *key, size_t keylen,
ret = derive(ctx->ctx_init, ctx->mode, ctx->iv, ctx->iv_len, ctx->label,
ctx->label_len, ctx->context, ctx->context_len, k_i, h, l,
- ctx->use_separator, key, keylen);
+ ctx->use_separator, key, keylen, ctx->r);
done:
if (ret != 1)
OPENSSL_cleanse(key, keylen);
@@ -328,6 +340,17 @@ static int kbkdf_set_ctx_params(void *vctx, const OSSL_PARAM params[])
if (p != NULL && !OSSL_PARAM_get_int(p, &ctx->use_l))
return 0;
+ p = OSSL_PARAM_locate_const(params, OSSL_KDF_PARAM_KBKDF_R);
+ if (p != NULL) {
+ int new_r = 0;
+
+ if (!OSSL_PARAM_get_int(p, &new_r))
+ return 0;
+ if (new_r != 8 && new_r != 16 && new_r != 24 && new_r != 32)
+ return 0;
+ ctx->r = new_r;
+ }
+
p = OSSL_PARAM_locate_const(params, OSSL_KDF_PARAM_KBKDF_USE_SEPARATOR);
if (p != NULL && !OSSL_PARAM_get_int(p, &ctx->use_separator))
return 0;
@@ -354,6 +377,7 @@ static const OSSL_PARAM *kbkdf_settable_ctx_params(ossl_unused void *ctx,
OSSL_PARAM_utf8_string(OSSL_KDF_PARAM_PROPERTIES, NULL, 0),
OSSL_PARAM_int(OSSL_KDF_PARAM_KBKDF_USE_L, NULL),
OSSL_PARAM_int(OSSL_KDF_PARAM_KBKDF_USE_SEPARATOR, NULL),
+ OSSL_PARAM_int(OSSL_KDF_PARAM_KBKDF_R, NULL),
OSSL_PARAM_END,
};
return known_settable_ctx_params;
diff --git a/test/evp_kdf_test.c b/test/evp_kdf_test.c
index 7fde5ea4111c..173d8cb8b87b 100644
--- a/test/evp_kdf_test.c
+++ b/test/evp_kdf_test.c
@@ -1068,9 +1068,9 @@ static int test_kdf_kbkdf_6803_256(void)
#endif
static OSSL_PARAM *construct_kbkdf_params(char *digest, char *mac, unsigned char *key,
- size_t keylen, char *salt, char *info)
+ size_t keylen, char *salt, char *info, int *r)
{
- OSSL_PARAM *params = OPENSSL_malloc(sizeof(OSSL_PARAM) * 7);
+ OSSL_PARAM *params = OPENSSL_malloc(sizeof(OSSL_PARAM) * 8);
OSSL_PARAM *p = params;
if (params == NULL)
@@ -1088,6 +1088,8 @@ static OSSL_PARAM *construct_kbkdf_params(char *digest, char *mac, unsigned char
OSSL_KDF_PARAM_SALT, salt, strlen(salt));
*p++ = OSSL_PARAM_construct_octet_string(
OSSL_KDF_PARAM_INFO, info, strlen(info));
+ *p++ = OSSL_PARAM_construct_int(
+ OSSL_KDF_PARAM_KBKDF_R, r);
*p = OSSL_PARAM_construct_end();
return params;
@@ -1100,8 +1102,9 @@ static int test_kdf_kbkdf_invalid_digest(void)
OSSL_PARAM *params;
static unsigned char key[] = {0x01};
+ int r = 32;
- params = construct_kbkdf_params("blah", "HMAC", key, 1, "prf", "test");
+ params = construct_kbkdf_params("blah", "HMAC", key, 1, "prf", "test", &r);
if (!TEST_ptr(params))
return 0;
@@ -1122,8 +1125,9 @@ static int test_kdf_kbkdf_invalid_mac(void)
OSSL_PARAM *params;
static unsigned char key[] = {0x01};
+ int r = 32;
- params = construct_kbkdf_params("sha256", "blah", key, 1, "prf", "test");
+ params = construct_kbkdf_params("sha256", "blah", key, 1, "prf", "test", &r);
if (!TEST_ptr(params))
return 0;
@@ -1137,6 +1141,30 @@ static int test_kdf_kbkdf_invalid_mac(void)
return ret;
}
+static int test_kdf_kbkdf_invalid_r(void)
+{
+ int ret;
+ EVP_KDF_CTX *kctx;
+ OSSL_PARAM *params;
+
+ static unsigned char key[] = {0x01};
+ int r = 31;
+
+ params = construct_kbkdf_params("sha256", "HMAC", key, 1, "prf", "test", &r);
+ if (!TEST_ptr(params))
+ return 0;
+
+ /* Negative test case - derive should fail */
+ kctx = get_kdfbyname("KBKDF");
+ ret = TEST_ptr(kctx)
+ && TEST_false(EVP_KDF_CTX_set_params(kctx, params));
+
+ EVP_KDF_CTX_free(kctx);
+ OPENSSL_free(params);
+ return ret;
+}
+
+
static int test_kdf_kbkdf_empty_key(void)
{
int ret;
@@ -1145,8 +1173,9 @@ static int test_kdf_kbkdf_empty_key(void)
static unsigned char key[] = {0x01};
unsigned char result[32] = { 0 };
+ int r = 32;
- params = construct_kbkdf_params("sha256", "HMAC", key, 0, "prf", "test");
+ params = construct_kbkdf_params("sha256", "HMAC", key, 0, "prf", "test", &r);
if (!TEST_ptr(params))
return 0;
@@ -1169,8 +1198,9 @@ static int test_kdf_kbkdf_1byte_key(void)
static unsigned char key[] = {0x01};
unsigned char result[32] = { 0 };
+ int r = 32;
- params = construct_kbkdf_params("sha256", "HMAC", key, 1, "prf", "test");
+ params = construct_kbkdf_params("sha256", "HMAC", key, 1, "prf", "test", &r);
if (!TEST_ptr(params))
return 0;
@@ -1191,8 +1221,9 @@ static int test_kdf_kbkdf_zero_output_size(void)
static unsigned char key[] = {0x01};
unsigned char result[32] = { 0 };
+ int r = 32;
- params = construct_kbkdf_params("sha256", "HMAC", key, 1, "prf", "test");
+ params = construct_kbkdf_params("sha256", "HMAC", key, 1, "prf", "test", &r);
if (!TEST_ptr(params))
return 0;
@@ -1298,7 +1329,6 @@ static int test_kdf_kbkdf_8009_prf2(void)
* Test vector taken from
* https://csrc.nist.gov/CSRC/media/Projects/
* Cryptographic-Algorithm-Validation-Program/documents/KBKDF800-108/CounterMode.zip
- * Note: Only 32 bit counter is supported ([RLEN=32_BITS])
*/
static int test_kdf_kbkdf_fixedinfo(void)
{
@@ -1628,6 +1658,7 @@ int setup_tests(void)
#endif
ADD_TEST(test_kdf_kbkdf_invalid_digest);
ADD_TEST(test_kdf_kbkdf_invalid_mac);
+ ADD_TEST(test_kdf_kbkdf_invalid_r);
ADD_TEST(test_kdf_kbkdf_zero_output_size);
ADD_TEST(test_kdf_kbkdf_empty_key);
ADD_TEST(test_kdf_kbkdf_1byte_key);
diff --git a/test/evp_test.c b/test/evp_test.c
index 70996195f0cb..6ae862b04403 100644
--- a/test/evp_test.c
+++ b/test/evp_test.c
@@ -2639,6 +2639,12 @@ static int kdf_test_ctrl(EVP_TEST *t, EVP_KDF_CTX *kctx,
TEST_info("skipping, '%s' is disabled", p);
t->skip = 1;
}
+ if (p != NULL
+ && (strcmp(name, "mac") == 0)
+ && is_mac_disabled(p)) {
+ TEST_info("skipping, '%s' is disabled", p);
+ t->skip = 1;
+ }
OPENSSL_free(name);
return 1;
}
diff --git a/test/recipes/30-test_evp.t b/test/recipes/30-test_evp.t
index 7ae546e1d70c..7b976c0a1b5e 100644
--- a/test/recipes/30-test_evp.t
+++ b/test/recipes/30-test_evp.t
@@ -45,6 +45,7 @@ my @files = qw(
evpciph_aes_wrap.txt
evpciph_aes_stitched.txt
evpkdf_hkdf.txt
+ evpkdf_kbkdf_counter.txt
evpkdf_pbkdf1.txt
evpkdf_pbkdf2.txt
evpkdf_ss.txt
diff --git a/test/recipes/30-test_evp_data/evpkdf_kbkdf_counter.txt b/test/recipes/30-test_evp_data/evpkdf_kbkdf_counter.txt
new file mode 100644
index 000000000000..04ab8ff0fad7
--- /dev/null
+++ b/test/recipes/30-test_evp_data/evpkdf_kbkdf_counter.txt
@@ -0,0 +1,1843 @@
+#
+# Copyright 2021-2021 The OpenSSL Project Authors. All Rights Reserved.
+#
+# Licensed under the Apache License 2.0 (the "License"). You may not use
+# this file except in compliance with the License. You can obtain a copy
+# in the file LICENSE in the source distribution or at
+# https://www.openssl.org/source/license.html
+
+# Tests start with one of these keywords
+# Cipher Decrypt Derive Digest Encoding KDF MAC PBE
+# PrivPubKeyPair Sign Verify VerifyRecover
+# and continue until a blank line. Lines starting with a pound sign are ignored.
+
+Title = KBKDF tests
+
+# Test vectors taken from
+# https://csrc.nist.gov/CSRC/media/Projects/
+# Cryptographic-Algorithm-Validation-Program/documents/KBKDF800-108/CounterMode.zip
+
+
+# [PRF=CMAC_AES128]
+# [CTRLOCATION=BEFORE_FIXED]
+# [RLEN=8_BITS]
+
+# COUNT=0
+# L = 128
+KDF = KBKDF
+Ctrl.mode = mode:COUNTER
+Ctrl.cipher = cipher:AES128
+Ctrl.mac = mac:CMAC
+Ctrl.use-l = use-l:0
+Ctrl.use-separator = use-separator:0
+Ctrl.r = r:8
+Ctrl.hexkey = hexkey:dff1e50ac0b69dc40f1051d46c2b069c
+Ctrl.hexinfo = hexinfo:c16e6e02c5a3dcc8d78b9ac1306877761310455b4e41469951d9e6c2245a064b33fd8c3b01203a7824485bf0a64060c4648b707d2607935699316ea5
+Output = 8be8f0869b3c0ba97b71863d1b9f7813
+
+# COUNT=10
+# L = 256
+KDF = KBKDF
+Ctrl.mode = mode:COUNTER
+Ctrl.cipher = cipher:AES128
+Ctrl.mac = mac:CMAC
+Ctrl.use-l = use-l:0
+Ctrl.use-separator = use-separator:0
+Ctrl.r = r:8
+Ctrl.hexkey = hexkey:682e814d872397eba71170a693514904
+Ctrl.hexinfo = hexinfo:e323cdfa7873a0d72cd86ffb4468744f097db60498f7d0e3a43bafd2d1af675e4a88338723b1236199705357c47bf1d89b2f4617a340980e6331625c
+Output = dac9b6ca405749cfb065a0f1e42c7c4224d3d5db32fdafe9dee6ca193316f2c7
+
+# COUNT=20
+# L = 160
+KDF = KBKDF
+Ctrl.mode = mode:COUNTER
+Ctrl.cipher = cipher:AES128
+Ctrl.mac = mac:CMAC
+Ctrl.use-l = use-l:0
+Ctrl.use-separator = use-separator:0
+Ctrl.r = r:8
+Ctrl.hexkey = hexkey:7aa9973481d560f3be217ac3341144d8
+Ctrl.hexinfo = hexinfo:46f88b5af7fb9e29262dd4e010143a0a9c465c627450ec74ab7251889529193e995c4b56ff55bc2fc8992a0df1ee8056f6816b7614fba4c12d3be1a5
+Output = 1746ae4f09903f74bfbe1b8ae2b79d74576a3b09
+
+# COUNT=30
+# L = 320
+KDF = KBKDF
+Ctrl.mode = mode:COUNTER
+Ctrl.cipher = cipher:AES128
+Ctrl.mac = mac:CMAC
+Ctrl.use-l = use-l:0
+Ctrl.use-separator = use-separator:0
+Ctrl.r = r:8
+Ctrl.hexkey = hexkey:e91e0d06ab23a4e495bbcc430efddcaf
+Ctrl.hexinfo = hexinfo:24acb8e9227b180f2ccebea48051cbdbcd1be2bf94400d1e92945fe9b887585a295f46c469036107697813a3e12c45ae2ffde9a940f8f8c181018a93
+Output = e81ef2483729d4165aaa4866c17f26496e6c6924e2fe34f608efef0c35835f86df29a1e19ce166a8
+
+
+# [PRF=CMAC_AES128]
+# [CTRLOCATION=BEFORE_FIXED]
+# [RLEN=16_BITS]
+
+# COUNT=0
+# L = 128
+KDF = KBKDF
+Ctrl.mode = mode:COUNTER
+Ctrl.cipher = cipher:AES128
+Ctrl.mac = mac:CMAC
+Ctrl.use-l = use-l:0
+Ctrl.use-separator = use-separator:0
+Ctrl.r = r:16
+Ctrl.hexkey = hexkey:30ec5f6fa1def33cff008178c4454211
+Ctrl.hexinfo = hexinfo:c95e7b1d4f2570259abfc05bb00730f0284c3bb9a61d07259848a1cb57c81d8a6c3382c500bf801dfc8f70726b082cf4c3fa34386c1e7bf0e5471438
+Output = 00018fff9574994f5c4457f461c7a67e
+
+# COUNT=10
+# L = 256
+KDF = KBKDF
+Ctrl.mode = mode:COUNTER
+Ctrl.cipher = cipher:AES128
+Ctrl.mac = mac:CMAC
+Ctrl.use-l = use-l:0
+Ctrl.use-separator = use-separator:0
+Ctrl.r = r:16
+Ctrl.hexkey = hexkey:145c9e9365041f075ebde8ce26aa2149
+Ctrl.hexinfo = hexinfo:0d39b1c9c34d95b5b521971828c81d9f2dbdbc4af2ddd14f628721117e5c39faa030522b93cc07beb8f142fe36f674942453ec5518ca46c3e6842a73
+Output = 8a204ce7eab882fae3e2b8317fe431dba16dabb8fe5235525e7b61135e1b3c16
+
+# COUNT=20
+# L = 160
+KDF = KBKDF
+Ctrl.mode = mode:COUNTER
+Ctrl.cipher = cipher:AES128
+Ctrl.mac = mac:CMAC
+Ctrl.use-l = use-l:0
+Ctrl.use-separator = use-separator:0
+Ctrl.r = r:16
+Ctrl.hexkey = hexkey:6f3f8cbf40d2a694274cfa2eb2f265a3
+Ctrl.hexinfo = hexinfo:e7b88baa4a2c22b3d78f41d509996c95468c8cb834b035dd5e09e0a455da254b8b5687a1433861751d2dd603f69b2d4ba4ae47776335d37c98b44b4b
+Output = d147f1c78121c583cbcb9d4b0d3767a357bd7232
+
+# COUNT=30
+# L = 320
+KDF = KBKDF
+Ctrl.mode = mode:COUNTER
+Ctrl.cipher = cipher:AES128
+Ctrl.mac = mac:CMAC
+Ctrl.use-l = use-l:0
+Ctrl.use-separator = use-separator:0
+Ctrl.r = r:16
+Ctrl.hexkey = hexkey:5e534bea459e54c58a6942abfd4df8ab
+Ctrl.hexinfo = hexinfo:e9a5cc15d223aaa74abd122983b2a10512199b9cc87663fd8a62d417cef53770264fc51f683890fe42da2df7be0f60898c5b09d5c4932137b6b1e06e
+Output = 92480eb4860123ceda76f1e6bf2668520bea49ed72bb900ae50725bb8cfcdb733af1a9de71fe1af5
+
+
+# [PRF=CMAC_AES128]
+# [CTRLOCATION=BEFORE_FIXED]
+# [RLEN=24_BITS]
+
+# COUNT=0
+# L = 128
+KDF = KBKDF
+Ctrl.mode = mode:COUNTER
+Ctrl.cipher = cipher:AES128
+Ctrl.mac = mac:CMAC
+Ctrl.use-l = use-l:0
+Ctrl.use-separator = use-separator:0
+Ctrl.r = r:24
+Ctrl.hexkey = hexkey:ca1cf43e5ccd512cc719a2f9de41734c
+Ctrl.hexinfo = hexinfo:e3884ac963196f02ddd09fc04c20c88b60faa775b5ef6feb1faf8c5e098b5210e2b4e45d62cc0bf907fd68022ee7b15631b5c8daf903d99642c5b831
+Output = 1cb2b12326cc5ec1eba248167f0efd58
+
+# COUNT=10
+# L = 256
+KDF = KBKDF
+Ctrl.mode = mode:COUNTER
+Ctrl.cipher = cipher:AES128
+Ctrl.mac = mac:CMAC
+Ctrl.use-l = use-l:0
+Ctrl.use-separator = use-separator:0
+Ctrl.r = r:24
+Ctrl.hexkey = hexkey:1bfaf4cd6efd25a132e2a1d41b124465
+Ctrl.hexinfo = hexinfo:b933cfbb223ea65ed0e8db822f83be64ee21d3b9ca1eb0bc32f9d77f145a3e4ed4e2cc72cb3d93ea44824ab81eefdf71bbdb62067e0eb34a79914e4f
+Output = 75f4d20c558d71646ec062d2ca75369a218cedb7104be3abf27026af003e98f3
+
+# COUNT=20
+# L = 160
+KDF = KBKDF
+Ctrl.mode = mode:COUNTER
+Ctrl.cipher = cipher:AES128
+Ctrl.mac = mac:CMAC
+Ctrl.use-l = use-l:0
+Ctrl.use-separator = use-separator:0
+Ctrl.r = r:24
+Ctrl.hexkey = hexkey:80168f187848a68b0b82a7ef43b4eedc
+Ctrl.hexinfo = hexinfo:9357281df7665ae5ae961fe5f93a3124416cab3deb11583429c5e529af3fc71094aad560cbc279168fe1c3327787f91a414acfff063832bcd78ed1b5
+Output = be4517c9e6de96929e655a08f5b6d5bb77364f85
+
+# COUNT=30
+# L = 320
+KDF = KBKDF
+Ctrl.mode = mode:COUNTER
+Ctrl.cipher = cipher:AES128
+Ctrl.mac = mac:CMAC
+Ctrl.use-l = use-l:0
+Ctrl.use-separator = use-separator:0
+Ctrl.r = r:24
+Ctrl.hexkey = hexkey:26fa0e32e7e08f9b157ebae9f579710f
+Ctrl.hexinfo = hexinfo:ceab805efbe0c50a8aef62e59d95e7a54daa74ed86aa9b1ae8abf68b985b5af4b0ee150e83e6c063b59c7bf813ede9826af149237aed85b415898fa8
+Output = f1d9138afcc3db6001eb54c4da567a5db3659fc0ed48e664a0408946bcee0742127c17cabf348c7a
+
+
+# [PRF=CMAC_AES128]
+# [CTRLOCATION=BEFORE_FIXED]
+# [RLEN=32_BITS]
+
+# COUNT=0
+# L = 128
+KDF = KBKDF
+Ctrl.mode = mode:COUNTER
+Ctrl.cipher = cipher:AES128
+Ctrl.mac = mac:CMAC
+Ctrl.use-l = use-l:0
+Ctrl.use-separator = use-separator:0
+Ctrl.r = r:32
+Ctrl.hexkey = hexkey:c10b152e8c97b77e18704e0f0bd38305
+Ctrl.hexinfo = hexinfo:98cd4cbbbebe15d17dc86e6dbad800a2dcbd64f7c7ad0e78e9cf94ffdba89d03e97eadf6c4f7b806caf52aa38f09d0eb71d71f497bcc6906b48d36c4
+Output = 26faf61908ad9ee881b8305c221db53f
+
+# COUNT=10
+# L = 256
+KDF = KBKDF
+Ctrl.mode = mode:COUNTER
+Ctrl.cipher = cipher:AES128
+Ctrl.mac = mac:CMAC
+Ctrl.use-l = use-l:0
+Ctrl.use-separator = use-separator:0
+Ctrl.r = r:32
+Ctrl.hexkey = hexkey:695f1b1a16c949cea51cdf2554ec9d42
+Ctrl.hexinfo = hexinfo:4fce5942832a390aa1cbe8a0bf9d202cb799e986c9d6b51f45e4d597a6b57f06a4ebfec6467335d116b7f5f9c5b954062f661820f5db2a5bbb3e0625
+Output = d34b601ec18c34dfa0f9e0b7523e218bdddb9befe8d08b6c0202d75ace0dba89
+
+# COUNT=20
+# L = 160
+KDF = KBKDF
+Ctrl.mode = mode:COUNTER
+Ctrl.cipher = cipher:AES128
+Ctrl.mac = mac:CMAC
+Ctrl.use-l = use-l:0
+Ctrl.use-separator = use-separator:0
+Ctrl.r = r:32
+Ctrl.hexkey = hexkey:b523ae21fc36bc58cc46e5a3cda97493
+Ctrl.hexinfo = hexinfo:8dbe6d4d9b09b2eabd165b6e6e97e3bc782f8335cb1ea04ad0403affd88a5071db5f36ce2e84ab296261730b2226a9189d867991fbd4ff86f43a3cfb
+Output = 530211df01975dd6c08064c34105f88a6007f2b2
+
+# COUNT=30
+# L = 320
+KDF = KBKDF
+Ctrl.mode = mode:COUNTER
+Ctrl.cipher = cipher:AES128
+Ctrl.mac = mac:CMAC
+Ctrl.use-l = use-l:0
+Ctrl.use-separator = use-separator:0
+Ctrl.r = r:32
+Ctrl.hexkey = hexkey:b2fcf854b1029888aeb0274ca09bb21a
+Ctrl.hexinfo = hexinfo:a6b84baae7a6ceb1d63ed704757500c510c0a8bdc22d2f42af09f79c815f37f33b67dad0b30f428fc1e2d355f7f91f65acbedd2fdd5b8c38dd890407
+Output = fe4c2c0242c5a295c008aeb87ae0815171de6173773292347f4f5ec07185c3f860b5667c199aad55
+
+
+# [PRF=CMAC_AES192]
+# [CTRLOCATION=BEFORE_FIXED]
+# [RLEN=8_BITS]
+
+# COUNT=0
+# L = 128
+KDF = KBKDF
+Ctrl.mode = mode:COUNTER
+Ctrl.cipher = cipher:AES192
+Ctrl.mac = mac:CMAC
+Ctrl.use-l = use-l:0
+Ctrl.use-separator = use-separator:0
+Ctrl.r = r:8
+Ctrl.hexkey = hexkey:53d1705caab7b06886e2dbb53eea349aa7419a034e2d92b9
+Ctrl.hexinfo = hexinfo:b120f7ce30235784664deae3c40723ca0539b4521b9aece43501366cc5df1d9ea163c602702d0974665277c8a7f6a057733d66f928eb7548cf43e374
+Output = eae32661a323f6d06d0116bb739bd76a
+
+# COUNT=10
+# L = 256
+KDF = KBKDF
+Ctrl.mode = mode:COUNTER
+Ctrl.cipher = cipher:AES192
+Ctrl.mac = mac:CMAC
+Ctrl.use-l = use-l:0
+Ctrl.use-separator = use-separator:0
+Ctrl.r = r:8
+Ctrl.hexkey = hexkey:d10046bb18c3f363e87f4e57b961b294d4edf2ca91dc3e38
+Ctrl.hexinfo = hexinfo:2d043069de979bffb1be38a3cef2869dc07d5d3e99bde2e2204f10138081743f423f0c0b1aec0735a25bc61a8e2936dec6a25bb0ae105ab46caf8a2a
+Output = 8991a58882a0488bb5478996f2893989adb66d08d5030ad90f6ce5fdfca7754b
+
+# COUNT=20
+# L = 160
+KDF = KBKDF
+Ctrl.mode = mode:COUNTER
+Ctrl.cipher = cipher:AES192
+Ctrl.mac = mac:CMAC
+Ctrl.use-l = use-l:0
+Ctrl.use-separator = use-separator:0
+Ctrl.r = r:8
+Ctrl.hexkey = hexkey:bf0abb70098d6c203074f1bce3d7468116cd1e5e8e618f20
+Ctrl.hexinfo = hexinfo:d9ce030a48668ada6c67a2ac163515ec22383c4b5332e18d06901bacbb63dd649c683cfd4fee2f33346817b23cb4c734060a1c727b0c72c12448f4f9
+Output = ecd1eef152b5835376f1a4324cd968bcb0cf850a
+
+# COUNT=30
+# L = 320
+KDF = KBKDF
+Ctrl.mode = mode:COUNTER
+Ctrl.cipher = cipher:AES192
+Ctrl.mac = mac:CMAC
+Ctrl.use-l = use-l:0
+Ctrl.use-separator = use-separator:0
+Ctrl.r = r:8
+Ctrl.hexkey = hexkey:8725918ca07ad8e108473e5ffdf43eb1cf5c44baf0bd1cec
+Ctrl.hexinfo = hexinfo:f4a57b84a881cf282aac5402cfa8fc4ede0db6f8e902d5c0c41c4712077306484e626e3ffc4129d9b43b46cbb6c53d2838a811dc8aedad7253cf94d4
+Output = 5a795fd0d7661968c478860b526cca40eb8702083fdbff3ff8adfa697e795398ca7106bc950fbb45
+
+
+# [PRF=CMAC_AES192]
+# [CTRLOCATION=BEFORE_FIXED]
+# [RLEN=16_BITS]
+
+# COUNT=0
+# L = 128
+KDF = KBKDF
+Ctrl.mode = mode:COUNTER
+Ctrl.cipher = cipher:AES192
+Ctrl.mac = mac:CMAC
+Ctrl.use-l = use-l:0
+Ctrl.use-separator = use-separator:0
+Ctrl.r = r:16
+Ctrl.hexkey = hexkey:d7e8eefc503a39e70d931f16645958ad06fb789f0cbc518b
+Ctrl.hexinfo = hexinfo:b10ea2d67904a8b3b7ce5eef7d9ee49768e8deb3506ee74a2ad8dd8661146fde74137a8f6dfc69a370945d15335e0d6403fa029da19d34140c7e3da0
+Output = 95278b8883852f6676c587507b0aa162
+
+# COUNT=10
+# L = 256
+KDF = KBKDF
+Ctrl.mode = mode:COUNTER
+Ctrl.cipher = cipher:AES192
+Ctrl.mac = mac:CMAC
+Ctrl.use-l = use-l:0
+Ctrl.use-separator = use-separator:0
+Ctrl.r = r:16
+Ctrl.hexkey = hexkey:5e6695d7c3f5b156c7b457c8c2b801ba2ae30c9c8a36ee61
+Ctrl.hexinfo = hexinfo:1406756f40efb8e29d5455d2da4bf1993b3c3901d67ec90934895f5de7845f573ae8a0dc8a6ad77d80da29e81329440d61d63dda8eaa7851bc7a172d
+Output = 72046d5eed909f6ab25810ead446ace7422fd87e6bd496ff2e84b115b8e0d27e
+
+# COUNT=20
+# L = 160
+KDF = KBKDF
+Ctrl.mode = mode:COUNTER
+Ctrl.cipher = cipher:AES192
+Ctrl.mac = mac:CMAC
+Ctrl.use-l = use-l:0
+Ctrl.use-separator = use-separator:0
+Ctrl.r = r:16
+Ctrl.hexkey = hexkey:e3b88f40c9974410955820a8f8392701e9c67cc6efd3b0ff
+Ctrl.hexinfo = hexinfo:a520f36b6b60dfce34dc1d1f6b16132efa82566efa49f3140113fbc59e309c40db42962c06123721f122f433fa417ce3319bca9c58b4184fd8c7be8f
+Output = 134b6236a80c257591cc1437ab007b3fa4bd7191
+
+# COUNT=30
+# L = 320
+KDF = KBKDF
+Ctrl.mode = mode:COUNTER
+Ctrl.cipher = cipher:AES192
+Ctrl.mac = mac:CMAC
+Ctrl.use-l = use-l:0
+Ctrl.use-separator = use-separator:0
+Ctrl.r = r:16
+Ctrl.hexkey = hexkey:51574d47f2f1d202a30252823b52ba7858b729d5ed4c92f7
+Ctrl.hexinfo = hexinfo:0819c17dd3f9a68493a958c46152d04ba450043908a0016b99cc124d5e75b0d11e7c26f27365609c110eee7f8baa88a7d99fecc690e617150f93bd6c
+Output = c46db4cd822e9841408fba79932d6c748bc7ab17421ed1ad188aed327c2a0d694e380c0cade8b37f
+
+
+# [PRF=CMAC_AES192]
+# [CTRLOCATION=BEFORE_FIXED]
+# [RLEN=24_BITS]
+
+# COUNT=0
+# L = 128
+KDF = KBKDF
+Ctrl.mode = mode:COUNTER
+Ctrl.cipher = cipher:AES192
+Ctrl.mac = mac:CMAC
+Ctrl.use-l = use-l:0
+Ctrl.use-separator = use-separator:0
+Ctrl.r = r:24
+Ctrl.hexkey = hexkey:f7c1e0682a12f1f17d23dc8af5c463b8aa28f87ed82fad22
+Ctrl.hexinfo = hexinfo:890ec4966a8ac3fd635bd264a4c726c87341611c6e282766b7ffe621080d0c00ac9cf8e2784a80166303505f820b2a309e9c3a463d2e3fd4814e3af5
+Output = a71b0cbe30331fdbb63f8d51249ae50b
+
+# COUNT=10
+# L = 256
+KDF = KBKDF
+Ctrl.mode = mode:COUNTER
+Ctrl.cipher = cipher:AES192
+Ctrl.mac = mac:CMAC
+Ctrl.use-l = use-l:0
+Ctrl.use-separator = use-separator:0
+Ctrl.r = r:24
+Ctrl.hexkey = hexkey:3eeed1560e17aaffe9f6ca9d81815b89a6879a56ebe4182a
+Ctrl.hexinfo = hexinfo:a643378a557af69ce2c606bc623a04b568a848207534d25bfa22664f9148997a6b4c00f4624b5100b4eb01857240b119876c3a86c1e8b02335475939
+Output = 8a1dc0f616353bf3ecf5553d7a7651e9ea6d884a32172d3391ad342bfaf60785
+
+# COUNT=20
+# L = 160
+KDF = KBKDF
+Ctrl.mode = mode:COUNTER
+Ctrl.cipher = cipher:AES192
+Ctrl.mac = mac:CMAC
+Ctrl.use-l = use-l:0
+Ctrl.use-separator = use-separator:0
+Ctrl.r = r:24
+Ctrl.hexkey = hexkey:c984c3f65cdc32e7503678764a9e84292a1f50e335167a36
+Ctrl.hexinfo = hexinfo:0061cd40f9eef84d6c8b04e0142d70aa50d4690e0a1de8e3ff5f5cea10cd2d28281eb1df90c519b8b51f7aa0d63a313ebbf80538b54dd11a66115be6
+Output = afe93ae91930261344e30ef9e1718e76f74225d9
+
+# COUNT=30
+# L = 320
+KDF = KBKDF
+Ctrl.mode = mode:COUNTER
+Ctrl.cipher = cipher:AES192
+Ctrl.mac = mac:CMAC
+Ctrl.use-l = use-l:0
+Ctrl.use-separator = use-separator:0
+Ctrl.r = r:24
+Ctrl.hexkey = hexkey:993305e59f34a94f62931fd7662bb5b73c77d8d4bc6a33ba
+Ctrl.hexinfo = hexinfo:fcceb2d7ac6a68717c2490ec95bebea484c4930d156683c43164dc53bff0bafcbfb31e920109927ef08e12f66f258b6f8ba284908faee7d3376e1bac
+Output = 40e358cfdeee0286d152fcb4626ff22e67eea3b65d8750a273001b67645804cbf613832201b0a9ba
+
+
+# [PRF=CMAC_AES192]
+# [CTRLOCATION=BEFORE_FIXED]
+# [RLEN=32_BITS]
+
+# COUNT=0
+# L = 128
+KDF = KBKDF
+Ctrl.mode = mode:COUNTER
+Ctrl.cipher = cipher:AES192
+Ctrl.mac = mac:CMAC
+Ctrl.use-l = use-l:0
+Ctrl.use-separator = use-separator:0
+Ctrl.r = r:32
+Ctrl.hexkey = hexkey:f4267280cb8667c2cf82bb37f389da6391f58cc74deba0cc
+Ctrl.hexinfo = hexinfo:34abbc9f7b12622309a827de5abfdd51fb5bb824838fcde88ca7bc5f3953abdcb445147f13e809e294f75e6d4e3f13b66e47f2dfc881ed392e3a1bf6
+Output = 2d1b4b5694b6741b2ed9c02c05474225
+
+# COUNT=10
+# L = 256
+KDF = KBKDF
+Ctrl.mode = mode:COUNTER
+Ctrl.cipher = cipher:AES192
+Ctrl.mac = mac:CMAC
+Ctrl.use-l = use-l:0
+Ctrl.use-separator = use-separator:0
+Ctrl.r = r:32
+Ctrl.hexkey = hexkey:dc866a038c4f78f22d46caca65892bcdb15c1eb49b275827
+Ctrl.hexinfo = hexinfo:b4a123bad4890c7a791f5e192bd8b6e9c8c3620329f99249f11e1eb517a5b27b9e5b047a6591b45f6fff53e6d04b32d82e052af2eb8519bd21c10f93
+Output = 731a2e23ab2e58551490254041ee8fabd9c5a1918d76307f1048535be0763b20
+
+# COUNT=20
+# L = 160
+KDF = KBKDF
+Ctrl.mode = mode:COUNTER
+Ctrl.cipher = cipher:AES192
+Ctrl.mac = mac:CMAC
+Ctrl.use-l = use-l:0
+Ctrl.use-separator = use-separator:0
+Ctrl.r = r:32
+Ctrl.hexkey = hexkey:dd5e0f1a30b0b722b00626ee663df29601af58082708e18c
+Ctrl.hexinfo = hexinfo:b7c6eb48c80b071080fd07a827d0bfdc781599862084f7ffd968a4cbff0be9a6adef5ea206aa8af4d8a85705953e33cd7c4cbb69969c73698f54c6b8
+Output = 84e1ca286776cda0784c4fc48b054384ca565d17
+
+# COUNT=30
+# L = 320
+KDF = KBKDF
+Ctrl.mode = mode:COUNTER
+Ctrl.cipher = cipher:AES192
+Ctrl.mac = mac:CMAC
+Ctrl.use-l = use-l:0
+Ctrl.use-separator = use-separator:0
+Ctrl.r = r:32
+Ctrl.hexkey = hexkey:d64c598436507f4d05d7ebe780092996f281901dc9c8612f
+Ctrl.hexinfo = hexinfo:0ea737cfca2560856917f3a2ff5e2175930d0719bba85a9c8d8cb311a0a1b8caf8ffe03e9a86ab17046670011c9fec5c5cd697d9cd931f615cdfe649
+Output = 3c26968bd3997c653f79bb725c36d784b590d18a64678cf312abe8a57b2891c27282e37b6a49cd73
+
+
+# [PRF=CMAC_AES256]
+# [CTRLOCATION=BEFORE_FIXED]
+# [RLEN=8_BITS]
+
+# COUNT=0
+# L = 128
+KDF = KBKDF
+Ctrl.mode = mode:COUNTER
+Ctrl.cipher = cipher:AES256
+Ctrl.mac = mac:CMAC
+Ctrl.use-l = use-l:0
+Ctrl.use-separator = use-separator:0
+Ctrl.r = r:8
+Ctrl.hexkey = hexkey:aeb7201d055f754212b3e497bd0b25789a49e51da9f363df414a0f80e6f4e42c
+Ctrl.hexinfo = hexinfo:11ec30761780d4c44acb1f26ca1eb770f87c0e74505e15b7e456b019ce0c38103c4d14afa1de71d340db51410596627512cf199fffa20ef8c5f4841e
+Output = 2a9e2fe078bd4f5d3076d14d46f39fb2
+
+# COUNT=10
+# L = 256
+KDF = KBKDF
+Ctrl.mode = mode:COUNTER
+Ctrl.cipher = cipher:AES256
+Ctrl.mac = mac:CMAC
+Ctrl.use-l = use-l:0
+Ctrl.use-separator = use-separator:0
+Ctrl.r = r:8
+Ctrl.hexkey = hexkey:5402c978955128558789bee7b571465174a60582a7640037387f99ac16683173
+Ctrl.hexinfo = hexinfo:5c7eb447481c2884a5398449eaecbb8b55f1f1981ba0fd187818d8b3581b430c3da52ab83d444e003625ff36fcbd160c67b18d85b6c9d00da1a15d15
+Output = f22a4686abe599c2194d21fc9071ffceb023dd9b24c13f05a3d44cfc77fec44a
+
+# COUNT=20
+# L = 160
+KDF = KBKDF
+Ctrl.mode = mode:COUNTER
+Ctrl.cipher = cipher:AES256
+Ctrl.mac = mac:CMAC
+Ctrl.use-l = use-l:0
+Ctrl.use-separator = use-separator:0
+Ctrl.r = r:8
+Ctrl.hexkey = hexkey:cac968a8ffd81c73948bdfb48bf8a29c1378517d3be294df9a8a80724075bdbd
+Ctrl.hexinfo = hexinfo:08817bcd560edf810aa004194c817e455fb66bbc3b84fef1d66df2d1cebb3403c24231fa822f130c5d8fe886217122dcab15cb725197bbcbeb8010f5
+Output = 651c43e113b32026b204119af394301f0cb9831c
+
+# COUNT=30
+# L = 320
+KDF = KBKDF
+Ctrl.mode = mode:COUNTER
+Ctrl.cipher = cipher:AES256
+Ctrl.mac = mac:CMAC
+Ctrl.use-l = use-l:0
+Ctrl.use-separator = use-separator:0
+Ctrl.r = r:8
+Ctrl.hexkey = hexkey:9debd1762a9643e967dbc174f2040e177b8053afb0829189a81fed94f8c365ee
+Ctrl.hexinfo = hexinfo:6c4e1e3fdd7f5c97d58bcdda792642cbd271d6968f6a8e368013d88763d0b306c832b7ab46b84d099596972d12220a4e9c81f82d6f5003d18b93c595
+Output = 2518a44ea347e924b03a7b4c966ec4e4bd76c1456d09096be9387638c2737faeebba4e2b921b19db
+
+
+# [PRF=CMAC_AES256]
+# [CTRLOCATION=BEFORE_FIXED]
+# [RLEN=16_BITS]
+
+# COUNT=0
+# L = 128
+KDF = KBKDF
+Ctrl.mode = mode:COUNTER
+Ctrl.cipher = cipher:AES256
+Ctrl.mac = mac:CMAC
+Ctrl.use-l = use-l:0
+Ctrl.use-separator = use-separator:0
+Ctrl.r = r:16
+Ctrl.hexkey = hexkey:4df60800bf8e2f6055c5ad6be43ee3deb54e2a445bc88a576e111b9f7f66756f
+Ctrl.hexinfo = hexinfo:962adcaf12764c87dad298dbd9ae234b1ff37fed24baee0649562d466a80c0dcf0a65f04fe5b477fd00db6767199fa4d1b26c68158c8e656e740ab4d
+Output = eca99d4894cdda31fe355b82059a845c
+
+# COUNT=10
+# L = 256
+KDF = KBKDF
+Ctrl.mode = mode:COUNTER
+Ctrl.cipher = cipher:AES256
+Ctrl.mac = mac:CMAC
+Ctrl.use-l = use-l:0
+Ctrl.use-separator = use-separator:0
+Ctrl.r = r:16
+Ctrl.hexkey = hexkey:4c30b96d9beff5cc3c37527694eeec8207fae2c13ef295556919a7a46e5b90c1
+Ctrl.hexinfo = hexinfo:86e1ad34bd7a998281a822129a23102f799812864cf5349f3f21cec7729f83ad8c8aa6517fafcc9521cde887686629048159ed3f15c01408984f547e
+Output = 815fe232e0e89f7eeaa87c3ba5007694a43c1577657ccb3018076c5a5c035d95
+
+# COUNT=20
+# L = 160
+KDF = KBKDF
+Ctrl.mode = mode:COUNTER
+Ctrl.cipher = cipher:AES256
+Ctrl.mac = mac:CMAC
+Ctrl.use-l = use-l:0
+Ctrl.use-separator = use-separator:0
+Ctrl.r = r:16
+Ctrl.hexkey = hexkey:e508ce78aca2cc50c80a6cbdb2b178f8ee5e315dad71ddfa700eb6cf503239b3
+Ctrl.hexinfo = hexinfo:28c47ddd23d349e3b30bf97975c5fa591f2158e001dae3faa154d93c615c89fc7449c901a2585e618f68a0b2cbd3f35f53424d5ea015cbf7e8e09f68
+Output = 6bc69b4c11aa7c04ac3c03baa44daeac4a047992
+
+# COUNT=30
+# L = 320
+KDF = KBKDF
+Ctrl.mode = mode:COUNTER
+Ctrl.cipher = cipher:AES256
+Ctrl.mac = mac:CMAC
+Ctrl.use-l = use-l:0
+Ctrl.use-separator = use-separator:0
+Ctrl.r = r:16
+Ctrl.hexkey = hexkey:ee0a0f88b3b441826264de7a31b890a66edf7c2a28d0286eab285846b586fb8e
+Ctrl.hexinfo = hexinfo:1ea9771ab763056260d885073e80e835e20e5d7ca9659fdf5dd3b7f2ae6286608f8bc7a6728e41346c55544942b1bf06642fb6a6738fb5b7f0128f9c
+Output = 5484f170b6602b505e9e6ccffccf2262b55c3554728244bba94daff0adbc619400b33f38013a2293
+
+
+# [PRF=CMAC_AES256]
+# [CTRLOCATION=BEFORE_FIXED]
+# [RLEN=24_BITS]
+
+# COUNT=0
+# L = 128
+KDF = KBKDF
+Ctrl.mode = mode:COUNTER
+Ctrl.cipher = cipher:AES256
+Ctrl.mac = mac:CMAC
+Ctrl.use-l = use-l:0
+Ctrl.use-separator = use-separator:0
+Ctrl.r = r:24
+Ctrl.hexkey = hexkey:1612a40daa7fce6c6788b3b71311188ffb850613fd81d0e87a891831348e2f28
+Ctrl.hexinfo = hexinfo:1696438fcdf9a85284759b2604b64d7ea76199514709e711ecde5a505b5f27ae38d154aba14322481ddc9fd9169364b991460a0c9a05c7fcb2d099c9
+Output = d101f4f2b5e239bae881cb488995bd52
+
+# COUNT=10
+# L = 256
+KDF = KBKDF
+Ctrl.mode = mode:COUNTER
+Ctrl.cipher = cipher:AES256
+Ctrl.mac = mac:CMAC
+Ctrl.use-l = use-l:0
+Ctrl.use-separator = use-separator:0
+Ctrl.r = r:24
+Ctrl.hexkey = hexkey:77b50e24b859725d1cab531c885a6e60e7d5b0432f37408185ae688dffa5f6a5
+Ctrl.hexinfo = hexinfo:0b2c907499cddaa1fcfb02002ab8b9756c5f1f9fea482d79b8a6aa9fa2fb48e69df94dca4cb6f2e90a462678279ddaacc482fdd76581996b43974a22
+Output = c2a02b3743d506cdc1a41d4c2ae4c67610c5d607df0c26cbf7f4fe2198cb35f1
+
+# COUNT=20
+# L = 160
+KDF = KBKDF
+Ctrl.mode = mode:COUNTER
+Ctrl.cipher = cipher:AES256
+Ctrl.mac = mac:CMAC
+Ctrl.use-l = use-l:0
+Ctrl.use-separator = use-separator:0
+Ctrl.r = r:24
+Ctrl.hexkey = hexkey:18a5c3e669967b42e9a29bad8fe86699f2b5d496ff767cd3171d1c7195ecef59
+Ctrl.hexinfo = hexinfo:33231c50326592c25ec3eee2c61a3ad4c8a23c098dd83eafe5db411d0948eb122bb6eb7a1d04d2dbcd0b98d0b70b7ff305bb3ef6ac9d4e8e3f7ecd4f
+Output = e80afb5cd274cb5fa4952aa95177ae83337f4c8f
+
+# COUNT=30
+# L = 320
+KDF = KBKDF
+Ctrl.mode = mode:COUNTER
+Ctrl.cipher = cipher:AES256
+Ctrl.mac = mac:CMAC
+Ctrl.use-l = use-l:0
+Ctrl.use-separator = use-separator:0
+Ctrl.r = r:24
+Ctrl.hexkey = hexkey:0b589e556b7583f0fa9144868603b59262f457dee1e887ffc0e39968218959b9
+Ctrl.hexinfo = hexinfo:1b95b940e0b950a58f09ea09941b80852cb29838940bb146dc3db0ddcd87f72ee28813c09fcef773e95438c0ed3dbcf29e78de0c78377561c5869d5f
+Output = 260aef65eefd58816fe1a77120d047548b00c475c25178a2a33d4c801d49e8a0fb830513d0b3ff17
+
+
+# [PRF=CMAC_AES256]
+# [CTRLOCATION=BEFORE_FIXED]
+# [RLEN=32_BITS]
+
+# COUNT=0
+# L = 128
+KDF = KBKDF
+Ctrl.mode = mode:COUNTER
+Ctrl.cipher = cipher:AES256
+Ctrl.mac = mac:CMAC
+Ctrl.use-l = use-l:0
+Ctrl.use-separator = use-separator:0
+Ctrl.r = r:32
+Ctrl.hexkey = hexkey:d0b1b3b70b2393c48ca05159e7e28cbeadea93f28a7cdae964e5136070c45d5c
+Ctrl.hexinfo = hexinfo:dd2f151a3f173492a6fbbb602189d51ddf8ef79fc8e96b8fcbe6dabe73a35b48104f9dff2d63d48786d2b3af177091d646a9efae005bdfacb61a1214
+Output = 8c449fb474d1c1d4d2a33827103b656a
+
+# COUNT=10
+# L = 256
+KDF = KBKDF
+Ctrl.mode = mode:COUNTER
+Ctrl.cipher = cipher:AES256
+Ctrl.mac = mac:CMAC
+Ctrl.use-l = use-l:0
+Ctrl.use-separator = use-separator:0
+Ctrl.r = r:32
+Ctrl.hexkey = hexkey:d54b6fd94f7cf98fd955517f937e9927f9536caebe148fba1818c1ba46bba3a4
+Ctrl.hexinfo = hexinfo:94c4a0c69526196c1377cebf0a2ae0fb4b57797c61bea8eeb0518ca08652d14a5e1bd1b116b1794ac8a476acbdbbcd4f6142d7b8515bad09ec72f7af
+Output = 2e1efed4aef3fdd324e098c0a07c0d97f8fd2c748a996ce29861ca042474daea
+
+# COUNT=20
+# L = 160
+KDF = KBKDF
+Ctrl.mode = mode:COUNTER
+Ctrl.cipher = cipher:AES256
+Ctrl.mac = mac:CMAC
+Ctrl.use-l = use-l:0
+Ctrl.use-separator = use-separator:0
+Ctrl.r = r:32
+Ctrl.hexkey = hexkey:99f212241a343c1c8c2104ca6d28062413d985c21e6bba27fde0c622e2e4e6b7
+Ctrl.hexinfo = hexinfo:af8dc1cb7d1f82ca834628c20f0fc81920eb3ff3f75d3f4e3000593e9c15872479711d99d1b7be794f58d80a31bb112219dc16e6354111ab1161e21d
+Output = 7f778c625bf0d083169a51584f6683f24af7c35e
+
+# COUNT=30
+# L = 320