/* SPDX-License-Identifier: Apache-2.0
 * Copyright(c) 2021 Cisco Systems, Inc.
 */

#include <vppinfra/format.h>
#include <vppinfra/test/test.h>
#include <vppinfra/crypto/sha2.h>

typedef struct
{
  const u8 *msg;
  const u8 *key;
  int tc;
  u32 msg_len;
  u32 key_len;
  u8 digest_224[28];
  u8 digest_256[32];
  u8 digest_384[48];
  u8 digest_512[64];
  u8 digest_224_len;
  u8 digest_256_len;
  u8 digest_384_len;
  u8 digest_512_len;
} sha2_test_t;

#ifndef CLIB_MARCH_VARIANT
static const u8 key1[20] = { 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b,
			     0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b,
			     0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b };
static const u8 key2[4] = "Jefe";
static const u8 key3[20] = { 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
			     0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
			     0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa };
static const u8 key4[25] = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
			     0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e,
			     0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15,
			     0x16, 0x17, 0x18, 0x19 };
static const u8 key5[20] = { 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c,
			     0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c,
			     0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c };
static const u8 key6[131] = {
  0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
  0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
  0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
  0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
  0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
  0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
  0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
  0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
  0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
  0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
  0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa
};

static const u8 msg1[8] = "Hi There";
static const u8 msg2[28] = "what do ya want for nothing?";
static const u8 msg3[50] = {
  0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
  0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
  0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
  0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd
};
static const u8 msg4[50] = {
  0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd,
  0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd,
  0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd,
  0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd
};
static const u8 msg6[54] =
  "Test Using Larger Than Block-Size Key - Hash Key First";
static const u8 msg7[153] =
  "This is a test using a larger than block-size key and a larger than "
  "block-size data. The key needs to be hashed before being used by the "
  "HMAC algorithm.";

