1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/tests/sys/crypto_aes_ccm/tests-crypto-modes-ccm-192.c

2455 lines
82 KiB
C

/*
* Copyright (C) 2021 Freie Universität Berlin
*
* This file is subject to the terms and conditions of the GNU Lesser
* General Public License v2.1. See the file LICENSE in the top level
* directory for more details.
*/
#include <limits.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "embUnit.h"
#include "crypto/ciphers.h"
#include "crypto/modes/ccm.h"
#include "tests-crypto.h"
/**
* AES CCM DVTP test vectors (SP 800-38C) for 192 bit keys.
* https://csrc.nist.gov/projects/cryptographic-algorithm-validation-program/cavp-testing-block-cipher-modes
*/
static const size_t nonce_and_len_encoding_size = 15;
/* Alen = 0, Plen = 0, Nlen = 7, Tlen = 4 */
static const uint8_t TEST_DVPT192_GROUP_0_MAC_LEN = 4;
static const uint8_t TEST_DVPT192_GROUP_0_KEY[] = {
0xc9, 0x8a, 0xd7, 0xf3, 0x8b, 0x2c, 0x7e, 0x97,
0x0c, 0x9b, 0x96, 0x5e, 0xc8, 0x7a, 0x08, 0x20,
0x83, 0x84, 0x71, 0x8f, 0x78, 0x20, 0x6c, 0x6c,
};
static const size_t TEST_DVPT192_GROUP_0_KEY_LEN = 24;
static const uint8_t TEST_DVPT192_0_NONCE[] = {
0x5a, 0x8a, 0xa4, 0x85, 0xc3, 0x16, 0xe9,
};
static const size_t TEST_DVPT192_0_NONCE_LEN = 7;
static const uint8_t TEST_DVPT192_0_ADATA[] = {
0x00,
};
static const size_t TEST_DVPT192_0_ADATA_LEN = 0;
static const uint8_t TEST_DVPT192_0_EXPECTED[] = {
0x9d, 0x4b, 0x7f, 0x3b,
};
static const size_t TEST_DVPT192_0_EXPECTED_LEN = 4;
static const uint8_t TEST_DVPT192_0_INPUT[] = {
0x00,
};
static const size_t TEST_DVPT192_0_INPUT_LEN = 0;
static const uint8_t TEST_DVPT192_4_NONCE[] = {
0x05, 0xe1, 0x6f, 0x0f, 0x42, 0xa6, 0xf4,
};
static const size_t TEST_DVPT192_4_NONCE_LEN = 7;
static const uint8_t TEST_DVPT192_4_ADATA[] = {
0x00,
};
static const size_t TEST_DVPT192_4_ADATA_LEN = 0;
static const uint8_t TEST_DVPT192_4_EXPECTED[] = {
0xc7, 0x9d, 0x55, 0x57,
};
static const size_t TEST_DVPT192_4_EXPECTED_LEN = 4;
static const uint8_t TEST_DVPT192_4_INPUT[] = {
0x00,
};
static const size_t TEST_DVPT192_4_INPUT_LEN = 0;
static const uint8_t TEST_DVPT192_11_NONCE[] = {
0xa9, 0xdf, 0x4f, 0x37, 0x84, 0x7e, 0x1f,
};
static const size_t TEST_DVPT192_11_NONCE_LEN = 7;
static const uint8_t TEST_DVPT192_11_ADATA[] = {
0x00,
};
static const size_t TEST_DVPT192_11_ADATA_LEN = 0;
static const uint8_t TEST_DVPT192_11_EXPECTED[] = {
0x22, 0x97, 0x6e, 0x42,
};
static const size_t TEST_DVPT192_11_EXPECTED_LEN = 4;
static const uint8_t TEST_DVPT192_11_INPUT[] = {
0x00,
};
static const size_t TEST_DVPT192_11_INPUT_LEN = 0;
static const uint8_t TEST_DVPT192_12_NONCE[] = {
0x11, 0xdf, 0x57, 0xfc, 0xd1, 0x31, 0xe9,
};
static const size_t TEST_DVPT192_12_NONCE_LEN = 7;
static const uint8_t TEST_DVPT192_12_ADATA[] = {
0x00,
};
static const size_t TEST_DVPT192_12_ADATA_LEN = 0;
static const uint8_t TEST_DVPT192_12_EXPECTED[] = {
0xf4, 0x40, 0xea, 0x1d,
};
static const size_t TEST_DVPT192_12_EXPECTED_LEN = 4;
static const uint8_t TEST_DVPT192_12_INPUT[] = {
0x00,
};
static const size_t TEST_DVPT192_12_INPUT_LEN = 0;
static const uint8_t TEST_DVPT192_13_NONCE[] = {
0x89, 0x0f, 0xff, 0x56, 0xd1, 0x0d, 0xc0,
};
static const size_t TEST_DVPT192_13_NONCE_LEN = 7;
static const uint8_t TEST_DVPT192_13_ADATA[] = {
0x00,
};
static const size_t TEST_DVPT192_13_ADATA_LEN = 0;
static const uint8_t TEST_DVPT192_13_EXPECTED[] = {
0x88, 0x90, 0x3f, 0xb9,
};
static const size_t TEST_DVPT192_13_EXPECTED_LEN = 4;
static const uint8_t TEST_DVPT192_13_INPUT[] = {
0x00,
};
static const size_t TEST_DVPT192_13_INPUT_LEN = 0;
/* Alen = 0, Plen = 0, Nlen = 7, Tlen = 16 */
static const uint8_t TEST_DVPT192_GROUP_1_MAC_LEN = 16;
static const uint8_t TEST_DVPT192_GROUP_1_KEY[] = {
0x4b, 0xb3, 0xc4, 0xa4, 0xf8, 0x93, 0xad, 0x8c,
0x9b, 0xdc, 0x83, 0x3c, 0x32, 0x5d, 0x62, 0xb3,
0xd3, 0xad, 0x1b, 0xcc, 0xf9, 0x28, 0x2a, 0x65,
};
static const size_t TEST_DVPT192_GROUP_1_KEY_LEN = 24;
static const uint8_t TEST_DVPT192_15_NONCE[] = {
0x5a, 0x8a, 0xa4, 0x85, 0xc3, 0x16, 0xe9,
};
static const size_t TEST_DVPT192_15_NONCE_LEN = 7;
static const uint8_t TEST_DVPT192_15_ADATA[] = {
0x00,
};
static const size_t TEST_DVPT192_15_ADATA_LEN = 0;
static const uint8_t TEST_DVPT192_15_EXPECTED[] = {
0x17, 0x22, 0x30, 0x38, 0xfa, 0x99, 0xd5, 0x36,
0x81, 0xca, 0x1b, 0xea, 0xbe, 0x78, 0xd1, 0xb4,
};
static const size_t TEST_DVPT192_15_EXPECTED_LEN = 16;
static const uint8_t TEST_DVPT192_15_INPUT[] = {
0x00,
};
static const size_t TEST_DVPT192_15_INPUT_LEN = 0;
static const uint8_t TEST_DVPT192_19_NONCE[] = {
0x05, 0xe1, 0x6f, 0x0f, 0x42, 0xa6, 0xf4,
};
static const size_t TEST_DVPT192_19_NONCE_LEN = 7;
static const uint8_t TEST_DVPT192_19_ADATA[] = {
0x00,
};
static const size_t TEST_DVPT192_19_ADATA_LEN = 0;
static const uint8_t TEST_DVPT192_19_EXPECTED[] = {
0xfd, 0xfd, 0xbb, 0x38, 0xbf, 0x16, 0x17, 0x85,
0x11, 0x4f, 0x9e, 0xe2, 0x01, 0x8e, 0x89, 0x2f,
};
static const size_t TEST_DVPT192_19_EXPECTED_LEN = 16;
static const uint8_t TEST_DVPT192_19_INPUT[] = {
0x00,
};
static const size_t TEST_DVPT192_19_INPUT_LEN = 0;
static const uint8_t TEST_DVPT192_26_NONCE[] = {
0xa9, 0xdf, 0x4f, 0x37, 0x84, 0x7e, 0x1f,
};
static const size_t TEST_DVPT192_26_NONCE_LEN = 7;
static const uint8_t TEST_DVPT192_26_ADATA[] = {
0x00,
};
static const size_t TEST_DVPT192_26_ADATA_LEN = 0;
static const uint8_t TEST_DVPT192_26_EXPECTED[] = {
0x7e, 0x3b, 0xbe, 0x0e, 0xb1, 0x39, 0x88, 0xa9,
0x39, 0x72, 0xf2, 0xfb, 0xcd, 0x35, 0x65, 0x9e,
};
static const size_t TEST_DVPT192_26_EXPECTED_LEN = 16;
static const uint8_t TEST_DVPT192_26_INPUT[] = {
0x00,
};
static const size_t TEST_DVPT192_26_INPUT_LEN = 0;
static const uint8_t TEST_DVPT192_27_NONCE[] = {
0x11, 0xdf, 0x57, 0xfc, 0xd1, 0x31, 0xe9,
};
static const size_t TEST_DVPT192_27_NONCE_LEN = 7;
static const uint8_t TEST_DVPT192_27_ADATA[] = {
0x00,
};
static const size_t TEST_DVPT192_27_ADATA_LEN = 0;
static const uint8_t TEST_DVPT192_27_EXPECTED[] = {
0x48, 0xd7, 0xa1, 0x5c, 0xf4, 0xf5, 0x80, 0x8e,
0xb4, 0x5d, 0x1a, 0xd8, 0x17, 0x47, 0x05, 0x54,
};
static const size_t TEST_DVPT192_27_EXPECTED_LEN = 16;
static const uint8_t TEST_DVPT192_27_INPUT[] = {
0x00,
};
static const size_t TEST_DVPT192_27_INPUT_LEN = 0;
static const uint8_t TEST_DVPT192_28_NONCE[] = {
0x89, 0x0f, 0xff, 0x56, 0xd1, 0x0d, 0xc0,
};
static const size_t TEST_DVPT192_28_NONCE_LEN = 7;
static const uint8_t TEST_DVPT192_28_ADATA[] = {
0x00,
};
static const size_t TEST_DVPT192_28_ADATA_LEN = 0;
static const uint8_t TEST_DVPT192_28_EXPECTED[] = {
0x97, 0x18, 0x5c, 0xe6, 0x8a, 0xf1, 0xe6, 0xab,
0x71, 0x8c, 0x8c, 0x4b, 0x83, 0xec, 0x04, 0xcd,
};
static const size_t TEST_DVPT192_28_EXPECTED_LEN = 16;
static const uint8_t TEST_DVPT192_28_INPUT[] = {
0x00,
};
static const size_t TEST_DVPT192_28_INPUT_LEN = 0;
/* Alen = 0, Plen = 0, Nlen = 13, Tlen = 4 */
static const uint8_t TEST_DVPT192_GROUP_2_MAC_LEN = 4;
static const uint8_t TEST_DVPT192_GROUP_2_KEY[] = {
0x4b, 0xb3, 0xc4, 0xa4, 0xf8, 0x93, 0xad, 0x8c,
0x9b, 0xdc, 0x83, 0x3c, 0x32, 0x5d, 0x62, 0xb3,
0xd3, 0xad, 0x1b, 0xcc, 0xf9, 0x28, 0x2a, 0x65,
};
static const size_t TEST_DVPT192_GROUP_2_KEY_LEN = 24;
static const uint8_t TEST_DVPT192_30_NONCE[] = {
0x5a, 0x8a, 0xa4, 0x85, 0xc3, 0x16, 0xe9, 0x40,
0x3a, 0xff, 0x85, 0x9f, 0xbb,
};
static const size_t TEST_DVPT192_30_NONCE_LEN = 13;
static const uint8_t TEST_DVPT192_30_ADATA[] = {
0x00,
};
static const size_t TEST_DVPT192_30_ADATA_LEN = 0;
static const uint8_t TEST_DVPT192_30_EXPECTED[] = {
0xfe, 0x69, 0xed, 0x84,
};
static const size_t TEST_DVPT192_30_EXPECTED_LEN = 4;
static const uint8_t TEST_DVPT192_30_INPUT[] = {
0x00,
};
static const size_t TEST_DVPT192_30_INPUT_LEN = 0;
static const uint8_t TEST_DVPT192_34_NONCE[] = {
0x93, 0x5c, 0x1e, 0xf3, 0xd4, 0x03, 0x2f, 0xf0,
0x90, 0xf9, 0x11, 0x41, 0xf3,
};
static const size_t TEST_DVPT192_34_NONCE_LEN = 13;
static const uint8_t TEST_DVPT192_34_ADATA[] = {
0x00,
};
static const size_t TEST_DVPT192_34_ADATA_LEN = 0;
static const uint8_t TEST_DVPT192_34_EXPECTED[] = {
0x21, 0x5e, 0x0b, 0xf2,
};
static const size_t TEST_DVPT192_34_EXPECTED_LEN = 4;
static const uint8_t TEST_DVPT192_34_INPUT[] = {
0x00,
};
static const size_t TEST_DVPT192_34_INPUT_LEN = 0;
static const uint8_t TEST_DVPT192_41_NONCE[] = {
0xd0, 0xa1, 0x50, 0x8f, 0xde, 0xfc, 0xf5, 0xbe,
0x30, 0xa4, 0x59, 0xb8, 0x13,
};
static const size_t TEST_DVPT192_41_NONCE_LEN = 13;
static const uint8_t TEST_DVPT192_41_ADATA[] = {
0x00,
};
static const size_t TEST_DVPT192_41_ADATA_LEN = 0;
static const uint8_t TEST_DVPT192_41_EXPECTED[] = {
0x79, 0x0b, 0x26, 0x24,
};
static const size_t TEST_DVPT192_41_EXPECTED_LEN = 4;
static const uint8_t TEST_DVPT192_41_INPUT[] = {
0x00,
};
static const size_t TEST_DVPT192_41_INPUT_LEN = 0;
static const uint8_t TEST_DVPT192_42_NONCE[] = {
0x53, 0x81, 0xa6, 0x1b, 0x44, 0x9d, 0xc6, 0xa4,
0x2a, 0xa4, 0xc7, 0x9b, 0x95,
};
static const size_t TEST_DVPT192_42_NONCE_LEN = 13;
static const uint8_t TEST_DVPT192_42_ADATA[] = {
0x00,
};
static const size_t TEST_DVPT192_42_ADATA_LEN = 0;
static const uint8_t TEST_DVPT192_42_EXPECTED[] = {
0x9e, 0x46, 0x63, 0x2d,
};
static const size_t TEST_DVPT192_42_EXPECTED_LEN = 4;
static const uint8_t TEST_DVPT192_42_INPUT[] = {
0x00,
};
static const size_t TEST_DVPT192_42_INPUT_LEN = 0;
static const uint8_t TEST_DVPT192_43_NONCE[] = {
0xc5, 0x54, 0x30, 0xf2, 0xda, 0x06, 0x87, 0xea,
0x40, 0x31, 0x38, 0x84, 0xab,
};
static const size_t TEST_DVPT192_43_NONCE_LEN = 13;
static const uint8_t TEST_DVPT192_43_ADATA[] = {
0x00,
};
static const size_t TEST_DVPT192_43_ADATA_LEN = 0;
static const uint8_t TEST_DVPT192_43_EXPECTED[] = {
0x39, 0xb8, 0x29, 0x01,
};
static const size_t TEST_DVPT192_43_EXPECTED_LEN = 4;
static const uint8_t TEST_DVPT192_43_INPUT[] = {
0x00,
};
static const size_t TEST_DVPT192_43_INPUT_LEN = 0;
/* Alen = 0, Plen = 0, Nlen = 13, Tlen = 16 */
static const uint8_t TEST_DVPT192_GROUP_3_MAC_LEN = 16;
static const uint8_t TEST_DVPT192_GROUP_3_KEY[] = {
0x19, 0xeb, 0xfd, 0xe2, 0xd5, 0x46, 0x8b, 0xa0,
0xa3, 0x03, 0x1b, 0xde, 0x62, 0x9b, 0x11, 0xfd,
0x40, 0x94, 0xaf, 0xcb, 0x20, 0x53, 0x93, 0xfa,
};
static const size_t TEST_DVPT192_GROUP_3_KEY_LEN = 24;
static const uint8_t TEST_DVPT192_45_NONCE[] = {
0x5a, 0x8a, 0xa4, 0x85, 0xc3, 0x16, 0xe9, 0x40,
0x3a, 0xff, 0x85, 0x9f, 0xbb,
};
static const size_t TEST_DVPT192_45_NONCE_LEN = 13;
static const uint8_t TEST_DVPT192_45_ADATA[] = {
0x00,
};
static const size_t TEST_DVPT192_45_ADATA_LEN = 0;
static const uint8_t TEST_DVPT192_45_EXPECTED[] = {
0x0c, 0x66, 0xa8, 0xe5, 0x47, 0xed, 0x4f, 0x8c,
0x2c, 0x9a, 0x9a, 0x1e, 0xb5, 0xd4, 0x55, 0xb9,
};
static const size_t TEST_DVPT192_45_EXPECTED_LEN = 16;
static const uint8_t TEST_DVPT192_45_INPUT[] = {
0x00,
};
static const size_t TEST_DVPT192_45_INPUT_LEN = 0;
static const uint8_t TEST_DVPT192_49_NONCE[] = {
0x93, 0x5c, 0x1e, 0xf3, 0xd4, 0x03, 0x2f, 0xf0,
0x90, 0xf9, 0x11, 0x41, 0xf3,
};
static const size_t TEST_DVPT192_49_NONCE_LEN = 13;
static const uint8_t TEST_DVPT192_49_ADATA[] = {
0x00,
};
static const size_t TEST_DVPT192_49_ADATA_LEN = 0;
static const uint8_t TEST_DVPT192_49_EXPECTED[] = {
0x87, 0xda, 0x5d, 0xbc, 0x04, 0xe3, 0x9f, 0xc4,
0x68, 0xf4, 0x36, 0x75, 0xd4, 0xe7, 0xdf, 0x33,
};
static const size_t TEST_DVPT192_49_EXPECTED_LEN = 16;
static const uint8_t TEST_DVPT192_49_INPUT[] = {
0x00,
};
static const size_t TEST_DVPT192_49_INPUT_LEN = 0;
static const uint8_t TEST_DVPT192_56_NONCE[] = {
0xd0, 0xa1, 0x50, 0x8f, 0xde, 0xfc, 0xf5, 0xbe,
0x30, 0xa4, 0x59, 0xb8, 0x13,
};
static const size_t TEST_DVPT192_56_NONCE_LEN = 13;
static const uint8_t TEST_DVPT192_56_ADATA[] = {
0x00,
};
static const size_t TEST_DVPT192_56_ADATA_LEN = 0;
static const uint8_t TEST_DVPT192_56_EXPECTED[] = {
0xa0, 0xd0, 0x47, 0xa1, 0xf9, 0x94, 0x0d, 0x32,
0x5e, 0x47, 0x4d, 0xa5, 0x4a, 0xa1, 0x38, 0x97,
};
static const size_t TEST_DVPT192_56_EXPECTED_LEN = 16;
static const uint8_t TEST_DVPT192_56_INPUT[] = {
0x00,
};
static const size_t TEST_DVPT192_56_INPUT_LEN = 0;
static const uint8_t TEST_DVPT192_57_NONCE[] = {
0x53, 0x81, 0xa6, 0x1b, 0x44, 0x9d, 0xc6, 0xa4,
0x2a, 0xa4, 0xc7, 0x9b, 0x95,
};
static const size_t TEST_DVPT192_57_NONCE_LEN = 13;
static const uint8_t TEST_DVPT192_57_ADATA[] = {
0x00,
};
static const size_t TEST_DVPT192_57_ADATA_LEN = 0;
static const uint8_t TEST_DVPT192_57_EXPECTED[] = {
0x8a, 0x47, 0x68, 0xa2, 0x09, 0x36, 0x94, 0xb6,
0xbc, 0xb7, 0x08, 0x3c, 0x0b, 0xb6, 0x33, 0x1c,
};
static const size_t TEST_DVPT192_57_EXPECTED_LEN = 16;
static const uint8_t TEST_DVPT192_57_INPUT[] = {
0x00,
};
static const size_t TEST_DVPT192_57_INPUT_LEN = 0;
static const uint8_t TEST_DVPT192_58_NONCE[] = {
0xc5, 0x54, 0x30, 0xf2, 0xda, 0x06, 0x87, 0xea,
0x40, 0x31, 0x38, 0x84, 0xab,
};
static const size_t TEST_DVPT192_58_NONCE_LEN = 13;
static const uint8_t TEST_DVPT192_58_ADATA[] = {
0x00,
};
static const size_t TEST_DVPT192_58_ADATA_LEN = 0;
static const uint8_t TEST_DVPT192_58_EXPECTED[] = {
0xa7, 0xca, 0xfd, 0x6f, 0x68, 0xdc, 0x1f, 0x15,
0xa3, 0x60, 0x3d, 0xa6, 0x54, 0xce, 0x27, 0xbc,
};
static const size_t TEST_DVPT192_58_EXPECTED_LEN = 16;
static const uint8_t TEST_DVPT192_58_INPUT[] = {
0x00,
};
static const size_t TEST_DVPT192_58_INPUT_LEN = 0;
/* Alen = 0, Plen = 24, Nlen = 7, Tlen = 4 */
static const uint8_t TEST_DVPT192_GROUP_4_MAC_LEN = 4;
static const uint8_t TEST_DVPT192_GROUP_4_KEY[] = {
0x19, 0xeb, 0xfd, 0xe2, 0xd5, 0x46, 0x8b, 0xa0,
0xa3, 0x03, 0x1b, 0xde, 0x62, 0x9b, 0x11, 0xfd,
0x40, 0x94, 0xaf, 0xcb, 0x20, 0x53, 0x93, 0xfa,
};
static const size_t TEST_DVPT192_GROUP_4_KEY_LEN = 24;
static const uint8_t TEST_DVPT192_60_NONCE[] = {
0x5a, 0x8a, 0xa4, 0x85, 0xc3, 0x16, 0xe9,
};
static const size_t TEST_DVPT192_60_NONCE_LEN = 7;
static const uint8_t TEST_DVPT192_60_ADATA[] = {
0x00,
};
static const size_t TEST_DVPT192_60_ADATA_LEN = 0;
static const uint8_t TEST_DVPT192_60_EXPECTED[] = {
0x41, 0x19, 0x86, 0xd0, 0x4d, 0x64, 0x63, 0x10,
0x0b, 0xff, 0x03, 0xf7, 0xd0, 0xbd, 0xe7, 0xea,
0x2c, 0x34, 0x88, 0x78, 0x43, 0x78, 0x13, 0x8c,
0xdd, 0xc9, 0x3a, 0x54,
};
static const size_t TEST_DVPT192_60_EXPECTED_LEN = 28;
static const uint8_t TEST_DVPT192_60_INPUT[] = {
0x37, 0x96, 0xcf, 0x51, 0xb8, 0x72, 0x66, 0x52,
0xa4, 0x20, 0x47, 0x33, 0xb8, 0xfb, 0xb0, 0x47,
0xcf, 0x00, 0xfb, 0x91, 0xa9, 0x83, 0x7e, 0x22,
};
static const size_t TEST_DVPT192_60_INPUT_LEN = 24;
static const uint8_t TEST_DVPT192_64_NONCE[] = {
0x12, 0x3a, 0x0b, 0xea, 0xce, 0x4e, 0x39,
};
static const size_t TEST_DVPT192_64_NONCE_LEN = 7;
static const uint8_t TEST_DVPT192_64_ADATA[] = {
0x00,
};
static const size_t TEST_DVPT192_64_ADATA_LEN = 0;
static const uint8_t TEST_DVPT192_64_EXPECTED[] = {
0xb4, 0x1b, 0xfb, 0xa9, 0x4e, 0xdc, 0xaf, 0xc4,
0x1b, 0x4c, 0x14, 0x42, 0x69, 0xb9, 0x12, 0x6a,
0x6d, 0x47, 0xb1, 0x9e, 0x83, 0xb1, 0x57, 0x72,
0xb2, 0x8c, 0x8e, 0x38,
};
static const size_t TEST_DVPT192_64_EXPECTED_LEN = 28;
static const uint8_t TEST_DVPT192_64_INPUT[] = {
0x9d, 0x03, 0x3e, 0x3b, 0x66, 0xef, 0xed, 0x14,
0x67, 0x86, 0x8f, 0x38, 0x24, 0x17, 0xc8, 0x05,
0x94, 0x87, 0x7a, 0x28, 0xbc, 0x97, 0xf4, 0x06,
};
static const size_t TEST_DVPT192_64_INPUT_LEN = 24;
static const uint8_t TEST_DVPT192_71_NONCE[] = {
0xf6, 0x7b, 0x98, 0xef, 0xd3, 0x9b, 0x55,
};
static const size_t TEST_DVPT192_71_NONCE_LEN = 7;
static const uint8_t TEST_DVPT192_71_ADATA[] = {
0x00,
};
static const size_t TEST_DVPT192_71_ADATA_LEN = 0;
static const uint8_t TEST_DVPT192_71_EXPECTED[] = {
0x0a, 0x7f, 0xe6, 0x30, 0x46, 0xda, 0xf8, 0xa9,
0x79, 0x93, 0x5b, 0x89, 0x70, 0x88, 0xc6, 0x4a,
0xcc, 0x1b, 0x47, 0xa5, 0xa9, 0xb8, 0x6f, 0xdd,
0x6d, 0xef, 0x28, 0xab,
};
static const size_t TEST_DVPT192_71_EXPECTED_LEN = 28;
static const uint8_t TEST_DVPT192_71_INPUT[] = {
0xf2, 0xe9, 0x44, 0xe1, 0xae, 0x47, 0xad, 0x58,
0x73, 0xbf, 0x39, 0x1f, 0x1b, 0x0c, 0xc0, 0x7f,
0x61, 0x51, 0xeb, 0x4c, 0x50, 0xbb, 0x45, 0xb2,
};
static const size_t TEST_DVPT192_71_INPUT_LEN = 24;
static const uint8_t TEST_DVPT192_72_NONCE[] = {
0xe6, 0x0e, 0x2c, 0x00, 0x2d, 0x1c, 0x99,
};
static const size_t TEST_DVPT192_72_NONCE_LEN = 7;
static const uint8_t TEST_DVPT192_72_ADATA[] = {
0x00,
};
static const size_t TEST_DVPT192_72_ADATA_LEN = 0;
static const uint8_t TEST_DVPT192_72_EXPECTED[] = {
0xda, 0xf7, 0xd7, 0xdf, 0xa5, 0x12, 0xce, 0xb1,
0xd7, 0xd3, 0x43, 0x56, 0x34, 0xd9, 0xa7, 0x0b,
0x3e, 0xf6, 0xc6, 0xdc, 0x38, 0xf4, 0x09, 0xe0,
0x68, 0x94, 0x1f, 0xce,
};
static const size_t TEST_DVPT192_72_EXPECTED_LEN = 28;
static const uint8_t TEST_DVPT192_72_INPUT[] = {
0x70, 0xf4, 0x8d, 0xc1, 0xd7, 0x6e, 0x50, 0x28,
0xda, 0x07, 0xe2, 0x98, 0x52, 0x80, 0x13, 0x75,
0xa9, 0xed, 0xb2, 0x21, 0x4a, 0x5e, 0xa4, 0xc0,
};
static const size_t TEST_DVPT192_72_INPUT_LEN = 24;
static const uint8_t TEST_DVPT192_73_NONCE[] = {
0x09, 0x8e, 0x05, 0x3f, 0xa0, 0x80, 0x43,
};
static const size_t TEST_DVPT192_73_NONCE_LEN = 7;
static const uint8_t TEST_DVPT192_73_ADATA[] = {
0x00,
};
static const size_t TEST_DVPT192_73_ADATA_LEN = 0;
static const uint8_t TEST_DVPT192_73_EXPECTED[] = {
0xcd, 0xb4, 0x17, 0xdf, 0xf6, 0x50, 0x22, 0x08,
0x77, 0x5f, 0x21, 0xe3, 0x5c, 0xdb, 0x8e, 0x3e,
0x11, 0x99, 0x30, 0x8d, 0x1a, 0x94, 0x22, 0x90,
0x51, 0xa1, 0xec, 0x4a,
};
static const size_t TEST_DVPT192_73_EXPECTED_LEN = 28;
static const uint8_t TEST_DVPT192_73_INPUT[] = {
0xbd, 0x81, 0x68, 0x0e, 0x3d, 0xc0, 0xb3, 0x54,
0x31, 0xc9, 0x25, 0x98, 0xdc, 0xaa, 0x26, 0xef,
0x09, 0xca, 0x0d, 0xa5, 0xe7, 0x71, 0x93, 0xde,
};
static const size_t TEST_DVPT192_73_INPUT_LEN = 24;
/* Alen = 0, Plen = 24, Nlen = 7, Tlen = 16 */
static const uint8_t TEST_DVPT192_GROUP_5_MAC_LEN = 16;
static const uint8_t TEST_DVPT192_GROUP_5_KEY[] = {
0x19, 0x7a, 0xfb, 0x02, 0xff, 0xbd, 0x8f, 0x69,
0x9d, 0xac, 0xae, 0x87, 0x09, 0x4d, 0x52, 0x43,
0x24, 0x57, 0x6b, 0x99, 0x84, 0x4f, 0x75, 0xe1,
};
static const size_t TEST_DVPT192_GROUP_5_KEY_LEN = 24;
static const uint8_t TEST_DVPT192_75_NONCE[] = {
0x5a, 0x8a, 0xa4, 0x85, 0xc3, 0x16, 0xe9,
};
static const size_t TEST_DVPT192_75_NONCE_LEN = 7;
static const uint8_t TEST_DVPT192_75_ADATA[] = {
0x00,
};
static const size_t TEST_DVPT192_75_ADATA_LEN = 0;
static const uint8_t TEST_DVPT192_75_EXPECTED[] = {
0xcb, 0xa4, 0xb4, 0xae, 0xb8, 0x5f, 0x04, 0x92,
0xfd, 0x8d, 0x90, 0x5c, 0x4a, 0x6d, 0x82, 0x33,
0x13, 0x98, 0x33, 0x37, 0x3e, 0xf1, 0x88, 0xa8,
0xc5, 0xa5, 0xeb, 0xec, 0xf7, 0xac, 0x86, 0x07,
0xfe, 0x41, 0x21, 0x89, 0xe8, 0x3d, 0x9d, 0x20,
};
static const size_t TEST_DVPT192_75_EXPECTED_LEN = 40;
static const uint8_t TEST_DVPT192_75_INPUT[] = {
0x37, 0x96, 0xcf, 0x51, 0xb8, 0x72, 0x66, 0x52,
0xa4, 0x20, 0x47, 0x33, 0xb8, 0xfb, 0xb0, 0x47,
0xcf, 0x00, 0xfb, 0x91, 0xa9, 0x83, 0x7e, 0x22,
};
static const size_t TEST_DVPT192_75_INPUT_LEN = 24;
static const uint8_t TEST_DVPT192_79_NONCE[] = {
0x12, 0x3a, 0x0b, 0xea, 0xce, 0x4e, 0x39,
};
static const size_t TEST_DVPT192_79_NONCE_LEN = 7;
static const uint8_t TEST_DVPT192_79_ADATA[] = {
0x00,
};
static const size_t TEST_DVPT192_79_ADATA_LEN = 0;
static const uint8_t TEST_DVPT192_79_EXPECTED[] = {
0x71, 0xf1, 0x7c, 0xf2, 0x1c, 0x44, 0x26, 0x7c,
0x67, 0x66, 0x57, 0xdb, 0x9e, 0x55, 0xbe, 0xe3,
0x32, 0x73, 0x78, 0x74, 0x74, 0xe7, 0x7b, 0x17,
0xb5, 0xea, 0xb4, 0x5d, 0x7d, 0x09, 0x65, 0x77,
0x64, 0x38, 0x15, 0xe6, 0xd4, 0x67, 0x31, 0x2d,
};
static const size_t TEST_DVPT192_79_EXPECTED_LEN = 40;
static const uint8_t TEST_DVPT192_79_INPUT[] = {
0x9d, 0x03, 0x3e, 0x3b, 0x66, 0xef, 0xed, 0x14,
0x67, 0x86, 0x8f, 0x38, 0x24, 0x17, 0xc8, 0x05,
0x94, 0x87, 0x7a, 0x28, 0xbc, 0x97, 0xf4, 0x06,
};
static const size_t TEST_DVPT192_79_INPUT_LEN = 24;
static const uint8_t TEST_DVPT192_86_NONCE[] = {
0xf6, 0x7b, 0x98, 0xef, 0xd3, 0x9b, 0x55,
};
static const size_t TEST_DVPT192_86_NONCE_LEN = 7;
static const uint8_t TEST_DVPT192_86_ADATA[] = {
0x00,
};
static const size_t TEST_DVPT192_86_ADATA_LEN = 0;
static const uint8_t TEST_DVPT192_86_EXPECTED[] = {
0x44, 0xa6, 0xaa, 0x95, 0x4c, 0x35, 0x08, 0xb3,
0xc9, 0x26, 0x4c, 0x20, 0xc2, 0x72, 0xe8, 0x0c,
0x0e, 0x95, 0xd5, 0x0d, 0xde, 0xc2, 0x84, 0x90,
0x84, 0xb4, 0x75, 0x04, 0xdc, 0xed, 0x5b, 0x70,
0xc3, 0x02, 0xcc, 0x93, 0x50, 0x2c, 0xc3, 0x7e,
};
static const size_t TEST_DVPT192_86_EXPECTED_LEN = 40;
static const uint8_t TEST_DVPT192_86_INPUT[] = {
0xf2, 0xe9, 0x44, 0xe1, 0xae, 0x47, 0xad, 0x58,
0x73, 0xbf, 0x39, 0x1f, 0x1b, 0x0c, 0xc0, 0x7f,
0x61, 0x51, 0xeb, 0x4c, 0x50, 0xbb, 0x45, 0xb2,
};
static const size_t TEST_DVPT192_86_INPUT_LEN = 24;
static const uint8_t TEST_DVPT192_87_NONCE[] = {
0xe6, 0x0e, 0x2c, 0x00, 0x2d, 0x1c, 0x99,
};
static const size_t TEST_DVPT192_87_NONCE_LEN = 7;
static const uint8_t TEST_DVPT192_87_ADATA[] = {
0x00,
};
static const size_t TEST_DVPT192_87_ADATA_LEN = 0;
static const uint8_t TEST_DVPT192_87_EXPECTED[] = {
0x9d, 0x4f, 0xf7, 0xa4, 0x4c, 0xdb, 0x9b, 0x14,
0xf5, 0x86, 0xef, 0xc3, 0xd6, 0xbe, 0x02, 0xd0,
0x69, 0xb4, 0x25, 0xc0, 0x6b, 0xec, 0x4e, 0xed,
0x37, 0x10, 0x97, 0x39, 0xa3, 0x67, 0x6f, 0x03,
0xad, 0xfd, 0x74, 0x0d, 0xba, 0xa4, 0x94, 0x0d,
};
static const size_t TEST_DVPT192_87_EXPECTED_LEN = 40;
static const uint8_t TEST_DVPT192_87_INPUT[] = {
0x70, 0xf4, 0x8d, 0xc1, 0xd7, 0x6e, 0x50, 0x28,
0xda, 0x07, 0xe2, 0x98, 0x52, 0x80, 0x13, 0x75,
0xa9, 0xed, 0xb2, 0x21, 0x4a, 0x5e, 0xa4, 0xc0,
};
static const size_t TEST_DVPT192_87_INPUT_LEN = 24;
static const uint8_t TEST_DVPT192_88_NONCE[] = {
0x09, 0x8e, 0x05, 0x3f, 0xa0, 0x80, 0x43,
};
static const size_t TEST_DVPT192_88_NONCE_LEN = 7;
static const uint8_t TEST_DVPT192_88_ADATA[] = {
0x00,
};
static const size_t TEST_DVPT192_88_ADATA_LEN = 0;
static const uint8_t TEST_DVPT192_88_EXPECTED[] = {
0x23, 0xda, 0x95, 0xe1, 0x02, 0xc7, 0x92, 0x1a,
0x51, 0xb1, 0x9b, 0x57, 0x33, 0xea, 0x57, 0x76,
0xab, 0x6c, 0x28, 0x7f, 0x60, 0x57, 0xc0, 0x0e,
0xc4, 0xbf, 0xac, 0xbb, 0x2f, 0x24, 0x6b, 0x57,
0x0e, 0xfd, 0x93, 0xd9, 0x8e, 0x99, 0xbe, 0x49,
};
static const size_t TEST_DVPT192_88_EXPECTED_LEN = 40;
static const uint8_t TEST_DVPT192_88_INPUT[] = {
0xbd, 0x81, 0x68, 0x0e, 0x3d, 0xc0, 0xb3, 0x54,
0x31, 0xc9, 0x25, 0x98, 0xdc, 0xaa, 0x26, 0xef,
0x09, 0xca, 0x0d, 0xa5, 0xe7, 0x71, 0x93, 0xde,
};
static const size_t TEST_DVPT192_88_INPUT_LEN = 24;
/* Alen = 0, Plen = 24, Nlen = 13, Tlen = 4 */
static const uint8_t TEST_DVPT192_GROUP_6_MAC_LEN = 4;
static const uint8_t TEST_DVPT192_GROUP_6_KEY[] = {
0x19, 0x7a, 0xfb, 0x02, 0xff, 0xbd, 0x8f, 0x69,
0x9d, 0xac, 0xae, 0x87, 0x09, 0x4d, 0x52, 0x43,
0x24, 0x57, 0x6b, 0x99, 0x84, 0x4f, 0x75, 0xe1,
};
static const size_t TEST_DVPT192_GROUP_6_KEY_LEN = 24;
static const uint8_t TEST_DVPT192_90_NONCE[] = {
0x5a, 0x8a, 0xa4, 0x85, 0xc3, 0x16, 0xe9, 0x40,
0x3a, 0xff, 0x85, 0x9f, 0xbb,
};
static const size_t TEST_DVPT192_90_NONCE_LEN = 13;
static const uint8_t TEST_DVPT192_90_ADATA[] = {
0x00,
};
static const size_t TEST_DVPT192_90_ADATA_LEN = 0;
static const uint8_t TEST_DVPT192_90_EXPECTED[] = {
0x04, 0x26, 0x53, 0xc6, 0x74, 0xef, 0x2a, 0x90,
0xf7, 0xfb, 0x11, 0xd3, 0x08, 0x48, 0xe5, 0x30,
0xae, 0x59, 0x47, 0x8f, 0x10, 0x51, 0x63, 0x3a,
0x34, 0xfa, 0xd2, 0x77,
};
static const size_t TEST_DVPT192_90_EXPECTED_LEN = 28;
static const uint8_t TEST_DVPT192_90_INPUT[] = {
0xa1, 0x6a, 0x2e, 0x74, 0x1f, 0x1c, 0xd9, 0x71,
0x72, 0x85, 0xb6, 0xd8, 0x82, 0xc1, 0xfc, 0x53,
0x65, 0x5e, 0x97, 0x73, 0x76, 0x1a, 0xd6, 0x97,
};
static const size_t TEST_DVPT192_90_INPUT_LEN = 24;
static const uint8_t TEST_DVPT192_94_NONCE[] = {
0x24, 0xb7, 0xa6, 0x53, 0x91, 0xf8, 0x8b, 0xea,
0x38, 0xfc, 0xd5, 0x4a, 0x9a,
};
static const size_t TEST_DVPT192_94_NONCE_LEN = 13;
static const uint8_t TEST_DVPT192_94_ADATA[] = {
0x00,
};
static const size_t TEST_DVPT192_94_ADATA_LEN = 0;
static const uint8_t TEST_DVPT192_94_EXPECTED[] = {
0x3c, 0x18, 0x36, 0xe5, 0xd0, 0xf0, 0x47, 0x3d,
0xab, 0x7b, 0xfd, 0x7a, 0x95, 0xba, 0x69, 0x57,
0x5f, 0x7f, 0x84, 0x19, 0x70, 0xac, 0x6c, 0x67,
0x69, 0xac, 0x96, 0x6a,
};
static const size_t TEST_DVPT192_94_EXPECTED_LEN = 28;
static const uint8_t TEST_DVPT192_94_INPUT[] = {
0x43, 0x41, 0x97, 0x15, 0xce, 0xf9, 0xa4, 0x8d,
0xc7, 0x28, 0x0b, 0xc0, 0x35, 0x08, 0x2a, 0x65,
0x81, 0xaf, 0xd1, 0xd8, 0x2b, 0xee, 0x9d, 0x1a,
};
static const size_t TEST_DVPT192_94_INPUT_LEN = 24;
static const uint8_t TEST_DVPT192_101_NONCE[] = {
0xc4, 0x7a, 0xf8, 0x0c, 0xd2, 0x6d, 0x04, 0x76,
0x30, 0xc1, 0xfd, 0xf0, 0xd1,
};
static const size_t TEST_DVPT192_101_NONCE_LEN = 13;
static const uint8_t TEST_DVPT192_101_ADATA[] = {
0x00,
};
static const size_t TEST_DVPT192_101_ADATA_LEN = 0;
static const uint8_t TEST_DVPT192_101_EXPECTED[] = {
0x34, 0x1d, 0xf3, 0xa2, 0x73, 0xe8, 0x5c, 0xf3,
0x87, 0xab, 0x82, 0x3b, 0xdf, 0x9c, 0x34, 0xa1,
0xae, 0x2c, 0x86, 0x94, 0x0c, 0xb4, 0xbf, 0xcd,
0xe2, 0xe9, 0x3f, 0x29,
};
static const size_t TEST_DVPT192_101_EXPECTED_LEN = 28;
static const uint8_t TEST_DVPT192_101_INPUT[] = {
0xd8, 0x30, 0x6c, 0x9c, 0x4e, 0xa6, 0xc6, 0x9c,
0x6e, 0x2a, 0xd0, 0xfc, 0x0e, 0x49, 0xb1, 0xe0,
0x12, 0x6b, 0x01, 0x07, 0x8d, 0x64, 0x19, 0xff,
};
static const size_t TEST_DVPT192_101_INPUT_LEN = 24;
static const uint8_t TEST_DVPT192_102_NONCE[] = {
0x70, 0xe1, 0x32, 0x02, 0x3a, 0xca, 0xe1, 0xf8,
0x8c, 0x7a, 0x23, 0x7b, 0x68,
};
static const size_t TEST_DVPT192_102_NONCE_LEN = 13;
static const uint8_t TEST_DVPT192_102_ADATA[] = {
0x00,
};
static const size_t TEST_DVPT192_102_ADATA_LEN = 0;
static const uint8_t TEST_DVPT192_102_EXPECTED[] = {
0xa0, 0xe7, 0x99, 0x7f, 0xd6, 0x7e, 0xa6, 0x6b,
0x62, 0x74, 0xd7, 0x19, 0xb8, 0x4d, 0xa9, 0x24,
0x33, 0xfd, 0xf7, 0xd5, 0x12, 0xb1, 0x60, 0xda,
0x35, 0xc7, 0x08, 0x1d,
};
static const size_t TEST_DVPT192_102_EXPECTED_LEN = 28;
static const uint8_t TEST_DVPT192_102_INPUT[] = {
0xd0, 0xb2, 0xbe, 0xf5, 0xed, 0x1a, 0x87, 0xd9,
0xc7, 0x3d, 0x4a, 0x45, 0x9c, 0xb0, 0x5c, 0x11,
0x79, 0x9c, 0x4f, 0x51, 0xad, 0x64, 0x0b, 0x1e,
};
static const size_t TEST_DVPT192_102_INPUT_LEN = 24;
static const uint8_t TEST_DVPT192_103_NONCE[] = {
0x80, 0x10, 0xd3, 0xa2, 0xa1, 0x4f, 0x72, 0xf5,
0x58, 0x5d, 0xef, 0xc9, 0x40,
};
static const size_t TEST_DVPT192_103_NONCE_LEN = 13;
static const uint8_t TEST_DVPT192_103_ADATA[] = {
0x00,
};
static const size_t TEST_DVPT192_103_ADATA_LEN = 0;
static const uint8_t TEST_DVPT192_103_EXPECTED[] = {
0xdd, 0x8f, 0xd1, 0x1e, 0x1c, 0x07, 0x46, 0xe7,
0x27, 0x3f, 0xdd, 0x2e, 0x7d, 0xfa, 0x1e, 0xe4,
0xfc, 0x8a, 0xd8, 0x35, 0xca, 0x31, 0x41, 0xc0,
0xf8, 0x3a, 0x9a, 0xd7,
};
static const size_t TEST_DVPT192_103_EXPECTED_LEN = 28;
static const uint8_t TEST_DVPT192_103_INPUT[] = {
0x4f, 0xab, 0xa0, 0x55, 0x69, 0xbf, 0x7a, 0xc6,
0x56, 0x78, 0x0c, 0x16, 0x99, 0x5e, 0x91, 0x22,
0xe5, 0x65, 0xfe, 0x99, 0x84, 0xbe, 0x8a, 0x68,
};
static const size_t TEST_DVPT192_103_INPUT_LEN = 24;
/* Alen = 0, Plen = 24, Nlen = 13, Tlen = 16 */
static const uint8_t TEST_DVPT192_GROUP_7_MAC_LEN = 16;
static const uint8_t TEST_DVPT192_GROUP_7_KEY[] = {
0x90, 0x92, 0x9a, 0x4b, 0x0a, 0xc6, 0x5b, 0x35,
0x0a, 0xd1, 0x59, 0x16, 0x11, 0xfe, 0x48, 0x29,
0x7e, 0x03, 0x95, 0x6f, 0x60, 0x83, 0xe4, 0x51,
};
static const size_t TEST_DVPT192_GROUP_7_KEY_LEN = 24;
static const uint8_t TEST_DVPT192_105_NONCE[] = {
0x5a, 0x8a, 0xa4, 0x85, 0xc3, 0x16, 0xe9, 0x40,
0x3a, 0xff, 0x85, 0x9f, 0xbb,
};
static const size_t TEST_DVPT192_105_NONCE_LEN = 13;
static const uint8_t TEST_DVPT192_105_ADATA[] = {
0x00,
};
static const size_t TEST_DVPT192_105_ADATA_LEN = 0;
static const uint8_t TEST_DVPT192_105_EXPECTED[] = {
0xa5, 0xb7, 0xd8, 0xcc, 0xa2, 0x06, 0x99, 0x08,
0xd1, 0xed, 0x88, 0xe6, 0xa9, 0xfe, 0x2c, 0x9b,
0xed, 0xe3, 0x13, 0x1d, 0xad, 0x54, 0x67, 0x1e,
0xa7, 0xad, 0xe3, 0x0a, 0x07, 0xd1, 0x85, 0x69,
0x2a, 0xb0, 0xeb, 0xdf, 0x4c, 0x78, 0xcf, 0x7a,
};
static const size_t TEST_DVPT192_105_EXPECTED_LEN = 40;
static const uint8_t TEST_DVPT192_105_INPUT[] = {
0xa1, 0x6a, 0x2e, 0x74, 0x1f, 0x1c, 0xd9, 0x71,
0x72, 0x85, 0xb6, 0xd8, 0x82, 0xc1, 0xfc, 0x53,
0x65, 0x5e, 0x97, 0x73, 0x76, 0x1a, 0xd6, 0x97,
};
static const size_t TEST_DVPT192_105_INPUT_LEN = 24;
static const uint8_t TEST_DVPT192_109_NONCE[] = {
0x24, 0xb7, 0xa6, 0x53, 0x91, 0xf8, 0x8b, 0xea,
0x38, 0xfc, 0xd5, 0x4a, 0x9a,
};
static const size_t TEST_DVPT192_109_NONCE_LEN = 13;
static const uint8_t TEST_DVPT192_109_ADATA[] = {
0x00,
};
static const size_t TEST_DVPT192_109_ADATA_LEN = 0;
static const uint8_t TEST_DVPT192_109_EXPECTED[] = {
0x71, 0xf6, 0x84, 0x80, 0xa8, 0x80, 0x1d, 0x49,
0x66, 0xc8, 0x48, 0x07, 0xc5, 0xff, 0x61, 0x39,
0xd8, 0x3b, 0xa0, 0xa5, 0xb9, 0x02, 0xbe, 0xe3,
0x32, 0x7f, 0x5f, 0x91, 0x76, 0x3c, 0x0a, 0x0b,
0xec, 0x43, 0x26, 0x4c, 0x27, 0xcd, 0x23, 0x7f,
};
static const size_t TEST_DVPT192_109_EXPECTED_LEN = 40;
static const uint8_t TEST_DVPT192_109_INPUT[] = {
0x43, 0x41, 0x97, 0x15, 0xce, 0xf9, 0xa4, 0x8d,
0xc7, 0x28, 0x0b, 0xc0, 0x35, 0x08, 0x2a, 0x65,
0x81, 0xaf, 0xd1, 0xd8, 0x2b, 0xee, 0x9d, 0x1a,
};
static const size_t TEST_DVPT192_109_INPUT_LEN = 24;
static const uint8_t TEST_DVPT192_116_NONCE[] = {
0xc4, 0x7a, 0xf8, 0x0c, 0xd2, 0x6d, 0x04, 0x76,
0x30, 0xc1, 0xfd, 0xf0, 0xd1,
};
static const size_t TEST_DVPT192_116_NONCE_LEN = 13;
static const uint8_t TEST_DVPT192_116_ADATA[] = {
0x00,
};
static const size_t TEST_DVPT192_116_ADATA_LEN = 0;
static const uint8_t TEST_DVPT192_116_EXPECTED[] = {
0x5b, 0x0b, 0x5e, 0x66, 0x90, 0xd6, 0x48, 0xe1,
0xb9, 0x2c, 0x12, 0xcf, 0xdd, 0xb4, 0x31, 0xd6,
0xd3, 0xdf, 0xe6, 0x89, 0xd0, 0x1d, 0xb8, 0x19,
0x92, 0x56, 0xac, 0xe4, 0x90, 0xc2, 0xf0, 0xaf,
0xb9, 0x3b, 0xa3, 0x2b, 0xe5, 0x8f, 0xd1, 0xde,
};
static const size_t TEST_DVPT192_116_EXPECTED_LEN = 40;
static const uint8_t TEST_DVPT192_116_INPUT[] = {
0xd8, 0x30, 0x6c, 0x9c, 0x4e, 0xa6, 0xc6, 0x9c,
0x6e, 0x2a, 0xd0, 0xfc, 0x0e, 0x49, 0xb1, 0xe0,
0x12, 0x6b, 0x01, 0x07, 0x8d, 0x64, 0x19, 0xff,
};
static const size_t TEST_DVPT192_116_INPUT_LEN = 24;
static const uint8_t TEST_DVPT192_117_NONCE[] = {
0x70, 0xe1, 0x32, 0x02, 0x3a, 0xca, 0xe1, 0xf8,
0x8c, 0x7a, 0x23, 0x7b, 0x68,
};
static const size_t TEST_DVPT192_117_NONCE_LEN = 13;
static const uint8_t TEST_DVPT192_117_ADATA[] = {
0x00,
};
static const size_t TEST_DVPT192_117_ADATA_LEN = 0;
static const uint8_t TEST_DVPT192_117_EXPECTED[] = {
0x87, 0x22, 0xfc, 0xa7, 0x1f, 0xdf, 0x75, 0x0e,
0xc5, 0xd6, 0x2f, 0xc6, 0xd7, 0xba, 0x07, 0x9a,
0xef, 0x19, 0x21, 0x0d, 0xa7, 0x64, 0x06, 0x7a,
0xef, 0xd8, 0x53, 0x5d, 0xd6, 0xb7, 0xfa, 0x70,
0x1c, 0x9c, 0xa8, 0xc8, 0xb6, 0x35, 0xc3, 0x0b,
};
static const size_t TEST_DVPT192_117_EXPECTED_LEN = 40;
static const uint8_t TEST_DVPT192_117_INPUT[] = {
0xd0, 0xb2, 0xbe, 0xf5, 0xed, 0x1a, 0x87, 0xd9,
0xc7, 0x3d, 0x4a, 0x45, 0x9c, 0xb0, 0x5c, 0x11,
0x79, 0x9c, 0x4f, 0x51, 0xad, 0x64, 0x0b, 0x1e,
};
static const size_t TEST_DVPT192_117_INPUT_LEN = 24;
static const uint8_t TEST_DVPT192_118_NONCE[] = {
0x80, 0x10, 0xd3, 0xa2, 0xa1, 0x4f, 0x72, 0xf5,
0x58, 0x5d, 0xef, 0xc9, 0x40,
};
static const size_t TEST_DVPT192_118_NONCE_LEN = 13;
static const uint8_t TEST_DVPT192_118_ADATA[] = {
0x00,
};
static const size_t TEST_DVPT192_118_ADATA_LEN = 0;
static const uint8_t TEST_DVPT192_118_EXPECTED[] = {
0x91, 0xac, 0x45, 0x7f, 0x5e, 0x53, 0x49, 0x23,
0x01, 0xe7, 0x2d, 0x9d, 0x49, 0x52, 0x77, 0xed,
0x17, 0xed, 0xb3, 0x0e, 0x8c, 0x7a, 0x48, 0xd2,
0x1b, 0x5d, 0x2c, 0xd4, 0xd5, 0xb6, 0xd2, 0xef,
0x48, 0x41, 0x32, 0x45, 0xa6, 0xb2, 0x7b, 0x67,
};
static const size_t TEST_DVPT192_118_EXPECTED_LEN = 40;
static const uint8_t TEST_DVPT192_118_INPUT[] = {
0x4f, 0xab, 0xa0, 0x55, 0x69, 0xbf, 0x7a, 0xc6,
0x56, 0x78, 0x0c, 0x16, 0x99, 0x5e, 0x91, 0x22,
0xe5, 0x65, 0xfe, 0x99, 0x84, 0xbe, 0x8a, 0x68,
};
static const size_t TEST_DVPT192_118_INPUT_LEN = 24;
/* Alen = 32, Plen = 0, Nlen = 7, Tlen = 4 */
static const uint8_t TEST_DVPT192_GROUP_8_MAC_LEN = 4;
static const uint8_t TEST_DVPT192_GROUP_8_KEY[] = {
0x90, 0x92, 0x9a, 0x4b, 0x0a, 0xc6, 0x5b, 0x35,
0x0a, 0xd1, 0x59, 0x16, 0x11, 0xfe, 0x48, 0x29,
0x7e, 0x03, 0x95, 0x6f, 0x60, 0x83, 0xe4, 0x51,
};
static const size_t TEST_DVPT192_GROUP_8_KEY_LEN = 24;
static const uint8_t TEST_DVPT192_120_NONCE[] = {
0x5a, 0x8a, 0xa4, 0x85, 0xc3, 0x16, 0xe9,
};
static const size_t TEST_DVPT192_120_NONCE_LEN = 7;
static const uint8_t TEST_DVPT192_120_ADATA[] = {
0x37, 0x96, 0xcf, 0x51, 0xb8, 0x72, 0x66, 0x52,
0xa4, 0x20, 0x47, 0x33, 0xb8, 0xfb, 0xb0, 0x47,
0xcf, 0x00, 0xfb, 0x91, 0xa9, 0x83, 0x7e, 0x22,
0xec, 0x22, 0xb1, 0xa2, 0x68, 0xf8, 0x8e, 0x2c,
};
static const size_t TEST_DVPT192_120_ADATA_LEN = 32;
static const uint8_t TEST_DVPT192_120_EXPECTED[] = {
0x1d, 0x08, 0x9a, 0x5f,
};
static const size_t TEST_DVPT192_120_EXPECTED_LEN = 4;
static const uint8_t TEST_DVPT192_120_INPUT[] = {
0x00,
};
static const size_t TEST_DVPT192_120_INPUT_LEN = 0;
static const uint8_t TEST_DVPT192_124_NONCE[] = {
0x8c, 0x68, 0x7b, 0x43, 0x18, 0x81, 0x3a,
};
static const size_t TEST_DVPT192_124_NONCE_LEN = 7;
static const uint8_t TEST_DVPT192_124_ADATA[] = {
0xfc, 0xad, 0x52, 0xa8, 0x85, 0x44, 0x32, 0x5b,
0xb3, 0x1e, 0xb5, 0xde, 0x4a, 0x41, 0xdb, 0xff,
0x6a, 0x96, 0xf6, 0x9d, 0x09, 0x93, 0xb9, 0x69,
0xa0, 0x17, 0x92, 0xee, 0x23, 0x95, 0x3a, 0xcf,
};
static const size_t TEST_DVPT192_124_ADATA_LEN = 32;
static const uint8_t TEST_DVPT192_124_EXPECTED[] = {
0x5c, 0x6a, 0x4d, 0xe2,
};
static const size_t TEST_DVPT192_124_EXPECTED_LEN = 4;
static const uint8_t TEST_DVPT192_124_INPUT[] = {
0x00,
};
static const size_t TEST_DVPT192_124_INPUT_LEN = 0;
static const uint8_t TEST_DVPT192_131_NONCE[] = {
0xa1, 0xae, 0xda, 0x4b, 0x4c, 0xb8, 0xdd,
};
static const size_t TEST_DVPT192_131_NONCE_LEN = 7;
static const uint8_t TEST_DVPT192_131_ADATA[] = {
0xdb, 0x30, 0x22, 0xef, 0x4c, 0xd6, 0x8a, 0xe2,
0x2b, 0x50, 0x15, 0x99, 0x44, 0x8f, 0xfe, 0x2d,
0xda, 0x15, 0xcf, 0xd2, 0xe2, 0x59, 0x31, 0x5c,
0x6f, 0x6d, 0x03, 0x03, 0x6e, 0xde, 0xa9, 0x63,
};
static const size_t TEST_DVPT192_131_ADATA_LEN = 32;
static const uint8_t TEST_DVPT192_131_EXPECTED[] = {
0x58, 0x14, 0x10, 0x3a,
};
static const size_t TEST_DVPT192_131_EXPECTED_LEN = 4;
static const uint8_t TEST_DVPT192_131_INPUT[] = {
0x00,
};
static const size_t TEST_DVPT192_131_INPUT_LEN = 0;
static const uint8_t TEST_DVPT192_132_NONCE[] = {
0xf2, 0x48, 0xe5, 0x22, 0x5e, 0x3d, 0x9a,
};
static const size_t TEST_DVPT192_132_NONCE_LEN = 7;
static const uint8_t TEST_DVPT192_132_ADATA[] = {
0xfd, 0xc6, 0x4e, 0xf7, 0x6a, 0x3b, 0xfd, 0x0a,
0x15, 0xd0, 0xbc, 0x8e, 0x8b, 0xac, 0xaf, 0x64,
0x34, 0x67, 0x96, 0xa3, 0xe3, 0x5a, 0xfc, 0xf2,
0xac, 0x1a, 0xb1, 0x36, 0xf6, 0x3f, 0x7b, 0x6e,
};
static const size_t TEST_DVPT192_132_ADATA_LEN = 32;
static const uint8_t TEST_DVPT192_132_EXPECTED[] = {
0x74, 0xc7, 0x5c, 0x4a,
};
static const size_t TEST_DVPT192_132_EXPECTED_LEN = 4;
static const uint8_t TEST_DVPT192_132_INPUT[] = {
0x00,
};
static const size_t TEST_DVPT192_132_INPUT_LEN = 0;
static const uint8_t TEST_DVPT192_133_NONCE[] = {
0xe6, 0x82, 0x28, 0xf5, 0xc6, 0x5b, 0x73,
};
static const size_t TEST_DVPT192_133_NONCE_LEN = 7;
static const uint8_t TEST_DVPT192_133_ADATA[] = {
0x61, 0x4e, 0xfd, 0xf8, 0x9c, 0xe2, 0xa9, 0xfc,
0xbd, 0x38, 0xbd, 0xc0, 0xb4, 0xce, 0xce, 0x54,
0xdf, 0xd7, 0x53, 0x28, 0x80, 0xe0, 0xb4, 0xce,
0x6e, 0xb3, 0xa4, 0x01, 0x0b, 0x7c, 0xb1, 0xe7,
};
static const size_t TEST_DVPT192_133_ADATA_LEN = 32;
static const uint8_t TEST_DVPT192_133_EXPECTED[] = {
0x98, 0x84, 0x89, 0x8b,
};
static const size_t TEST_DVPT192_133_EXPECTED_LEN = 4;
static const uint8_t TEST_DVPT192_133_INPUT[] = {
0x00,
};
static const size_t TEST_DVPT192_133_INPUT_LEN = 0;
/* Alen = 32, Plen = 0, Nlen = 7, Tlen = 16 */
static const uint8_t TEST_DVPT192_GROUP_9_MAC_LEN = 16;
static const uint8_t TEST_DVPT192_GROUP_9_KEY[] = {
0x6a, 0x79, 0x8d, 0x7c, 0x5e, 0x1a, 0x72, 0xb4,
0x3e, 0x20, 0xad, 0x5c, 0x7b, 0x08, 0x56, 0x7b,
0x12, 0xab, 0x74, 0x4b, 0x61, 0xc0, 0x70, 0xe2,
};
static const size_t TEST_DVPT192_GROUP_9_KEY_LEN = 24;
static const uint8_t TEST_DVPT192_135_NONCE[] = {
0x5a, 0x8a, 0xa4, 0x85, 0xc3, 0x16, 0xe9,
};
static const size_t TEST_DVPT192_135_NONCE_LEN = 7;
static const uint8_t TEST_DVPT192_135_ADATA[] = {
0x37, 0x96, 0xcf, 0x51, 0xb8, 0x72, 0x66, 0x52,
0xa4, 0x20, 0x47, 0x33, 0xb8, 0xfb, 0xb0, 0x47,
0xcf, 0x00, 0xfb, 0x91, 0xa9, 0x83, 0x7e, 0x22,
0xec, 0x22, 0xb1, 0xa2, 0x68, 0xf8, 0x8e, 0x2c,
};
static const size_t TEST_DVPT192_135_ADATA_LEN = 32;
static const uint8_t TEST_DVPT192_135_EXPECTED[] = {
0x52, 0x80, 0xa2, 0x13, 0x7f, 0xee, 0x3d, 0xee,
0xfc, 0xfe, 0x9b, 0x63, 0xa1, 0x19, 0x9f, 0xb3,
};
static const size_t TEST_DVPT192_135_EXPECTED_LEN = 16;
static const uint8_t TEST_DVPT192_135_INPUT[] = {
0x00,
};
static const size_t TEST_DVPT192_135_INPUT_LEN = 0;
static const uint8_t TEST_DVPT192_139_NONCE[] = {
0x8c, 0x68, 0x7b, 0x43, 0x18, 0x81, 0x3a,
};
static const size_t TEST_DVPT192_139_NONCE_LEN = 7;
static const uint8_t TEST_DVPT192_139_ADATA[] = {
0xfc, 0xad, 0x52, 0xa8, 0x85, 0x44, 0x32, 0x5b,
0xb3, 0x1e, 0xb5, 0xde, 0x4a, 0x41, 0xdb, 0xff,
0x6a, 0x96, 0xf6, 0x9d, 0x09, 0x93, 0xb9, 0x69,
0xa0, 0x17, 0x92, 0xee, 0x23, 0x95, 0x3a, 0xcf,
};
static const size_t TEST_DVPT192_139_ADATA_LEN = 32;
static const uint8_t TEST_DVPT192_139_EXPECTED[] = {
0x29, 0xe9, 0x67, 0xa0, 0x24, 0x56, 0x07, 0xc3,
0x6c, 0xf3, 0xea, 0xf0, 0x0f, 0xda, 0xe5, 0x66,
};
static const size_t TEST_DVPT192_139_EXPECTED_LEN = 16;
static const uint8_t TEST_DVPT192_139_INPUT[] = {
0x00,
};
static const size_t TEST_DVPT192_139_INPUT_LEN = 0;
static const uint8_t TEST_DVPT192_146_NONCE[] = {
0xa1, 0xae, 0xda, 0x4b, 0x4c, 0xb8, 0xdd,
};
static const size_t TEST_DVPT192_146_NONCE_LEN = 7;
static const uint8_t TEST_DVPT192_146_ADATA[] = {
0xdb, 0x30, 0x22, 0xef, 0x4c, 0xd6, 0x8a, 0xe2,
0x2b, 0x50, 0x15, 0x99, 0x44, 0x8f, 0xfe, 0x2d,
0xda, 0x15, 0xcf, 0xd2, 0xe2, 0x59, 0x31, 0x5c,
0x6f, 0x6d, 0x03, 0x03, 0x6e, 0xde, 0xa9, 0x63,
};
static const size_t TEST_DVPT192_146_ADATA_LEN = 32;
static const uint8_t TEST_DVPT192_146_EXPECTED[] = {
0x70, 0xa0, 0x9a, 0xaf, 0x22, 0xac, 0x31, 0x61,
0x24, 0xa1, 0x69, 0xf6, 0xb0, 0xa8, 0x3f, 0xfe,
};
static const size_t TEST_DVPT192_146_EXPECTED_LEN = 16;
static const uint8_t TEST_DVPT192_146_INPUT[] = {
0x00,
};
static const size_t TEST_DVPT192_146_INPUT_LEN = 0;
static const uint8_t TEST_DVPT192_147_NONCE[] = {
0xf2, 0x48, 0xe5, 0x22, 0x5e, 0x3d, 0x9a,
};
static const size_t TEST_DVPT192_147_NONCE_LEN = 7;
static const uint8_t TEST_DVPT192_147_ADATA[] = {
0xfd, 0xc6, 0x4e, 0xf7, 0x6a, 0x3b, 0xfd, 0x0a,
0x15, 0xd0, 0xbc, 0x8e, 0x8b, 0xac, 0xaf, 0x64,
0x34, 0x67, 0x96, 0xa3, 0xe3, 0x5a, 0xfc, 0xf2,
0xac, 0x1a, 0xb1, 0x36, 0xf6, 0x3f, 0x7b, 0x6e,
};
static const size_t TEST_DVPT192_147_ADATA_LEN = 32;
static const uint8_t TEST_DVPT192_147_EXPECTED[] = {
0x5b, 0xc8, 0x5e, 0xd5, 0x52, 0x1a, 0x91, 0xb9,
0xeb, 0x42, 0xb4, 0x37, 0x95, 0x0f, 0x0e, 0x06,
};
static const size_t TEST_DVPT192_147_EXPECTED_LEN = 16;
static const uint8_t TEST_DVPT192_147_INPUT[] = {
0x00,
};
static const size_t TEST_DVPT192_147_INPUT_LEN = 0;
static const uint8_t TEST_DVPT192_148_NONCE[] = {
0xe6, 0x82, 0x28, 0xf5, 0xc6, 0x5b, 0x73,
};
static const size_t TEST_DVPT192_148_NONCE_LEN = 7;
static const uint8_t TEST_DVPT192_148_ADATA[] = {
0x61, 0x4e, 0xfd, 0xf8, 0x9c, 0xe2, 0xa9, 0xfc,
0xbd, 0x38, 0xbd, 0xc0, 0xb4, 0xce, 0xce, 0x54,
0xdf, 0xd7, 0x53, 0x28, 0x80, 0xe0, 0xb4, 0xce,
0x6e, 0xb3, 0xa4, 0x01, 0x0b, 0x7c, 0xb1, 0xe7,
};
static const size_t TEST_DVPT192_148_ADATA_LEN = 32;
static const uint8_t TEST_DVPT192_148_EXPECTED[] = {
0x98, 0x9e, 0xc0, 0xe7, 0xb1, 0x92, 0xea, 0x01,
0x0d, 0xd6, 0x1d, 0x3f, 0xb6, 0x4e, 0x8d, 0xe0,
};
static const size_t TEST_DVPT192_148_EXPECTED_LEN = 16;
static const uint8_t TEST_DVPT192_148_INPUT[] = {
0x00,
};
static const size_t TEST_DVPT192_148_INPUT_LEN = 0;
/* Alen = 32, Plen = 0, Nlen = 13, Tlen = 4 */
static const uint8_t TEST_DVPT192_GROUP_10_MAC_LEN = 4;
static const uint8_t TEST_DVPT192_GROUP_10_KEY[] = {
0x6a, 0x79, 0x8d, 0x7c, 0x5e, 0x1a, 0x72, 0xb4,
0x3e, 0x20, 0xad, 0x5c, 0x7b, 0x08, 0x56, 0x7b,
0x12, 0xab, 0x74, 0x4b, 0x61, 0xc0, 0x70, 0xe2,
};
static const size_t TEST_DVPT192_GROUP_10_KEY_LEN = 24;
static const uint8_t TEST_DVPT192_150_NONCE[] = {
0x5a, 0x8a, 0xa4, 0x85, 0xc3, 0x16, 0xe9, 0x40,
0x3a, 0xff, 0x85, 0x9f, 0xbb,
};
static const size_t TEST_DVPT192_150_NONCE_LEN = 13;
static const uint8_t TEST_DVPT192_150_ADATA[] = {
0xa1, 0x6a, 0x2e, 0x74, 0x1f, 0x1c, 0xd9, 0x71,
0x72, 0x85, 0xb6, 0xd8, 0x82, 0xc1, 0xfc, 0x53,
0x65, 0x5e, 0x97, 0x73, 0x76, 0x1a, 0xd6, 0x97,
0xa7, 0xee, 0x64, 0x10, 0x18, 0x4c, 0x79, 0x82,
};
static const size_t TEST_DVPT192_150_ADATA_LEN = 32;
static const uint8_t TEST_DVPT192_150_EXPECTED[] = {
0x5e, 0x0e, 0xae, 0xbd,
};
static const size_t TEST_DVPT192_150_EXPECTED_LEN = 4;
static const uint8_t TEST_DVPT192_150_INPUT[] = {
0x00,
};
static const size_t TEST_DVPT192_150_INPUT_LEN = 0;
static const uint8_t TEST_DVPT192_154_NONCE[] = {
0x1e, 0x7e, 0x51, 0xf0, 0xfa, 0x9a, 0x33, 0xed,
0x61, 0x8c, 0x26, 0xf5, 0xe3,
};
static const size_t TEST_DVPT192_154_NONCE_LEN = 13;
static const uint8_t TEST_DVPT192_154_ADATA[] = {
0xda, 0x9b, 0x8f, 0xfb, 0x0f, 0x3c, 0x2a, 0xee,
0x2e, 0x38, 0x6c, 0xc9, 0xf0, 0x35, 0xec, 0x1e,
0xb3, 0xe6, 0x29, 0xbd, 0x15, 0x44, 0xc1, 0x1d,
0xc2, 0x1b, 0xe4, 0xfd, 0x8a, 0xc9, 0x07, 0x4a,
};
static const size_t TEST_DVPT192_154_ADATA_LEN = 32;
static const uint8_t TEST_DVPT192_154_EXPECTED[] = {
0xbf, 0x7a, 0x8e, 0x0c,
};
static const size_t TEST_DVPT192_154_EXPECTED_LEN = 4;
static const uint8_t TEST_DVPT192_154_INPUT[] = {
0x00,
};
static const size_t TEST_DVPT192_154_INPUT_LEN = 0;
static const uint8_t TEST_DVPT192_161_NONCE[] = {
0x78, 0x64, 0xc7, 0x17, 0xec, 0x93, 0xdb, 0x38,
0xb1, 0x06, 0x79, 0xbe, 0x47,
};
static const size_t TEST_DVPT192_161_NONCE_LEN = 13;
static const uint8_t TEST_DVPT192_161_ADATA[] = {
0x67, 0x9a, 0xad, 0x1a, 0xd1, 0xe5, 0x70, 0x29,
0xe3, 0x36, 0x2b, 0x32, 0x55, 0x72, 0xfc, 0x71,
0xca, 0xc5, 0x31, 0x84, 0xb0, 0xf1, 0x54, 0x68,
0x67, 0xe6, 0x65, 0xa4, 0xa5, 0x94, 0x66, 0xc4,
};
static const size_t TEST_DVPT192_161_ADATA_LEN = 32;
static const uint8_t TEST_DVPT192_161_EXPECTED[] = {
0xdf, 0x7f, 0x63, 0xca,
};
static const size_t TEST_DVPT192_161_EXPECTED_LEN = 4;
static const uint8_t TEST_DVPT192_161_INPUT[] = {
0x00,
};
static const size_t TEST_DVPT192_161_INPUT_LEN = 0;
static const uint8_t TEST_DVPT192_162_NONCE[] = {
0xc3, 0xbf, 0x9d, 0xfe, 0x9d, 0x6c, 0x26, 0xf5,
0x43, 0x18, 0x8f, 0xb4, 0x57,
};
static const size_t TEST_DVPT192_162_NONCE_LEN = 13;
static const uint8_t TEST_DVPT192_162_ADATA[] = {
0xe3, 0x01, 0xf6, 0x9a, 0xd3, 0xa7, 0xe0, 0x8a,
0x3d, 0x02, 0x46, 0x2f, 0x0a, 0xa5, 0x84, 0x44,
0x9e, 0xb0, 0x44, 0x9b, 0x0e, 0x3c, 0x50, 0xaa,
0x8d, 0xfa, 0xa4, 0x47, 0x28, 0x16, 0xc8, 0xb0,
};
static const size_t TEST_DVPT192_162_ADATA_LEN = 32;
static const uint8_t TEST_DVPT192_162_EXPECTED[] = {
0xbf, 0x0b, 0x14, 0x45,
};
static const size_t TEST_DVPT192_162_EXPECTED_LEN = 4;
static const uint8_t TEST_DVPT192_162_INPUT[] = {
0x00,
};
static const size_t TEST_DVPT192_162_INPUT_LEN = 0;
static const uint8_t TEST_DVPT192_163_NONCE[] = {
0x15, 0x27, 0x65, 0x7d, 0x2f, 0xd9, 0x8f, 0x7d,
0xec, 0xa5, 0x5c, 0xc6, 0x49,
};
static const size_t TEST_DVPT192_163_NONCE_LEN = 13;
static const uint8_t TEST_DVPT192_163_ADATA[] = {
0xf4, 0xc7, 0x23, 0x43, 0x3b, 0x7c, 0xaf, 0xe3,
0xcd, 0xa9, 0xbb, 0x49, 0x40, 0xa2, 0x1a, 0x89,
0xa8, 0x38, 0x2d, 0x13, 0x01, 0x8b, 0x62, 0x2c,
0xcd, 0x1f, 0xfb, 0x9f, 0xfd, 0x32, 0x11, 0xaf,
};
static const size_t TEST_DVPT192_163_ADATA_LEN = 32;
static const uint8_t TEST_DVPT192_163_EXPECTED[] = {
0xae, 0x85, 0x33, 0xf5,
};
static const size_t TEST_DVPT192_163_EXPECTED_LEN = 4;
static const uint8_t TEST_DVPT192_163_INPUT[] = {
0x00,
};
static const size_t TEST_DVPT192_163_INPUT_LEN = 0;
/* Alen = 32, Plen = 0, Nlen = 13, Tlen = 16 */
static const uint8_t TEST_DVPT192_GROUP_11_MAC_LEN = 16;
static const uint8_t TEST_DVPT192_GROUP_11_KEY[] = {
0xf9, 0xfd, 0xca, 0x4a, 0xc6, 0x4f, 0xe7, 0xf0,
0x14, 0xde, 0x0f, 0x43, 0x03, 0x9c, 0x75, 0x71,
0x94, 0xd5, 0x44, 0xce, 0x5d, 0x15, 0xee, 0xd4,
};
static const size_t TEST_DVPT192_GROUP_11_KEY_LEN = 24;
static const uint8_t TEST_DVPT192_165_NONCE[] = {
0x5a, 0x8a, 0xa4, 0x85, 0xc3, 0x16, 0xe9, 0x40,
0x3a, 0xff, 0x85, 0x9f, 0xbb,
};
static const size_t TEST_DVPT192_165_NONCE_LEN = 13;
static const uint8_t TEST_DVPT192_165_ADATA[] = {
0xa1, 0x6a, 0x2e, 0x74, 0x1f, 0x1c, 0xd9, 0x71,
0x72, 0x85, 0xb6, 0xd8, 0x82, 0xc1, 0xfc, 0x53,
0x65, 0x5e, 0x97, 0x73, 0x76, 0x1a, 0xd6, 0x97,
0xa7, 0xee, 0x64, 0x10, 0x18, 0x4c, 0x79, 0x82,
};
static const size_t TEST_DVPT192_165_ADATA_LEN = 32;
static const uint8_t TEST_DVPT192_165_EXPECTED[] = {
0xd0, 0x7c, 0xcf, 0x9f, 0xdc, 0x3d, 0x33, 0xaa,
0x94, 0xcd, 0xa3, 0xd2, 0x30, 0xda, 0x70, 0x7c,
};
static const size_t TEST_DVPT192_165_EXPECTED_LEN = 16;
static const uint8_t TEST_DVPT192_165_INPUT[] = {
0x00,
};
static const size_t TEST_DVPT192_165_INPUT_LEN = 0;
static const uint8_t TEST_DVPT192_169_NONCE[] = {
0x1e, 0x7e, 0x51, 0xf0, 0xfa, 0x9a, 0x33, 0xed,
0x61, 0x8c, 0x26, 0xf5, 0xe3,
};
static const size_t TEST_DVPT192_169_NONCE_LEN = 13;
static const uint8_t TEST_DVPT192_169_ADATA[] = {
0xda, 0x9b, 0x8f, 0xfb, 0x0f, 0x3c, 0x2a, 0xee,
0x2e, 0x38, 0x6c, 0xc9, 0xf0, 0x35, 0xec, 0x1e,
0xb3, 0xe6, 0x29, 0xbd, 0x15, 0x44, 0xc1, 0x1d,
0xc2, 0x1b, 0xe4, 0xfd, 0x8a, 0xc9, 0x07, 0x4a,
};
static const size_t TEST_DVPT192_169_ADATA_LEN = 32;
static const uint8_t TEST_DVPT192_169_EXPECTED[] = {
0xa9, 0xe8, 0x1a, 0xfd, 0x10, 0x30, 0xd1, 0x95,
0xc6, 0x79, 0xe2, 0xc8, 0x37, 0xae, 0xb7, 0x36,
};
static const size_t TEST_DVPT192_169_EXPECTED_LEN = 16;
static const uint8_t TEST_DVPT192_169_INPUT[] = {
0x00,
};
static const size_t TEST_DVPT192_169_INPUT_LEN = 0;
static const uint8_t TEST_DVPT192_176_NONCE[] = {
0x78, 0x64, 0xc7, 0x17, 0xec, 0x93, 0xdb, 0x38,
0xb1, 0x06, 0x79, 0xbe, 0x47,
};
static const size_t TEST_DVPT192_176_NONCE_LEN = 13;
static const uint8_t TEST_DVPT192_176_ADATA[] = {
0x67, 0x9a, 0xad, 0x1a, 0xd1, 0xe5, 0x70, 0x29,
0xe3, 0x36, 0x2b, 0x32, 0x55, 0x72, 0xfc, 0x71,
0xca, 0xc5, 0x31, 0x84, 0xb0, 0xf1, 0x54, 0x68,
0x67, 0xe6, 0x65, 0xa4, 0xa5, 0x94, 0x66, 0xc4,
};
static const size_t TEST_DVPT192_176_ADATA_LEN = 32;
static const uint8_t TEST_DVPT192_176_EXPECTED[] = {
0xaa, 0xc0, 0x9c, 0xef, 0x96, 0x97, 0x92, 0x73,
0x31, 0x25, 0x1f, 0x02, 0x8d, 0x24, 0xc3, 0x1f,
};
static const size_t TEST_DVPT192_176_EXPECTED_LEN = 16;
static const uint8_t TEST_DVPT192_176_INPUT[] = {
0x00,
};
static const size_t TEST_DVPT192_176_INPUT_LEN = 0;
static const uint8_t TEST_DVPT192_177_NONCE[] = {
0xc3, 0xbf, 0x9d, 0xfe, 0x9d, 0x6c, 0x26, 0xf5,
0x43, 0x18, 0x8f, 0xb4, 0x57,
};
static const size_t TEST_DVPT192_177_NONCE_LEN = 13;
static const uint8_t TEST_DVPT192_177_ADATA[] = {
0xe3, 0x01, 0xf6, 0x9a, 0xd3, 0xa7, 0xe0, 0x8a,
0x3d, 0x02, 0x46, 0x2f, 0x0a, 0xa5, 0x84, 0x44,
0x9e, 0xb0, 0x44, 0x9b, 0x0e, 0x3c, 0x50, 0xaa,
0x8d, 0xfa, 0xa4, 0x47, 0x28, 0x16, 0xc8, 0xb0,
};
static const size_t TEST_DVPT192_177_ADATA_LEN = 32;
static const uint8_t TEST_DVPT192_177_EXPECTED[] = {
0x56, 0xc0, 0x00, 0x70, 0xea, 0xe0, 0xdb, 0x32,
0x98, 0x94, 0xa0, 0x45, 0xd8, 0x66, 0xbb, 0xaf,
};
static const size_t TEST_DVPT192_177_EXPECTED_LEN = 16;
static const uint8_t TEST_DVPT192_177_INPUT[] = {
0x00,
};
static const size_t TEST_DVPT192_177_INPUT_LEN = 0;
static const uint8_t TEST_DVPT192_178_NONCE[] = {
0x15, 0x27, 0x65, 0x7d, 0x2f, 0xd9, 0x8f, 0x7d,
0xec, 0xa5, 0x5c, 0xc6, 0x49,
};
static const size_t TEST_DVPT192_178_NONCE_LEN = 13;
static const uint8_t TEST_DVPT192_178_ADATA[] = {
0xf4, 0xc7, 0x23, 0x43, 0x3b, 0x7c, 0xaf, 0xe3,
0xcd, 0xa9, 0xbb, 0x49, 0x40, 0xa2, 0x1a, 0x89,
0xa8, 0x38, 0x2d, 0x13, 0x01, 0x8b, 0x62, 0x2c,
0xcd, 0x1f, 0xfb, 0x9f, 0xfd, 0x32, 0x11, 0xaf,
};
static const size_t TEST_DVPT192_178_ADATA_LEN = 32;
static const uint8_t TEST_DVPT192_178_EXPECTED[] = {
0x09, 0x00, 0x16, 0xbb, 0x96, 0xae, 0xaa, 0xbb,
0xf6, 0x6f, 0xd3, 0x4f, 0xc9, 0x75, 0x91, 0xa4,
};
static const size_t TEST_DVPT192_178_EXPECTED_LEN = 16;
static const uint8_t TEST_DVPT192_178_INPUT[] = {
0x00,
};
static const size_t TEST_DVPT192_178_INPUT_LEN = 0;
/* Alen = 32, Plen = 24, Nlen = 7, Tlen = 4 */
static const uint8_t TEST_DVPT192_GROUP_12_MAC_LEN = 4;
static const uint8_t TEST_DVPT192_GROUP_12_KEY[] = {
0xf9, 0xfd, 0xca, 0x4a, 0xc6, 0x4f, 0xe7, 0xf0,
0x14, 0xde, 0x0f, 0x43, 0x03, 0x9c, 0x75, 0x71,
0x94, 0xd5, 0x44, 0xce, 0x5d, 0x15, 0xee, 0xd4,
};
static const size_t TEST_DVPT192_GROUP_12_KEY_LEN = 24;
static const uint8_t TEST_DVPT192_180_NONCE[] = {
0x5a, 0x8a, 0xa4, 0x85, 0xc3, 0x16, 0xe9,
};
static const size_t TEST_DVPT192_180_NONCE_LEN = 7;
static const uint8_t TEST_DVPT192_180_ADATA[] = {
0x37, 0x96, 0xcf, 0x51, 0xb8, 0x72, 0x66, 0x52,
0xa4, 0x20, 0x47, 0x33, 0xb8, 0xfb, 0xb0, 0x47,
0xcf, 0x00, 0xfb, 0x91, 0xa9, 0x83, 0x7e, 0x22,
0xec, 0x22, 0xb1, 0xa2, 0x68, 0xf8, 0x8e, 0x2c,
};
static const size_t TEST_DVPT192_180_ADATA_LEN = 32;
static const uint8_t TEST_DVPT192_180_EXPECTED[] = {
0x9f, 0x6c, 0xa4, 0xaf, 0x9b, 0x15, 0x91, 0x48,
0xc8, 0x89, 0xa6, 0x58, 0x4d, 0x11, 0x83, 0xea,
0x26, 0xe2, 0x61, 0x48, 0x74, 0xb0, 0x50, 0x45,
0x75, 0xde, 0xa8, 0xd1,
};
static const size_t TEST_DVPT192_180_EXPECTED_LEN = 28;
static const uint8_t TEST_DVPT192_180_INPUT[] = {
0xa2, 0x65, 0x48, 0x0c, 0xa8, 0x8d, 0x5f, 0x53,
0x6d, 0xb0, 0xdc, 0x6a, 0xbc, 0x40, 0xfa, 0xf0,
0xd0, 0x5b, 0xe7, 0xa9, 0x66, 0x97, 0x77, 0x68,
};
static const size_t TEST_DVPT192_180_INPUT_LEN = 24;
static const uint8_t TEST_DVPT192_184_NONCE[] = {
0xcc, 0xee, 0x19, 0xd0, 0x37, 0xcf, 0x4a,
};
static const size_t TEST_DVPT192_184_NONCE_LEN = 7;
static const uint8_t TEST_DVPT192_184_ADATA[] = {
0xc0, 0x26, 0x69, 0x6e, 0x64, 0x25, 0xe6, 0xc3,
0x3f, 0x45, 0xb4, 0x14, 0x5f, 0xeb, 0xf1, 0x13,
0x7e, 0x7a, 0xc2, 0x63, 0x83, 0xc9, 0xf5, 0xaa,
0x4c, 0xd4, 0xe5, 0xe8, 0xab, 0xb1, 0x9e, 0x07,
};
static const size_t TEST_DVPT192_184_ADATA_LEN = 32;
static const uint8_t TEST_DVPT192_184_EXPECTED[] = {
0xc3, 0x11, 0x6d, 0x90, 0x40, 0xe1, 0xed, 0x4f,
0x7c, 0x94, 0x64, 0xd2, 0x70, 0xfb, 0x30, 0x2b,
0xd3, 0xf1, 0x56, 0x1c, 0x25, 0xc5, 0xb9, 0x5b,
0x8b, 0x4b, 0x53, 0xf6,
};
static const size_t TEST_DVPT192_184_EXPECTED_LEN = 28;
static const uint8_t TEST_DVPT192_184_INPUT[] = {
0x0d, 0xf2, 0x02, 0x43, 0x1e, 0xe7, 0xf2, 0x51,
0xa3, 0x8a, 0xaf, 0x6a, 0xa8, 0xcd, 0x31, 0x37,
0x82, 0xbd, 0x29, 0x3a, 0xf9, 0x11, 0x40, 0x05,
};
static const size_t TEST_DVPT192_184_INPUT_LEN = 24;
static const uint8_t TEST_DVPT192_191_NONCE[] = {
0xa8, 0x40, 0xe9, 0x8d, 0xf7, 0x2a, 0xe9,
};
static const size_t TEST_DVPT192_191_NONCE_LEN = 7;
static const uint8_t TEST_DVPT192_191_ADATA[] = {
0x22, 0xc6, 0x60, 0x77, 0x32, 0xef, 0x1b, 0xdc,
0x7f, 0xcf, 0x61, 0x97, 0xe0, 0x37, 0xcd, 0xad,
0xd7, 0xee, 0x17, 0xc0, 0x08, 0x55, 0x2d, 0xd9,
0xf0, 0x4b, 0x85, 0x64, 0xd3, 0x4f, 0xb1, 0x7c,
};
static const size_t TEST_DVPT192_191_ADATA_LEN = 32;
static const uint8_t TEST_DVPT192_191_EXPECTED[] = {
0x51, 0xb6, 0xb9, 0x28, 0xbd, 0xd1, 0xcc, 0x0b,
0xd0, 0xa0, 0xae, 0xd2, 0xcd, 0xa3, 0x02, 0x47,
0x2d, 0x61, 0x8f, 0xfa, 0xa6, 0x0e, 0x17, 0x90,
0x29, 0xc8, 0x78, 0x55,
};
static const size_t TEST_DVPT192_191_EXPECTED_LEN = 28;
static const uint8_t TEST_DVPT192_191_INPUT[] = {
0xa2, 0xf5, 0x33, 0x85, 0x61, 0x8b, 0x41, 0x30,
0x1f, 0x4e, 0x3e, 0xa4, 0xc5, 0x97, 0xf4, 0x11,
0x10, 0x3d, 0xac, 0x2b, 0x37, 0xab, 0xf5, 0xda,
};
static const size_t TEST_DVPT192_191_INPUT_LEN = 24;
static const uint8_t TEST_DVPT192_192_NONCE[] = {
0x39, 0xd9, 0x3c, 0x3c, 0xf3, 0x1a, 0x6f,
};
static const size_t TEST_DVPT192_192_NONCE_LEN = 7;
static const uint8_t TEST_DVPT192_192_ADATA[] = {
0x93, 0x7d, 0xfa, 0xc5, 0xcd, 0xed, 0x93, 0x84,
0x38, 0xf4, 0xe9, 0x7a, 0xab, 0xd9, 0xbe, 0xb5,
0x0d, 0xba, 0x40, 0xf8, 0x24, 0x19, 0x82, 0x60,
0xa8, 0x97, 0x29, 0x47, 0x9c, 0xfe, 0x68, 0x69,
};
static const size_t TEST_DVPT192_192_ADATA_LEN = 32;
static const uint8_t TEST_DVPT192_192_EXPECTED[] = {
0xd0, 0xab, 0xab, 0x9b, 0x8e, 0x9d, 0x6c, 0x11,
0xbb, 0x9c, 0x15, 0xbe, 0xa8, 0xa4, 0x86, 0x70,
0x4b, 0xed, 0x32, 0xc5, 0x72, 0x97, 0x05, 0x5b,
0x4d, 0xe8, 0xed, 0x8d,
};
static const size_t TEST_DVPT192_192_EXPECTED_LEN = 28;
static const uint8_t TEST_DVPT192_192_INPUT[] = {
0xc1, 0xbd, 0xef, 0x96, 0xdc, 0x86, 0x84, 0x46,
0xbe, 0x48, 0x49, 0x1b, 0x16, 0x05, 0x04, 0x54,
0x6f, 0x2a, 0x40, 0xdd, 0x58, 0x1f, 0x95, 0x82,
};
static const size_t TEST_DVPT192_192_INPUT_LEN = 24;
static const uint8_t TEST_DVPT192_193_NONCE[] = {
0x0b, 0xbc, 0x17, 0x70, 0x19, 0x32, 0x1e,
};
static const size_t TEST_DVPT192_193_NONCE_LEN = 7;
static const uint8_t TEST_DVPT192_193_ADATA[] = {
0xf6, 0xe0, 0x26, 0x78, 0x82, 0x0f, 0x5c, 0xcb,
0xed, 0xe6, 0xcb, 0xde, 0xd0, 0x2d, 0x6d, 0xd5,
0x8d, 0x48, 0x61, 0x66, 0xd7, 0xb1, 0x8e, 0xe9,
0x75, 0xa6, 0x88, 0xaf, 0x42, 0x1f, 0xb7, 0x95,
};
static const size_t TEST_DVPT192_193_ADATA_LEN = 32;
static const uint8_t TEST_DVPT192_193_EXPECTED[] = {
0x92, 0xfd, 0x51, 0x9a, 0x96, 0x6c, 0x0f, 0xbd,
0xd7, 0x08, 0x7f, 0xf5, 0xa1, 0xbd, 0x94, 0x6c,
0xd6, 0x63, 0x50, 0x2d, 0xb3, 0x78, 0x38, 0x35,
0x31, 0xd6, 0x99, 0x47,
};
static const size_t TEST_DVPT192_193_EXPECTED_LEN = 28;
static const uint8_t TEST_DVPT192_193_INPUT[] = {
0x72, 0xa7, 0x09, 0x54, 0xd2, 0x2a, 0xd7, 0x22,
0xfc, 0x32, 0x75, 0x6a, 0xfc, 0xe6, 0x7b, 0x34,
0x4b, 0x2f, 0x3c, 0x55, 0xfe, 0x1d, 0x9e, 0xed,
};
static const size_t TEST_DVPT192_193_INPUT_LEN = 24;
/* Alen = 32, Plen = 24, Nlen = 7, Tlen = 16 */
static const uint8_t TEST_DVPT192_GROUP_13_MAC_LEN = 16;
static const uint8_t TEST_DVPT192_GROUP_13_KEY[] = {
0xa7, 0xaa, 0x63, 0x5e, 0xa5, 0x1b, 0x0b, 0xb2,
0x0a, 0x09, 0x2b, 0xd5, 0x57, 0x3e, 0x72, 0x8c,
0xcd, 0x4b, 0x3e, 0x8c, 0xdd, 0x2a, 0xb3, 0x3d,
};
static const size_t TEST_DVPT192_GROUP_13_KEY_LEN = 24;
static const uint8_t TEST_DVPT192_195_NONCE[] = {
0x5a, 0x8a, 0xa4, 0x85, 0xc3, 0x16, 0xe9,
};
static const size_t TEST_DVPT192_195_NONCE_LEN = 7;
static const uint8_t TEST_DVPT192_195_ADATA[] = {
0x37, 0x96, 0xcf, 0x51, 0xb8, 0x72, 0x66, 0x52,
0xa4, 0x20, 0x47, 0x33, 0xb8, 0xfb, 0xb0, 0x47,
0xcf, 0x00, 0xfb, 0x91, 0xa9, 0x83, 0x7e, 0x22,
0xec, 0x22, 0xb1, 0xa2, 0x68, 0xf8, 0x8e, 0x2c,
};
static const size_t TEST_DVPT192_195_ADATA_LEN = 32;
static const uint8_t TEST_DVPT192_195_EXPECTED[] = {
0x6a, 0xab, 0x64, 0xc4, 0x78, 0x75, 0x99, 0xd8,
0xf2, 0x13, 0x44, 0x6b, 0xea, 0xdb, 0x16, 0xe0,
0x8d, 0xba, 0x60, 0xe9, 0x7f, 0x56, 0xdb, 0xd1,
0x4d, 0x1d, 0x98, 0x0d, 0x6f, 0xe0, 0xfb, 0x44,
0xb4, 0x21, 0x99, 0x26, 0x62, 0xb9, 0x79, 0x75,
};
static const size_t TEST_DVPT192_195_EXPECTED_LEN = 40;
static const uint8_t TEST_DVPT192_195_INPUT[] = {
0xa2, 0x65, 0x48, 0x0c, 0xa8, 0x8d, 0x5f, 0x53,
0x6d, 0xb0, 0xdc, 0x6a, 0xbc, 0x40, 0xfa, 0xf0,
0xd0, 0x5b, 0xe7, 0xa9, 0x66, 0x97, 0x77, 0x68,
};
static const size_t TEST_DVPT192_195_INPUT_LEN = 24;
static const uint8_t TEST_DVPT192_199_NONCE[] = {
0xcc, 0xee, 0x19, 0xd0, 0x37, 0xcf, 0x4a,
};
static const size_t TEST_DVPT192_199_NONCE_LEN = 7;
static const uint8_t TEST_DVPT192_199_ADATA[] = {
0xc0, 0x26, 0x69, 0x6e, 0x64, 0x25, 0xe6, 0xc3,
0x3f, 0x45, 0xb4, 0x14, 0x5f, 0xeb, 0xf1, 0x13,
0x7e, 0x7a, 0xc2, 0x63, 0x83, 0xc9, 0xf5, 0xaa,
0x4c, 0xd4, 0xe5, 0xe8, 0xab, 0xb1, 0x9e, 0x07,
};
static const size_t TEST_DVPT192_199_ADATA_LEN = 32;
static const uint8_t TEST_DVPT192_199_EXPECTED[] = {
0x67, 0xd9, 0x89, 0xea, 0x93, 0x5b, 0x9c, 0xe1,
0x90, 0xe3, 0xa7, 0xf3, 0xb6, 0x45, 0x30, 0x5e,
0x1e, 0x30, 0x8a, 0x7f, 0xe6, 0x17, 0xf8, 0x0f,
0x17, 0x0a, 0x2b, 0x9c, 0x30, 0x9d, 0xe6, 0xc2,
0x32, 0x61, 0x15, 0xa7, 0x6e, 0xfb, 0xdf, 0x98,
};
static const size_t TEST_DVPT192_199_EXPECTED_LEN = 40;
static const uint8_t TEST_DVPT192_199_INPUT[] = {
0x0d, 0xf2, 0x02, 0x43, 0x1e, 0xe7, 0xf2, 0x51,
0xa3, 0x8a, 0xaf, 0x6a, 0xa8, 0xcd, 0x31, 0x37,
0x82, 0xbd, 0x29, 0x3a, 0xf9, 0x11, 0x40, 0x05,
};
static const size_t TEST_DVPT192_199_INPUT_LEN = 24;
static const uint8_t TEST_DVPT192_206_NONCE[] = {
0xa8, 0x40, 0xe9, 0x8d, 0xf7, 0x2a, 0xe9,
};
static const size_t TEST_DVPT192_206_NONCE_LEN = 7;
static const uint8_t TEST_DVPT192_206_ADATA[] = {
0x22, 0xc6, 0x60, 0x77, 0x32, 0xef, 0x1b, 0xdc,
0x7f, 0xcf, 0x61, 0x97, 0xe0, 0x37, 0xcd, 0xad,
0xd7, 0xee, 0x17, 0xc0, 0x08, 0x55, 0x2d, 0xd9,
0xf0, 0x4b, 0x85, 0x64, 0xd3, 0x4f, 0xb1, 0x7c,
};
static const size_t TEST_DVPT192_206_ADATA_LEN = 32;
static const uint8_t TEST_DVPT192_206_EXPECTED[] = {
0x53, 0xbb, 0x60, 0x8f, 0x62, 0x36, 0x79, 0x88,
0x39, 0xaf, 0x35, 0x88, 0x8c, 0xb0, 0xfa, 0x47,
0x97, 0xb5, 0x99, 0x27, 0x10, 0x84, 0xcc, 0x13,
0x84, 0x7b, 0x02, 0x27, 0x33, 0xca, 0x5a, 0x5e,
0x3c, 0x4d, 0x47, 0x23, 0x32, 0x48, 0x4b, 0x7f,
};
static const size_t TEST_DVPT192_206_EXPECTED_LEN = 40;
static const uint8_t TEST_DVPT192_206_INPUT[] = {
0xa2, 0xf5, 0x33, 0x85, 0x61, 0x8b, 0x41, 0x30,
0x1f, 0x4e, 0x3e, 0xa4, 0xc5, 0x97, 0xf4, 0x11,
0x10, 0x3d, 0xac, 0x2b, 0x37, 0xab, 0xf5, 0xda,
};
static const size_t TEST_DVPT192_206_INPUT_LEN = 24;
static const uint8_t TEST_DVPT192_207_NONCE[] = {
0x39, 0xd9, 0x3c, 0x3c, 0xf3, 0x1a, 0x6f,
};
static const size_t TEST_DVPT192_207_NONCE_LEN = 7;
static const uint8_t TEST_DVPT192_207_ADATA[] = {
0x93, 0x7d, 0xfa, 0xc5, 0xcd, 0xed, 0x93, 0x84,
0x38, 0xf4, 0xe9, 0x7a, 0xab, 0xd9, 0xbe, 0xb5,
0x0d, 0xba, 0x40, 0xf8, 0x24, 0x19, 0x82, 0x60,
0xa8, 0x97, 0x29, 0x47, 0x9c, 0xfe, 0x68, 0x69,
};
static const size_t TEST_DVPT192_207_ADATA_LEN = 32;
static const uint8_t TEST_DVPT192_207_EXPECTED[] = {
0xbe, 0x54, 0x55, 0x1d, 0x1d, 0x2f, 0x1b, 0x3e,
0xb6, 0x0f, 0xfe, 0x3b, 0x16, 0x55, 0x24, 0xff,
0x90, 0xca, 0x09, 0xfb, 0x25, 0x2b, 0xf2, 0x1c,
0x1c, 0x79, 0xed, 0xbf, 0x38, 0xc5, 0x0e, 0x0f,
0x24, 0x0a, 0x2d, 0x70, 0xf6, 0x5a, 0xa7, 0x9f,
};
static const size_t TEST_DVPT192_207_EXPECTED_LEN = 40;
static const uint8_t TEST_DVPT192_207_INPUT[] = {
0xc1, 0xbd, 0xef, 0x96, 0xdc, 0x86, 0x84, 0x46,
0xbe, 0x48, 0x49, 0x1b, 0x16, 0x05, 0x04, 0x54,
0x6f, 0x2a, 0x40, 0xdd, 0x58, 0x1f, 0x95, 0x82,
};
static const size_t TEST_DVPT192_207_INPUT_LEN = 24;
static const uint8_t TEST_DVPT192_208_NONCE[] = {
0x0b, 0xbc, 0x17, 0x70, 0x19, 0x32, 0x1e,
};
static const size_t TEST_DVPT192_208_NONCE_LEN = 7;
static const uint8_t TEST_DVPT192_208_ADATA[] = {
0xf6, 0xe0, 0x26, 0x78, 0x82, 0x0f, 0x5c, 0xcb,
0xed, 0xe6, 0xcb, 0xde, 0xd0, 0x2d, 0x6d, 0xd5,
0x8d, 0x48, 0x61, 0x66, 0xd7, 0xb1, 0x8e, 0xe9,
0x75, 0xa6, 0x88, 0xaf, 0x42, 0x1f, 0xb7, 0x95,
};
static const size_t TEST_DVPT192_208_ADATA_LEN = 32;
static const uint8_t TEST_DVPT192_208_EXPECTED[] = {
0xf0, 0x7c, 0x10, 0x72, 0xd8, 0xf8, 0xe0, 0x77,
0xdf, 0xbb, 0x3a, 0xd8, 0x6d, 0xd9, 0x2d, 0x32,
0xb4, 0x1f, 0x29, 0xe6, 0x47, 0xdc, 0xd7, 0xe3,
0xa8, 0x2c, 0xd3, 0xeb, 0xaf, 0x6c, 0x2d, 0x3e,
0x21, 0x74, 0x9b, 0xdf, 0x57, 0x0a, 0xd2, 0x8d,
};
static const size_t TEST_DVPT192_208_EXPECTED_LEN = 40;
static const uint8_t TEST_DVPT192_208_INPUT[] = {
0x72, 0xa7, 0x09, 0x54, 0xd2, 0x2a, 0xd7, 0x22,
0xfc, 0x32, 0x75, 0x6a, 0xfc, 0xe6, 0x7b, 0x34,
0x4b, 0x2f, 0x3c, 0x55, 0xfe, 0x1d, 0x9e, 0xed,
};
static const size_t TEST_DVPT192_208_INPUT_LEN = 24;
/* Alen = 32, Plen = 24, Nlen = 13, Tlen = 4 */
static const uint8_t TEST_DVPT192_GROUP_14_MAC_LEN = 4;
static const uint8_t TEST_DVPT192_GROUP_14_KEY[] = {
0xa7, 0xaa, 0x63, 0x5e, 0xa5, 0x1b, 0x0b, 0xb2,
0x0a, 0x09, 0x2b, 0xd5, 0x57, 0x3e, 0x72, 0x8c,
0xcd, 0x4b, 0x3e, 0x8c, 0xdd, 0x2a, 0xb3, 0x3d,
};
static const size_t TEST_DVPT192_GROUP_14_KEY_LEN = 24;
static const uint8_t TEST_DVPT192_210_NONCE[] = {
0x5a, 0x8a, 0xa4, 0x85, 0xc3, 0x16, 0xe9, 0x40,
0x3a, 0xff, 0x85, 0x9f, 0xbb,
};
static const size_t TEST_DVPT192_210_NONCE_LEN = 13;
static const uint8_t TEST_DVPT192_210_ADATA[] = {
0xa1, 0x6a, 0x2e, 0x74, 0x1f, 0x1c, 0xd9, 0x71,
0x72, 0x85, 0xb6, 0xd8, 0x82, 0xc1, 0xfc, 0x53,
0x65, 0x5e, 0x97, 0x73, 0x76, 0x1a, 0xd6, 0x97,
0xa7, 0xee, 0x64, 0x10, 0x18, 0x4c, 0x79, 0x82,
};
static const size_t TEST_DVPT192_210_ADATA_LEN = 32;
static const uint8_t TEST_DVPT192_210_EXPECTED[] = {
0x16, 0xe5, 0x43, 0xd0, 0xe2, 0x06, 0x15, 0xff,
0x0d, 0xf1, 0x5a, 0xcd, 0x99, 0x27, 0xdd, 0xfe,
0x40, 0x66, 0x8a, 0x54, 0xbb, 0x85, 0x4c, 0xcc,
0xc2, 0x5e, 0x9f, 0xce,
};
static const size_t TEST_DVPT192_210_EXPECTED_LEN = 28;
static const uint8_t TEST_DVPT192_210_INPUT[] = {
0x87, 0x39, 0xb4, 0xbe, 0xa1, 0xa0, 0x99, 0xfe,
0x54, 0x74, 0x99, 0xcb, 0xc6, 0xd1, 0xb1, 0x3d,
0x84, 0x9b, 0x80, 0x84, 0xc9, 0xb6, 0xac, 0xc5,
};
static const size_t TEST_DVPT192_210_INPUT_LEN = 24;
static const uint8_t TEST_DVPT192_214_NONCE[] = {
0xe3, 0xc0, 0x3e, 0xf7, 0xe1, 0xd3, 0x19, 0x61,
0xee, 0x0b, 0x97, 0xbd, 0x99,
};
static const size_t TEST_DVPT192_214_NONCE_LEN = 13;
static const uint8_t TEST_DVPT192_214_ADATA[] = {
0x8a, 0x36, 0x76, 0xdd, 0x64, 0x08, 0x21, 0xb5,
0x8f, 0xb0, 0xf0, 0x32, 0x98, 0x55, 0xfd, 0x58,
0x82, 0xc3, 0x76, 0xea, 0x16, 0x6b, 0x95, 0x8b,
0x7a, 0xaa, 0xd2, 0x23, 0x05, 0x4e, 0x57, 0x84,
};
static const size_t TEST_DVPT192_214_ADATA_LEN = 32;
static const uint8_t TEST_DVPT192_214_EXPECTED[] = {
0x24, 0xe1, 0xd3, 0x82, 0x01, 0x01, 0x41, 0x2d,
0x8f, 0x4d, 0x57, 0x11, 0x8c, 0xab, 0x8f, 0x7e,
0x48, 0x9d, 0x5c, 0xac, 0x78, 0x80, 0x2d, 0xd5,
0xcc, 0xf8, 0xec, 0xf0,
};
static const size_t TEST_DVPT192_214_EXPECTED_LEN = 28;
static const uint8_t TEST_DVPT192_214_INPUT[] = {
0x92, 0x97, 0x3c, 0xe7, 0x07, 0x73, 0x3a, 0x73,
0x11, 0x8c, 0x8c, 0xe6, 0xb5, 0xe3, 0xfc, 0x77,
0xa1, 0x7f, 0x44, 0x83, 0x10, 0xc0, 0x19, 0x7f,
};
static const size_t TEST_DVPT192_214_INPUT_LEN = 24;
static const uint8_t TEST_DVPT192_221_NONCE[] = {
0x93, 0xe0, 0x88, 0x54, 0x56, 0x0e, 0xdb, 0x09,
0x6e, 0x5d, 0x65, 0x40, 0x86,
};
static const size_t TEST_DVPT192_221_NONCE_LEN = 13;
static const uint8_t TEST_DVPT192_221_ADATA[] = {
0xbd, 0xc6, 0x0d, 0xff, 0x08, 0xbf, 0xd5, 0xd4,
0x43, 0x20, 0xb7, 0x5c, 0x61, 0xe4, 0x56, 0xfd,
0x43, 0x33, 0xc9, 0xc3, 0xd0, 0x29, 0x4d, 0x4a,
0x48, 0xd9, 0x36, 0xdf, 0xd5, 0x92, 0x2c, 0xe2,
};
static const size_t TEST_DVPT192_221_ADATA_LEN = 32;
static const uint8_t TEST_DVPT192_221_EXPECTED[] = {
0x0e, 0xf8, 0x98, 0x1d, 0xd3, 0x7c, 0x05, 0x5a,
0x3c, 0x3e, 0x14, 0x78, 0x6f, 0xc6, 0x62, 0xb2,
0xa1, 0x10, 0x65, 0x96, 0x49, 0x11, 0xd3, 0x5e,
0xbc, 0xc8, 0x70, 0x96,
};
static const size_t TEST_DVPT192_221_EXPECTED_LEN = 28;
static const uint8_t TEST_DVPT192_221_INPUT[] = {
0x56, 0x9e, 0x4a, 0xec, 0x88, 0xdd, 0x51, 0xca,
0x51, 0x9c, 0x0a, 0x00, 0xc9, 0x22, 0xee, 0x33,
0xd3, 0x55, 0x9b, 0x98, 0xa3, 0x2d, 0x79, 0x06,
};
static const size_t TEST_DVPT192_221_INPUT_LEN = 24;
static const uint8_t TEST_DVPT192_222_NONCE[] = {
0xe3, 0xf3, 0x7b, 0x68, 0xff, 0x50, 0x8c, 0xfe,
0x29, 0x54, 0x41, 0xd9, 0xe3,
};
static const size_t TEST_DVPT192_222_NONCE_LEN = 13;
static const uint8_t TEST_DVPT192_222_ADATA[] = {
0xb2, 0xb6, 0xc5, 0x78, 0x2e, 0x4f, 0x12, 0x84,
0x67, 0xc5, 0x89, 0xd2, 0xa6, 0xcf, 0x55, 0xef,
0x12, 0x87, 0x7a, 0xdb, 0x77, 0x1b, 0xbb, 0x62,
0x45, 0xc5, 0xbb, 0xa9, 0xdc, 0xfd, 0x62, 0x08,
};
static const size_t TEST_DVPT192_222_ADATA_LEN = 32;
static const uint8_t TEST_DVPT192_222_EXPECTED[] = {
0xfc, 0x18, 0x70, 0xcf, 0xc4, 0x40, 0xf7, 0x4f,
0x73, 0xf4, 0x0e, 0x68, 0x2c, 0xf4, 0x71, 0x3d,
0x02, 0x7c, 0x29, 0x7b, 0x94, 0x26, 0xc3, 0xef,
0xe9, 0x81, 0xe9, 0x35,
};
static const size_t TEST_DVPT192_222_EXPECTED_LEN = 28;
static const uint8_t TEST_DVPT192_222_INPUT[] = {
0x02, 0xb5, 0x51, 0x12, 0x04, 0xbd, 0x55, 0xf7,
0xc3, 0x79, 0x73, 0xe2, 0x6f, 0x6d, 0xf5, 0x88,
0x3c, 0x0a, 0x53, 0x0f, 0x07, 0xc7, 0xf8, 0xc2,
};
static const size_t TEST_DVPT192_222_INPUT_LEN = 24;
static const uint8_t TEST_DVPT192_223_NONCE[] = {
0xea, 0x98, 0xec, 0x44, 0xf5, 0xa8, 0x67, 0x15,
0x01, 0x47, 0x83, 0x17, 0x2e,
};
static const size_t TEST_DVPT192_223_NONCE_LEN = 13;
static const uint8_t TEST_DVPT192_223_ADATA[] = {
0xe4, 0x69, 0x2b, 0x9f, 0x06, 0xb6, 0x66, 0xc7,
0x45, 0x1b, 0x14, 0x6c, 0x8a, 0xeb, 0x07, 0xa6,
0xe3, 0x0c, 0x62, 0x9d, 0x28, 0x06, 0x5c, 0x3d,
0xde, 0x59, 0x40, 0x32, 0x5b, 0x14, 0xb8, 0x10,
};
static const size_t TEST_DVPT192_223_ADATA_LEN = 32;
static const uint8_t TEST_DVPT192_223_EXPECTED[] = {
0x9f, 0xc2, 0xc4, 0x62, 0xdf, 0xf1, 0xba, 0x97,
0x56, 0x77, 0x2d, 0x73, 0xde, 0x5c, 0x4e, 0x82,
0x2b, 0x5e, 0xa0, 0xbc, 0x88, 0x84, 0x5a, 0x32,
0x3b, 0x98, 0xde, 0x4f,
};
static const size_t TEST_DVPT192_223_EXPECTED_LEN = 28;
static const uint8_t TEST_DVPT192_223_INPUT[] = {
0x4d, 0xa4, 0x0b, 0x80, 0x57, 0x9c, 0x1d, 0x9a,
0x53, 0x09, 0xf7, 0xef, 0xec, 0xb7, 0xc0, 0x59,
0xa2, 0xf9, 0x14, 0x51, 0x1c, 0xa5, 0xfc, 0x10,
};
static const size_t TEST_DVPT192_223_INPUT_LEN = 24;
/* Alen = 32, Plen = 24, Nlen = 13, Tlen = 16 */
static const uint8_t TEST_DVPT192_GROUP_15_MAC_LEN = 16;
static const uint8_t TEST_DVPT192_GROUP_15_KEY[] = {
0x26, 0x51, 0x1f, 0xb5, 0x1f, 0xcf, 0xa7, 0x5c,
0xb4, 0xb4, 0x4d, 0xa7, 0x5a, 0x6e, 0x5a, 0x0e,
0xb8, 0xd9, 0xc8, 0xf3, 0xb9, 0x06, 0xf8, 0x86,
};
static const size_t TEST_DVPT192_GROUP_15_KEY_LEN = 24;
static const uint8_t TEST_DVPT192_225_NONCE[] = {
0x5a, 0x8a, 0xa4, 0x85, 0xc3, 0x16, 0xe9, 0x40,
0x3a, 0xff, 0x85, 0x9f, 0xbb,
};
static const size_t TEST_DVPT192_225_NONCE_LEN = 13;
static const uint8_t TEST_DVPT192_225_ADATA[] = {
0xa1, 0x6a, 0x2e, 0x74, 0x1f, 0x1c, 0xd9, 0x71,
0x72, 0x85, 0xb6, 0xd8, 0x82, 0xc1, 0xfc, 0x53,
0x65, 0x5e, 0x97, 0x73, 0x76, 0x1a, 0xd6, 0x97,
0xa7, 0xee, 0x64, 0x10, 0x18, 0x4c, 0x79, 0x82,
};
static const size_t TEST_DVPT192_225_ADATA_LEN = 32;
static const uint8_t TEST_DVPT192_225_EXPECTED[] = {
0xc5, 0xb0, 0xb2, 0xef, 0x17, 0x49, 0x8c, 0x55,
0x70, 0xeb, 0x33, 0x5d, 0xf4, 0x58, 0x80, 0x32,
0x95, 0x8b, 0xa3, 0xd6, 0x9b, 0xf6, 0xf3, 0x17,
0x84, 0x64, 0xa6, 0xf7, 0xfa, 0x2b, 0x76, 0x74,
0x4e, 0x8e, 0x8d, 0x95, 0x69, 0x1c, 0xec, 0xb8,
};
static const size_t TEST_DVPT192_225_EXPECTED_LEN = 40;
static const uint8_t TEST_DVPT192_225_INPUT[] = {
0x87, 0x39, 0xb4, 0xbe, 0xa1, 0xa0, 0x99, 0xfe,
0x54, 0x74, 0x99, 0xcb, 0xc6, 0xd1, 0xb1, 0x3d,
0x84, 0x9b, 0x80, 0x84, 0xc9, 0xb6, 0xac, 0xc5,
};
static const size_t TEST_DVPT192_225_INPUT_LEN = 24;
static const uint8_t TEST_DVPT192_229_NONCE[] = {
0xe3, 0xc0, 0x3e, 0xf7, 0xe1, 0xd3, 0x19, 0x61,
0xee, 0x0b, 0x97, 0xbd, 0x99,
};
static const size_t TEST_DVPT192_229_NONCE_LEN = 13;
static const uint8_t TEST_DVPT192_229_ADATA[] = {
0x8a, 0x36, 0x76, 0xdd, 0x64, 0x08, 0x21, 0xb5,
0x8f, 0xb0, 0xf0, 0x32, 0x98, 0x55, 0xfd, 0x58,
0x82, 0xc3, 0x76, 0xea, 0x16, 0x6b, 0x95, 0x8b,
0x7a, 0xaa, 0xd2, 0x23, 0x05, 0x4e, 0x57, 0x84,
};
static const size_t TEST_DVPT192_229_ADATA_LEN = 32;
static const uint8_t TEST_DVPT192_229_EXPECTED[] = {
0xea, 0xa9, 0x95, 0x94, 0x6e, 0xd9, 0x1d, 0x6a,
0x08, 0xad, 0xe1, 0x4b, 0x26, 0x0a, 0xc7, 0x52,
0xcb, 0xd1, 0x08, 0x1d, 0x5a, 0x7c, 0xad, 0x90,
0x78, 0x36, 0x18, 0x37, 0x4f, 0x6d, 0x03, 0xdf,
0x28, 0xee, 0x57, 0xa1, 0xa5, 0xaa, 0x38, 0xd8,
};
static const size_t TEST_DVPT192_229_EXPECTED_LEN = 40;
static const uint8_t TEST_DVPT192_229_INPUT[] = {
0x92, 0x97, 0x3c, 0xe7, 0x07, 0x73, 0x3a, 0x73,
0x11, 0x8c, 0x8c, 0xe6, 0xb5, 0xe3, 0xfc, 0x77,
0xa1, 0x7f, 0x44, 0x83, 0x10, 0xc0, 0x19, 0x7f,
};
static const size_t TEST_DVPT192_229_INPUT_LEN = 24;
static const uint8_t TEST_DVPT192_236_NONCE[] = {
0x93, 0xe0, 0x88, 0x54, 0x56, 0x0e, 0xdb, 0x09,
0x6e, 0x5d, 0x65, 0x40, 0x86,
};
static const size_t TEST_DVPT192_236_NONCE_LEN = 13;
static const uint8_t TEST_DVPT192_236_ADATA[] = {
0xbd, 0xc6, 0x0d, 0xff, 0x08, 0xbf, 0xd5, 0xd4,
0x43, 0x20, 0xb7, 0x5c, 0x61, 0xe4, 0x56, 0xfd,
0x43, 0x33, 0xc9, 0xc3, 0xd0, 0x29, 0x4d, 0x4a,
0x48, 0xd9, 0x36, 0xdf, 0xd5, 0x92, 0x2c, 0xe2,
};
static const size_t TEST_DVPT192_236_ADATA_LEN = 32;
static const uint8_t TEST_DVPT192_236_EXPECTED[] = {
0xaf, 0x63, 0xf2, 0x7e, 0x2a, 0x9e, 0x70, 0xf1,
0x06, 0x47, 0x74, 0x93, 0xdc, 0x14, 0x1d, 0x16,
0xa1, 0xd0, 0x59, 0xdd, 0x7a, 0x8a, 0x78, 0x10,
0xd9, 0x90, 0xb6, 0x42, 0x03, 0x9f, 0x24, 0x75,
0x57, 0x90, 0x33, 0x2b, 0x3c, 0xc4, 0x7c, 0x49,
};
static const size_t TEST_DVPT192_236_EXPECTED_LEN = 40;
static const uint8_t TEST_DVPT192_236_INPUT[] = {
0x56, 0x9e, 0x4a, 0xec, 0x88, 0xdd, 0x51, 0xca,
0x51, 0x9c, 0x0a, 0x00, 0xc9, 0x22, 0xee, 0x33,
0xd3, 0x55, 0x9b, 0x98, 0xa3, 0x2d, 0x79, 0x06,
};
static const size_t TEST_DVPT192_236_INPUT_LEN = 24;
static const uint8_t TEST_DVPT192_237_NONCE[] = {
0xe3, 0xf3, 0x7b, 0x68, 0xff, 0x50, 0x8c, 0xfe,
0x29, 0x54, 0x41, 0xd9, 0xe3,
};
static const size_t TEST_DVPT192_237_NONCE_LEN = 13;
static const uint8_t TEST_DVPT192_237_ADATA[] = {
0xb2, 0xb6, 0xc5, 0x78, 0x2e, 0x4f, 0x12, 0x84,
0x67, 0xc5, 0x89, 0xd2, 0xa6, 0xcf, 0x55, 0xef,
0x12, 0x87, 0x7a, 0xdb, 0x77, 0x1b, 0xbb, 0x62,
0x45, 0xc5, 0xbb, 0xa9, 0xdc, 0xfd, 0x62, 0x08,
};
static const size_t TEST_DVPT192_237_ADATA_LEN = 32;
static const uint8_t TEST_DVPT192_237_EXPECTED[] = {
0x1d, 0x2a, 0xe8, 0x8c, 0x87, 0x86, 0x84, 0xa0,
0xb4, 0x04, 0x98, 0x62, 0x52, 0xb3, 0xa7, 0x58,
0x3e, 0x1a, 0x5a, 0x51, 0x16, 0x3d, 0xdc, 0x60,
0x6d, 0x39, 0x68, 0xfd, 0xce, 0xaa, 0xe5, 0x13,
0x8c, 0x41, 0x1a, 0x29, 0xd0, 0xd3, 0x33, 0xee,
};
static const size_t TEST_DVPT192_237_EXPECTED_LEN = 40;
static const uint8_t TEST_DVPT192_237_INPUT[] = {
0x02, 0xb5, 0x51, 0x12, 0x04, 0xbd, 0x55, 0xf7,
0xc3, 0x79, 0x73, 0xe2, 0x6f, 0x6d, 0xf5, 0x88,
0x3c, 0x0a, 0x53, 0x0f, 0x07, 0xc7, 0xf8, 0xc2,
};
static const size_t TEST_DVPT192_237_INPUT_LEN = 24;
static const uint8_t TEST_DVPT192_238_NONCE[] = {
0xea, 0x98, 0xec, 0x44, 0xf5, 0xa8, 0x67, 0x15,
0x01, 0x47, 0x83, 0x17, 0x2e,
};
static const size_t TEST_DVPT192_238_NONCE_LEN = 13;
static const uint8_t TEST_DVPT192_238_ADATA[] = {
0xe4, 0x69, 0x2b, 0x9f, 0x06, 0xb6, 0x66, 0xc7,
0x45, 0x1b, 0x14, 0x6c, 0x8a, 0xeb, 0x07, 0xa6,
0xe3, 0x0c, 0x62, 0x9d, 0x28, 0x06, 0x5c, 0x3d,
0xde, 0x59, 0x40, 0x32, 0x5b, 0x14, 0xb8, 0x10,
};
static const size_t TEST_DVPT192_238_ADATA_LEN = 32;
static const uint8_t TEST_DVPT192_238_EXPECTED[] = {
0x30, 0xc1, 0x54, 0xc6, 0x16, 0x94, 0x6e, 0xcc,
0xc2, 0xe2, 0x41, 0xd3, 0x36, 0xad, 0x33, 0x72,
0x09, 0x53, 0xe4, 0x49, 0xa0, 0xe6, 0xb0, 0xf0,
0xdb, 0xf8, 0xe9, 0x46, 0x49, 0x09, 0xbd, 0xf3,
0x37, 0xe4, 0x80, 0x93, 0xc0, 0x82, 0xa1, 0x0b,
};
static const size_t TEST_DVPT192_238_EXPECTED_LEN = 40;
static const uint8_t TEST_DVPT192_238_INPUT[] = {
0x4d, 0xa4, 0x0b, 0x80, 0x57, 0x9c, 0x1d, 0x9a,
0x53, 0x09, 0xf7, 0xef, 0xec, 0xb7, 0xc0, 0x59,
0xa2, 0xf9, 0x14, 0x51, 0x1c, 0xa5, 0xfc, 0x10,
};
static const size_t TEST_DVPT192_238_INPUT_LEN = 24;
/* Share test buffer output */
static uint8_t data[512];
static void test_encrypt_op(const uint8_t *key, uint8_t key_len,
const uint8_t *adata, size_t adata_len,
const uint8_t *nonce, uint8_t nonce_len,
const uint8_t *plain, size_t plain_len,
const uint8_t *output_expected,
size_t output_expected_len,
uint8_t mac_length)
{
cipher_t cipher;
int len, err, cmp;
size_t len_encoding = nonce_and_len_encoding_size - nonce_len;
TEST_ASSERT_MESSAGE(sizeof(data) >= output_expected_len,
"Output buffer too small");
err = cipher_init(&cipher, CIPHER_AES, key, key_len);
TEST_ASSERT_EQUAL_INT(1, err);
len = cipher_encrypt_ccm(&cipher, adata, adata_len,
mac_length, len_encoding,
nonce, nonce_len, plain, plain_len, data);
TEST_ASSERT_MESSAGE(len > 0, "Encryption failed");
TEST_ASSERT_EQUAL_INT(output_expected_len, len);
cmp = compare(output_expected, data, len);
TEST_ASSERT_MESSAGE(1 == cmp, "wrong ciphertext");
}
static void test_decrypt_op(const uint8_t *key, uint8_t key_len,
const uint8_t *adata, size_t adata_len,
const uint8_t *nonce, uint8_t nonce_len,
const uint8_t *encrypted, size_t encrypted_len,
const uint8_t *output_expected,
size_t output_expected_len,
uint8_t mac_length)
{
cipher_t cipher;
int len, err, cmp;
size_t len_encoding = nonce_and_len_encoding_size - nonce_len;
TEST_ASSERT_MESSAGE(sizeof(data) >= output_expected_len,
"Output buffer too small");
err = cipher_init(&cipher, CIPHER_AES, key, key_len);
TEST_ASSERT_EQUAL_INT(1, err);
len = cipher_decrypt_ccm(&cipher, adata, adata_len,
mac_length, len_encoding,
nonce, nonce_len, encrypted, encrypted_len, data);
TEST_ASSERT_MESSAGE(len >= 0, "Decryption failed");
TEST_ASSERT_EQUAL_INT(output_expected_len, len);
cmp = compare(output_expected, data, len);
TEST_ASSERT_MESSAGE(1 == cmp, "wrong ciphertext");
}
#define do_test_encrypt_op(prefix, test_num, group_num) do { \
test_encrypt_op(TEST_ ## prefix ## _GROUP_ ## group_num ## _KEY, \
TEST_ ## prefix ## _GROUP_ ## group_num ## _KEY_LEN, \
TEST_ ## prefix ## _ ## test_num ## _ADATA, \
TEST_ ## prefix ## _ ## test_num ## _ADATA_LEN, \
TEST_ ## prefix ## _ ## test_num ## _NONCE, \
TEST_ ## prefix ## _ ## test_num ## _NONCE_LEN, \
TEST_ ## prefix ## _ ## test_num ## _INPUT, \
TEST_ ## prefix ## _ ## test_num ## _INPUT_LEN, \
TEST_ ## prefix ## _ ## test_num ## _EXPECTED, \
TEST_ ## prefix ## _ ## test_num ## _EXPECTED_LEN, \
TEST_ ## prefix ## _GROUP_ ## group_num ## _MAC_LEN \
); \
} while (0)
#define do_test_decrypt_op(prefix, test_num, group_num) do { \
test_decrypt_op(TEST_ ## prefix ## _GROUP_ ## group_num ## _KEY, \
TEST_ ## prefix ## _GROUP_ ## group_num ## _KEY_LEN, \
TEST_ ## prefix ## _ ## test_num ## _ADATA, \
TEST_ ## prefix ## _ ## test_num ## _ADATA_LEN, \
TEST_ ## prefix ## _ ## test_num ## _NONCE, \
TEST_ ## prefix ## _ ## test_num ## _NONCE_LEN, \
TEST_ ## prefix ## _ ## test_num ## _EXPECTED, \
TEST_ ## prefix ## _ ## test_num ## _EXPECTED_LEN, \
TEST_ ## prefix ## _ ## test_num ## _INPUT, \
TEST_ ## prefix ## _ ## test_num ## _INPUT_LEN, \
TEST_ ## prefix ## _GROUP_ ## group_num ## _MAC_LEN \
); \
} while (0)
static void test_crypto_modes_ccm_decrypt(void)
{
do_test_decrypt_op(DVPT192, 0, 0);
do_test_decrypt_op(DVPT192, 4, 0);
do_test_decrypt_op(DVPT192, 11, 0);
do_test_decrypt_op(DVPT192, 12, 0);
do_test_decrypt_op(DVPT192, 13, 0);
do_test_decrypt_op(DVPT192, 15, 1);
do_test_decrypt_op(DVPT192, 19, 1);
do_test_decrypt_op(DVPT192, 26, 1);
do_test_decrypt_op(DVPT192, 27, 1);
do_test_decrypt_op(DVPT192, 28, 1);
do_test_decrypt_op(DVPT192, 30, 2);
do_test_decrypt_op(DVPT192, 34, 2);
do_test_decrypt_op(DVPT192, 41, 2);
do_test_decrypt_op(DVPT192, 42, 2);
do_test_decrypt_op(DVPT192, 43, 2);
do_test_decrypt_op(DVPT192, 45, 3);
do_test_decrypt_op(DVPT192, 49, 3);
do_test_decrypt_op(DVPT192, 56, 3);
do_test_decrypt_op(DVPT192, 57, 3);
do_test_decrypt_op(DVPT192, 58, 3);
do_test_decrypt_op(DVPT192, 60, 4);
do_test_decrypt_op(DVPT192, 64, 4);
do_test_decrypt_op(DVPT192, 71, 4);
do_test_decrypt_op(DVPT192, 72, 4);
do_test_decrypt_op(DVPT192, 73, 4);
do_test_decrypt_op(DVPT192, 75, 5);
do_test_decrypt_op(DVPT192, 79, 5);
do_test_decrypt_op(DVPT192, 86, 5);
do_test_decrypt_op(DVPT192, 87, 5);
do_test_decrypt_op(DVPT192, 88, 5);
do_test_decrypt_op(DVPT192, 90, 6);
do_test_decrypt_op(DVPT192, 94, 6);
do_test_decrypt_op(DVPT192, 101, 6);
do_test_decrypt_op(DVPT192, 102, 6);
do_test_decrypt_op(DVPT192, 103, 6);
do_test_decrypt_op(DVPT192, 105, 7);
do_test_decrypt_op(DVPT192, 109, 7);
do_test_decrypt_op(DVPT192, 116, 7);
do_test_decrypt_op(DVPT192, 117, 7);
do_test_decrypt_op(DVPT192, 118, 7);
do_test_decrypt_op(DVPT192, 120, 8);
do_test_decrypt_op(DVPT192, 124, 8);
do_test_decrypt_op(DVPT192, 131, 8);
do_test_decrypt_op(DVPT192, 132, 8);
do_test_decrypt_op(DVPT192, 133, 8);
do_test_decrypt_op(DVPT192, 135, 9);
do_test_decrypt_op(DVPT192, 139, 9);
do_test_decrypt_op(DVPT192, 146, 9);
do_test_decrypt_op(DVPT192, 147, 9);
do_test_decrypt_op(DVPT192, 148, 9);
do_test_decrypt_op(DVPT192, 150, 10);
do_test_decrypt_op(DVPT192, 154, 10);
do_test_decrypt_op(DVPT192, 161, 10);
do_test_decrypt_op(DVPT192, 162, 10);
do_test_decrypt_op(DVPT192, 163, 10);
do_test_decrypt_op(DVPT192, 165, 11);
do_test_decrypt_op(DVPT192, 169, 11);
do_test_decrypt_op(DVPT192, 176, 11);
do_test_decrypt_op(DVPT192, 177, 11);
do_test_decrypt_op(DVPT192, 178, 11);
do_test_decrypt_op(DVPT192, 180, 12);
do_test_decrypt_op(DVPT192, 184, 12);
do_test_decrypt_op(DVPT192, 191, 12);
do_test_decrypt_op(DVPT192, 192, 12);
do_test_decrypt_op(DVPT192, 193, 12);
do_test_decrypt_op(DVPT192, 195, 13);
do_test_decrypt_op(DVPT192, 199, 13);
do_test_decrypt_op(DVPT192, 206, 13);
do_test_decrypt_op(DVPT192, 207, 13);
do_test_decrypt_op(DVPT192, 208, 13);
do_test_decrypt_op(DVPT192, 210, 14);
do_test_decrypt_op(DVPT192, 214, 14);
do_test_decrypt_op(DVPT192, 221, 14);
do_test_decrypt_op(DVPT192, 222, 14);
do_test_decrypt_op(DVPT192, 223, 14);
do_test_decrypt_op(DVPT192, 225, 15);
do_test_decrypt_op(DVPT192, 229, 15);
do_test_decrypt_op(DVPT192, 236, 15);
do_test_decrypt_op(DVPT192, 237, 15);
do_test_decrypt_op(DVPT192, 238, 15);
}
static void test_crypto_modes_ccm_encrypt(void)
{
do_test_encrypt_op(DVPT192, 0, 0);
do_test_encrypt_op(DVPT192, 4, 0);
do_test_encrypt_op(DVPT192, 11, 0);
do_test_encrypt_op(DVPT192, 12, 0);
do_test_encrypt_op(DVPT192, 13, 0);
do_test_encrypt_op(DVPT192, 15, 1);
do_test_encrypt_op(DVPT192, 19, 1);
do_test_encrypt_op(DVPT192, 26, 1);
do_test_encrypt_op(DVPT192, 27, 1);
do_test_encrypt_op(DVPT192, 28, 1);
do_test_encrypt_op(DVPT192, 30, 2);
do_test_encrypt_op(DVPT192, 34, 2);
do_test_encrypt_op(DVPT192, 41, 2);
do_test_encrypt_op(DVPT192, 42, 2);
do_test_encrypt_op(DVPT192, 43, 2);
do_test_encrypt_op(DVPT192, 45, 3);
do_test_encrypt_op(DVPT192, 49, 3);
do_test_encrypt_op(DVPT192, 56, 3);
do_test_encrypt_op(DVPT192, 57, 3);
do_test_encrypt_op(DVPT192, 58, 3);
do_test_encrypt_op(DVPT192, 60, 4);
do_test_encrypt_op(DVPT192, 64, 4);
do_test_encrypt_op(DVPT192, 71, 4);
do_test_encrypt_op(DVPT192, 72, 4);
do_test_encrypt_op(DVPT192, 73, 4);
do_test_encrypt_op(DVPT192, 75, 5);
do_test_encrypt_op(DVPT192, 79, 5);
do_test_encrypt_op(DVPT192, 86, 5);
do_test_encrypt_op(DVPT192, 87, 5);
do_test_encrypt_op(DVPT192, 88, 5);
do_test_encrypt_op(DVPT192, 90, 6);
do_test_encrypt_op(DVPT192, 94, 6);
do_test_encrypt_op(DVPT192, 101, 6);
do_test_encrypt_op(DVPT192, 102, 6);
do_test_encrypt_op(DVPT192, 103, 6);
do_test_encrypt_op(DVPT192, 105, 7);
do_test_encrypt_op(DVPT192, 109, 7);
do_test_encrypt_op(DVPT192, 116, 7);
do_test_encrypt_op(DVPT192, 117, 7);
do_test_encrypt_op(DVPT192, 118, 7);
do_test_encrypt_op(DVPT192, 120, 8);
do_test_encrypt_op(DVPT192, 124, 8);
do_test_encrypt_op(DVPT192, 131, 8);
do_test_encrypt_op(DVPT192, 132, 8);
do_test_encrypt_op(DVPT192, 133, 8);
do_test_encrypt_op(DVPT192, 135, 9);
do_test_encrypt_op(DVPT192, 139, 9);
do_test_encrypt_op(DVPT192, 146, 9);
do_test_encrypt_op(DVPT192, 147, 9);
do_test_encrypt_op(DVPT192, 148, 9);
do_test_encrypt_op(DVPT192, 150, 10);
do_test_encrypt_op(DVPT192, 154, 10);
do_test_encrypt_op(DVPT192, 161, 10);
do_test_encrypt_op(DVPT192, 162, 10);
do_test_encrypt_op(DVPT192, 163, 10);
do_test_encrypt_op(DVPT192, 165, 11);
do_test_encrypt_op(DVPT192, 169, 11);
do_test_encrypt_op(DVPT192, 176, 11);
do_test_encrypt_op(DVPT192, 177, 11);
do_test_encrypt_op(DVPT192, 178, 11);
do_test_encrypt_op(DVPT192, 180, 12);
do_test_encrypt_op(DVPT192, 184, 12);
do_test_encrypt_op(DVPT192, 191, 12);
do_test_encrypt_op(DVPT192, 192, 12);
do_test_encrypt_op(DVPT192, 193, 12);
do_test_encrypt_op(DVPT192, 195, 13);
do_test_encrypt_op(DVPT192, 199, 13);
do_test_encrypt_op(DVPT192, 206, 13);
do_test_encrypt_op(DVPT192, 207, 13);
do_test_encrypt_op(DVPT192, 208, 13);
do_test_encrypt_op(DVPT192, 210, 14);
do_test_encrypt_op(DVPT192, 214, 14);
do_test_encrypt_op(DVPT192, 221, 14);
do_test_encrypt_op(DVPT192, 222, 14);
do_test_encrypt_op(DVPT192, 223, 14);
do_test_encrypt_op(DVPT192, 225, 15);
do_test_encrypt_op(DVPT192, 229, 15);
do_test_encrypt_op(DVPT192, 236, 15);
do_test_encrypt_op(DVPT192, 237, 15);
do_test_encrypt_op(DVPT192, 238, 15);
}
Test *tests_crypto_modes_ccm_tests_192(void)
{
EMB_UNIT_TESTFIXTURES(fixtures) {
new_TestFixture(test_crypto_modes_ccm_encrypt),
new_TestFixture(test_crypto_modes_ccm_decrypt),
};
EMB_UNIT_TESTCALLER(crypto_modes_ccm_tests_192, NULL, NULL, fixtures);
return (Test *)&crypto_modes_ccm_tests_192;
}