mirror of
https://github.com/yuzu-emu/mbedtls
synced 2024-11-24 19:38:21 +00:00
Use tighter buffers in CCM test suite
This commit is contained in:
parent
87df5ba0a1
commit
e8b8d01782
1 changed files with 12 additions and 12 deletions
|
@ -74,12 +74,12 @@ void ccm_encrypt_and_tag( int cipher_id,
|
||||||
char *iv_hex, char *add_hex,
|
char *iv_hex, char *add_hex,
|
||||||
char *result_hex )
|
char *result_hex )
|
||||||
{
|
{
|
||||||
unsigned char key[128];
|
unsigned char key[32];
|
||||||
unsigned char msg[128];
|
unsigned char msg[50];
|
||||||
unsigned char iv[128];
|
unsigned char iv[13];
|
||||||
unsigned char add[128];
|
unsigned char add[32];
|
||||||
unsigned char output[144];
|
unsigned char output[50];
|
||||||
unsigned char result[144];
|
unsigned char result[50];
|
||||||
ccm_context ctx;
|
ccm_context ctx;
|
||||||
size_t key_len, msg_len, iv_len, add_len, tag_len, result_len;
|
size_t key_len, msg_len, iv_len, add_len, tag_len, result_len;
|
||||||
|
|
||||||
|
@ -117,12 +117,12 @@ void ccm_auth_decrypt( int cipher_id,
|
||||||
char *iv_hex, char *add_hex,
|
char *iv_hex, char *add_hex,
|
||||||
int tag_len, char *result_hex )
|
int tag_len, char *result_hex )
|
||||||
{
|
{
|
||||||
unsigned char key[128];
|
unsigned char key[32];
|
||||||
unsigned char msg[128];
|
unsigned char msg[50];
|
||||||
unsigned char iv[128];
|
unsigned char iv[13];
|
||||||
unsigned char add[128];
|
unsigned char add[32];
|
||||||
unsigned char output[144];
|
unsigned char output[50];
|
||||||
unsigned char result[144];
|
unsigned char result[50];
|
||||||
ccm_context ctx;
|
ccm_context ctx;
|
||||||
size_t key_len, msg_len, iv_len, add_len, result_len;
|
size_t key_len, msg_len, iv_len, add_len, result_len;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
Loading…
Reference in a new issue