const sha2_test_t sha2_tests[] = {
  {
    /* RFC4231 Test Case 1 */
    .tc = 1,
    .key = key1,
    .key_len = sizeof (key1),
    .msg = msg1,
    .msg_len = sizeof (msg1),
    .digest_224 = { 0x89, 0x6f, 0xb1, 0x12, 0x8a, 0xbb, 0xdf, 0x19, 0x68, 0x32,
		    0x10, 0x7c, 0xd4, 0x9d, 0xf3, 0x3f, 0x47, 0xb4, 0xb1, 0x16,
		    0x99, 0x12, 0xba, 0x4f, 0x53, 0x68, 0x4b, 0x22 },
    .digest_256 = { 0xb0, 0x34, 0x4c, 0x61, 0xd8, 0xdb, 0x38, 0x53,
		    0x5c, 0xa8, 0xaf, 0xce, 0xaf, 0x0b, 0xf1, 0x2b,
		    0x88, 0x1d, 0xc2, 0x00, 0xc9, 0x83, 0x3d, 0xa7,
		    0x26, 0xe9, 0x37, 0x6c, 0x2e, 0x32, 0xcf, 0xf7 },
    .digest_384 = { 0xaf, 0xd0, 0x39, 0x44, 0xd8, 0x48, 0x95, 0x62, 0x6b, 0x08,
		    0x25, 0xf4, 0xab, 0x46, 0x90, 0x7f, 0x15, 0xf9, 0xda, 0xdb,
		    0xe4, 0x10, 0x1e, 0xc6, 0x82, 0xaa, 0x03, 0x4c, 0x7c, 0xeb,
		    0xc5, 0x9c, 0xfa, 0xea, 0x9e, 0xa9, 0x07, 0x6e, 0xde, 0x7f,
		    0x4a, 0xf1, 0x52, 0xe8, 0xb2, 0xfa, 0x9c, 0xb6 },
    .digest_512 = { 0x87, 0xaa, 0x7c, 0xde, 0xa5, 0xef, 0x61, 0x9d, 0x4f, 0xf0,
		    0xb4, 0x24, 0x1a, 0x1d, 0x6c, 0xb0, 0x23, 0x79, 0xf4, 0xe2,
		    0xce, 0x4e, 0xc2, 0x78, 0x7a, 0xd0, 0xb3, 0x05, 0x45, 0xe1,
		    0x7c, 0xde, 0xda, 0xa8, 0x33, 0xb7, 0xd6, 0xb8, 0xa7, 0x02,
		    0x03, 0x8b, 0x27, 0x4e, 0xae, 0xa3, 0xf4, 0xe4, 0xbe, 0x9d,
		    0x91, 0x4e, 0xeb, 0x61, 0xf1, 0x70, 0x2e, 0x69, 0x6c, 0x20,
		    0x3a, 0x12, 0x68, 0x54 },
  },
  {
    /* RFC4231 Test Case 2 */
    .tc = 2,
    .key = key2,
    .key_len = sizeof (key2),
    .msg = msg2,
    .msg_len = sizeof (msg2),
    .digest_224 = { 0xa3, 0x0e, 0x01, 0x09, 0x8b, 0xc6, 0xdb, 0xbf, 0x45, 0x69,
		    0x0f, 0x3a, 0x7e, 0x9e, 0x6d, 0x0f, 0x8b, 0xbe, 0xa2, 0xa3,
		    0x9e, 0x61, 0x48, 0x00, 0x8f, 0xd0, 0x5e, 0x44 },
    .digest_256 = { 0x5b, 0xdc, 0xc1, 0x46, 0xbf, 0x60, 0x75, 0x4e,
		    0x6a, 0x04, 0x24, 0x26, 0x08, 0x95, 0x75, 0xc7,
		    0x5a, 0x00, 0x3f, 0x08, 0x9d, 0x27, 0x39, 0x83,
		    0x9d, 0xec, 0x58, 0xb9, 0x64, 0xec, 0x38, 0x43 },
    .digest_384 = { 0xaf, 0x45, 0xd2, 0xe3, 0x76, 0x48, 0x40, 0x31, 0x61, 0x7f,
		    0x78, 0xd2, 0xb5, 0x8a, 0x6b, 0x1b, 0x9c, 0x7e, 0xf4, 0x64,
		    0xf5, 0xa0, 0x1b, 0x47, 0xe4, 0x2e, 0xc3, 0x73, 0x63, 0x22,
		    0x44, 0x5e, 0x8e, 0x22, 0x40, 0xca, 0x5e, 0x69, 0xe2, 0xc7,
		    0x8b, 0x32, 0x39, 0xec, 0xfa, 0xb2, 0x16, 0x49 },
    .digest_512 = { 0x16, 0x4b, 0x7a, 0x7b, 0xfc, 0xf8, 0x19, 0xe2, 0xe3, 0x95,
		    0xfb, 0xe7, 0x3b, 0x56, 0xe0, 0xa3, 0x87, 0xbd, 0x64, 0x22,
		    0x2e, 0x83, 0x1f, 0xd6, 0x10, 0x27, 0x0c, 0xd7, 0xea, 0x25,
		    0x05, 0x54, 0x97, 0x58, 0xbf, 0x75, 0xc0, 0x5a, 0x99, 0x4a,
		    0x6d, 0x03, 0x4f, 0x65, 0xf8, 0xf0, 0xe6, 0xfd, 0xca, 0xea,
		    0xb1, 0xa3, 0x4d, 0x4a, 0x6b, 0x4b, 0x63, 0x6e, 0x07, 0x0a,
		    0x38, 0xbc, 0xe7, 0x37 },
  },
  { /* RFC4231 Test Case 3 */
    .tc = 3,
    .key = key3,
    .key_len = sizeof (key3),
    .msg = msg3,
    .msg_len = sizeof (msg3),
    .digest_224 = { 0x7f, 0xb3, 0xcb, 0x35, 0x88, 0xc6, 0xc1, 0xf6, 0xff, 0xa9,
		    0x69, 0x4d, 0x7d, 0x6a, 0xd2, 0x64, 0x93, 0x65, 0xb0, 0xc1,
		    0xf6, 0x5d, 0x69, 0xd1, 0xec, 0x83, 0x33, 0xea },
    .digest_256 = { 0x77, 0x3e, 0xa9, 0x1e, 0x36, 0x80, 0x0e, 0x46,
		    0x85, 0x4d, 0xb8, 0xeb, 0xd0, 0x91, 0x81, 0xa7,
		    0x29, 0x59, 0x09, 0x8b, 0x3e, 0xf8, 0xc1, 0x22,
		    0xd9, 0x63, 0x55, 0x14, 0xce, 0xd5, 0x65, 0xfe },
    .digest_384 = { 0x88, 0x06, 0x26, 0x08, 0xd3, 0xe6, 0xad, 0x8a, 0x0a, 0xa2,
		    0xac, 0xe0, 0x14, 0xc8, 0xa8, 0x6f, 0x0a, 0xa6, 0x35, 0xd9,
		    0x47, 0xac, 0x9f, 0xeb, 0xe8, 0x3e, 0xf4, 0xe5, 0x59, 0x66,
		    0x14, 0x4b, 0x2a, 0x5a, 0xb3, 0x9d, 0xc1, 0x38, 0x14, 0xb9,
		    0x4e, 0x3a, 0xb6, 0xe1, 0x01, 0xa3, 0x4f, 0x27 },
    .digest_512 = { 0xfa, 0x73, 0xb0, 0x08, 0x9d, 0x56, 0xa2, 0x84, 0xef, 0xb0,
		    0xf0, 0x75, 0x6c, 0x89, 0x0b, 0xe9, 0xb1, 0xb5, 0xdb, 0xdd,
		    0x8e, 0xe8, 0x1a, 0x36, 0x55, 0xf8, 0x3e, 0x33, 0xb2, 0x27,
		    0x9d, 0x39, 0xbf, 0x3e, 0x84, 0x82, 0x79, 0xa7, 0x22, 0xc8,
		    0x06, 0xb4, 0x85, 0xa4, 0x7e, 0x67, 0xc8, 0x07, 0xb9, 0x46,
		    0xa3, 0x37, 0xbe, 0xe8, 0x94, 0x26, 0x74, 0x27, 0x88, 0x59,
		    0xe1, 0x32, 0x92, 0xfb } },
  {
    /* RFC4231 Test Case 4 */
    .tc = 4,
    .key = key4,
    .key_len = sizeof (key4),
    .msg = msg4,
    .msg_len = sizeof (msg4),
    .digest_224 = { 0x6c, 0x11, 0x50, 0x68, 0x74, 0x01, 0x3c, 0xac, 0x6a, 0x2a,
		    0xbc, 0x1b, 0xb3, 0x82, 0x62, 0x7c, 0xec, 0x6a, 0x90, 0xd8,
		    0x6e, 0xfc, 0x01, 0x2d, 0xe7, 0xaf, 0xec, 0x5a },
    .digest_256 = { 0x82, 0x55, 0x8a, 0x38, 0x9a, 0x44, 0x3c, 0x0e,
		    0xa4, 0xcc, 0x81, 0x98, 0x99, 0xf2, 0x08, 0x3a,
		    0x85, 0xf0, 0xfa, 0xa3, 0xe5, 0x78, 0xf8, 0x07,
		    0x7a, 0x2e, 0x3f, 0xf4, 0x67, 0x29, 0x66, 0x5b },
    .digest_384 = { 0x3e, 0x8a, 0x69, 0xb7, 0x78, 0x3c, 0x25, 0x85, 0x19, 0x33,
		    0xab, 0x62, 0x90, 0xaf, 0x6c, 0xa7, 0x7a, 0x99, 0x81, 0x48,
		    0x08, 0x50, 0x00, 0x9c, 0xc5, 0x57, 0x7c, 0x6e, 0x1f, 0x57,
		    0x3b, 0x4e, 0x68, 0x01, 0xdd, 0x23, 0xc4, 0xa7, 0xd6, 0x79,
		    0xcc, 0xf8, 0xa3, 0x86, 0xc6, 0x74, 0xcf, 0xfb },
    .digest_512 = { 0xb0, 0xba, 0x46, 0x56, 0x37, 0x45, 0x8c, 0x69, 0x90, 0xe5,
		    0xa8, 0xc5, 0xf6, 0x1d, 0x4a, 0xf7, 0xe5, 0x76, 0xd9, 0x7f,
		    0xf9, 0x4b, 0x87, 0x2d, 0xe7, 0x6f, 0x80, 0x50, 0x36, 0x1e,
		    0xe3, 0xdb, 0xa9, 0x1c, 0xa5, 0xc1, 0x1a, 0xa2, 0x5e, 0xb4,
		    0xd6, 0x79, 0x27, 0x5c, 0xc5, 0x78, 0x80, 0x63, 0xa5, 0xf1,
		    0x97, 0x41, 0x12, 0x0c, 0x4f, 0x2d, 0xe2, 0xad, 0xeb, 0xeb,
		    0x10, 0xa2, 0x98, 0xdd },
  },
  {
    /* RFC4231 Test Case 5 */
    .tc = 5,
    .key = key5,
    .key_len = sizeof (key5),
    .msg = (u8 *) "Test With Truncation",
    .msg_len = 20,
    .digest_224 = { 0x0e, 0x2a, 0xea, 0x68, 0xa9, 0x0c, 0x8d, 0x37, 0xc9, 0x88,
		    0xbc, 0xdb, 0x9f, 0xca, 0x6f, 0xa8 },
    .digest_224_len = 16,
    .digest_256 = { 0xa3, 0xb6, 0x16, 0x74, 0x73, 0x10, 0x0e, 0xe0, 0x6e, 0x0c,
		    0x79, 0x6c, 0x29, 0x55, 0x55, 0x2b },
    .digest_256_len = 16,
    .digest_384 = { 0x3a, 0xbf, 0x34, 0xc3, 0x50, 0x3b, 0x2a, 0x23, 0xa4, 0x6e,
		    0xfc, 0x61, 0x9b, 0xae, 0xf8, 0x97 },
    .digest_384_len = 16,
    .digest_512 = { 0x41, 0x5f, 0xad, 0x62, 0x71, 0x58, 0x0a, 0x53, 0x1d, 0x41,
		    0x79, 0xbc, 0x89, 0x1d, 0x87, 0xa6 },
    .digest_512_len = 16,
  },
  { /* RFC4231 Test Case 6 */
    .tc = 6,
    .key = key6,
    .key_len = sizeof (key6),
    .msg = msg6,
    .msg_len = sizeof (msg6),
    .digest_224 = { 0x95, 0xe9, 0xa0, 0xdb, 0x96, 0x20, 0x95, 0xad, 0xae, 0xbe,
		    0x9b, 0x2d, 0x6f, 0x0d, 0xbc, 0xe2, 0xd4, 0x99, 0xf1, 0x12,
		    0xf2, 0xd2, 0xb7, 0x27, 0x3f, 0xa6, 0x87, 0x0e },
    .digest_256 = { 0x60, 0xe4, 0x31, 0x59, 0x1e, 0xe0, 0xb6, 0x7f,
		    0x0d, 0x8a, 0x26, 0xaa, 0xcb, 0xf5, 0xb7, 0x7f,
		    0x8e, 0x0b, 0xc6, 0x21, 0x37, 0x28, 0xc5, 0x14,
		    0x05, 0x46, 0x04, 0x0f, 0x0e, 0xe3, 0x7f, 0x54 },
    .digest_384 = { 0x4e, 0xce, 0x08, 0x44, 0x85, 0x81, 0x3e, 0x90, 0x88, 0xd2,
		    0xc6, 0x3a, 0x04, 0x1b, 0xc5, 0xb4, 0x4f, 0x9e, 0xf1, 0x01,
		    0x2a, 0x2b, 0x58, 0x8f, 0x3c, 0xd1, 0x1f, 0x05, 0x03, 0x3a,
		    0xc4, 0xc6, 0x0c, 0x2e, 0xf6, 0xab, 0x40, 0x30, 0xfe, 0x82,
		    0x96, 0x24, 0x8d, 0xf1, 0x63, 0xf4, 0x49, 0x52 },
    .digest_512 = { 0x80, 0xb2, 0x42, 0x63, 0xc7, 0xc1, 0xa3, 0xeb, 0xb7, 0x14,
		    0x93, 0xc1, 0xdd, 0x7b, 0xe8, 0xb4, 0x9b, 0x46, 0xd1, 0xf4,
		    0x1b, 0x4a, 0xee, 0xc1, 0x12, 0x1b, 0x01, 0x37, 0x83, 0xf8,
		    0xf3, 0x52, 0x6b, 0x56, 0xd0, 0x37, 0xe0, 0x5f, 0x25, 0x98,
		    0xbd, 0x0f, 0xd2, 0x21, 0x5d, 0x6a, 0x1e, 0x52, 0x95, 0xe6,
		    0x4f, 0x73, 0xf6, 0x3f, 0x0a, 0xec, 0x8b, 0x91, 0x5a, 0x98,
		    0x5d, 0x78, 0x65, 0x98 } },
  {
    /* RFC4231 Test Case 7 */
    .tc = 7,
    .key = key6,
    .key_len = sizeof (key6),
    .msg = msg7,
    .msg_len = sizeof (msg7) - 1,
    .digest_224 = { 0x3a, 0x85, 0x41, 0x66, 0xac, 0x5d, 0x9f, 0x02, 0x3f, 0x54,
		    0xd5, 0x17, 0xd0, 0xb3, 0x9d, 0xbd, 0x94, 0x67, 0x70, 0xdb,
		    0x9c, 0x2b, 0x95, 0xc9, 0xf6, 0xf5, 0x65, 0xd1 },
    .digest_256 = { 0x9b, 0x09, 0xff, 0xa7, 0x1b, 0x94, 0x2f, 0xcb,
		    0x27, 0x63, 0x5f, 0xbc, 0xd5, 0xb0, 0xe9, 0x44,
		    0xbf, 0xdc, 0x63, 0x64, 0x4f, 0x07, 0x13, 0x93,
		    0x8a, 0x7f, 0x51, 0x53, 0x5c, 0x3a, 0x35, 0xe2 },
    .digest_384 = { 0x66, 0x17, 0x17, 0x8e, 0x94, 0x1f, 0x02, 0x0d, 0x35, 0x1e,
		    0x2f, 0x25, 0x4e, 0x8f, 0xd3, 0x2c, 0x60, 0x24, 0x20, 0xfe,
		    0xb0, 0xb8, 0xfb, 0x9a, 0xdc, 0xce, 0xbb, 0x82, 0x46, 0x1e,
		    0x99, 0xc5, 0xa6, 0x78, 0xcc, 0x31, 0xe7, 0x99, 0x17, 0x6d,
		    0x38, 0x60, 0xe6, 0x11, 0x0c, 0x46, 0x52, 0x3e },
    .digest_512 = { 0xe3, 0x7b, 0x6a, 0x77, 0x5d, 0xc8, 0x7d, 0xba, 0xa4, 0xdf,
		    0xa9, 0xf9, 0x6e, 0x5e, 0x3f, 0xfd, 0xde, 0xbd, 0x71, 0xf8,
		    0x86, 0x72, 0x89, 0x86, 0x5d, 0xf5, 0xa3, 0x2d, 0x20, 0xcd,
		    0xc9, 0x44, 0xb6, 0x02, 0x2c, 0xac, 0x3c, 0x49, 0x82, 0xb1,
		    0x0d, 0x5e, 0xeb, 0x55, 0xc3, 0xe4, 0xde, 0x15, 0x13, 0x46,
		    0x76, 0xfb, 0x6d, 0xe0, 0x44, 0x60, 0x65, 0xc9, 0x74, 0x40,
		    0xfa, 0x8c, 0x6a, 0x58 },
  },
  {}
};
#else
extern const sha2_test_t sha2_tests[];
#endif

