Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions wolfssl-gnutls-wrapper/tests/test_fips.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,7 @@ static int test_invalid_aes_gcm(void)

/* Invalid key sizes outside 128, 192, 256 bits */
size_t invalid_key_sizes[] = {8, 20, 64};
/* Invalid tag sizes outside 96, 104, 112, 120, 128 bits */
size_t invalid_tag_sizes[] = {4, 8, 9, 10};
size_t invalid_tag_sizes[] = {4, 9, 10};
/* Invalid IV lengths outside 64-128 bits */
size_t invalid_iv_sizes[] = {17};

Expand Down
9 changes: 6 additions & 3 deletions wolfssl-gnutls-wrapper/tests/test_long_hash.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@ const unsigned char expected_sha256_hmac[] = {
0xd6, 0xb5, 0x99, 0xfa, 0x38, 0x4f, 0xa1, 0x50
};

/* AES-CMAC-128 over 2^32-1 zero bytes (cmac_sz), the wolfSSL CMAC input cap */
const unsigned char expected_aes_cmac_128[] = {
0x41, 0x83, 0x93, 0x5b, 0x5f, 0x82, 0x1c, 0x4f,
0x83, 0xed, 0x73, 0x07, 0x23, 0x28, 0x53, 0xa4,
0x92, 0xc7, 0x0f, 0x38, 0xd0, 0x25, 0xaf, 0xd7,
0x6a, 0x06, 0x86, 0x23, 0x95, 0xc3, 0x26, 0xad,
};
Comment thread
gasbytes marked this conversation as resolved.


Expand Down Expand Up @@ -98,6 +99,8 @@ int main(int argc, char* argv[])
int ret;
unsigned char* buf;
size_t buf_sz = 0x100000000;
/* wolfSSL caps total CMAC input at 2^32-1 bytes per context. */
size_t cmac_sz = 0xffffffff;
unsigned char output[32];

if (argc == 2 && strcmp(argv[1], "-fast") == 0) {
Expand Down Expand Up @@ -127,7 +130,7 @@ int main(int argc, char* argv[])
ret = hmac_long(buf, buf_sz, output);
}
if (ret == 0) {
ret = cmac_long(buf, buf_sz, output);
ret = cmac_long(buf, cmac_sz, output);
}
Comment thread
gasbytes marked this conversation as resolved.
/* Can't do GMAC long unless we implement with GCM streaming. */

Expand Down
Loading