static clib_error_t *
check_digest (clib_error_t *err, int tc, u8 *calculated, const u8 *expected,
	      u8 len)
{
  if (memcmp (expected, calculated, len) != 0)
    err = clib_error_return (err,
			     "Bad HMAC SHA%u digest for test case "
			     "%u:\nExpected:\n%U\nCalculated:\n%U\n",
			     len * 8, tc, format_hexdump, expected, len,
			     format_hexdump, calculated, len);
  return err;
}

#define _(bits)                                                               \
  static clib_error_t *test_clib_hmac_sha##bits (clib_error_t *err)           \
  {                                                                           \
    u8 digest[64];                                                            \
    const sha2_test_t *t = sha2_tests;                                        \
                                                                              \
    while (t->key)                                                            \
      {                                                                       \
	u8 digest_len = t->digest_##bits##_len;                               \
	if (digest_len == 0)                                                  \
	  digest_len = sizeof (t->digest_##bits);                             \
	clib_memset_u8 (digest, 0xfe, sizeof (digest));                       \
	clib_hmac_sha##bits (t->key, t->key_len, t->msg, t->msg_len, digest); \
	if ((err = check_digest (err, t->tc, digest, t->digest_##bits,        \
				 digest_len)))                                \
	  return err;                                                         \
	t++;                                                                  \
      }                                                                       \
                                                                              \
    return err;                                                               \
  }                                                                           \
                                                                              \
  void __test_perf_fn perftest_sha##bits##_byte (test_perf_t *tp)             \
  {                                                                           \
    volatile uword *np = &tp->n_ops;                                          \
    volatile uword *kl = &tp->arg0;                                           \
    ;                                                                         \
    u8 *key = test_mem_alloc_and_fill_inc_u8 (*kl, 32, 0);                    \
    u8 *data = test_mem_alloc_and_fill_inc_u8 (*np, 0, 0);                    \
    u8 *digest = test_mem_alloc (64);                                         \
                                                                              \
    test_perf_event_enable (tp);                                              \
    clib_hmac_sha##bits (key, *kl, data, *np, digest);                        \
    test_perf_event_disable (tp);                                             \
  }                                                                           \
  REGISTER_TEST (clib_hmac_sha##bits) = {                                     \
    .name = "clib_hmac_sha" #bits,                                            \
    .fn = test_clib_hmac_sha##bits,                                           \
    .perf_tests = PERF_TESTS ({ .name = "byte",                               \
				.n_ops = 16384,                               \
				.arg0 = 20,                                   \
				.fn = perftest_sha##bits##_byte })            \
  }

_ (224);
_ (256);
_ (384);
_ (512);
#undef _
