mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2025-12-24 00:06:32 +01:00
cipher: add chachapoly test vector + unauth case
This commit is contained in:
parent
1465602ee1
commit
69767d1c7b
2 changed files with 11 additions and 3 deletions
|
|
@ -560,14 +560,14 @@ void auth_crypt_tv( int cipher_id, char *hex_key, char *hex_iv,
|
|||
int ret;
|
||||
unsigned char key[50];
|
||||
unsigned char iv[50];
|
||||
unsigned char cipher[200];
|
||||
unsigned char clear[200];
|
||||
unsigned char cipher[265]; /* max size of test data so far */
|
||||
unsigned char clear[265];
|
||||
unsigned char output[267]; /* above + 2 (overwrite check) */
|
||||
unsigned char ad[200];
|
||||
unsigned char tag[20];
|
||||
unsigned char my_tag[20];
|
||||
size_t key_len, iv_len, cipher_len, clear_len, ad_len, tag_len;
|
||||
mbedtls_cipher_context_t ctx;
|
||||
unsigned char output[200];
|
||||
size_t outlen;
|
||||
|
||||
mbedtls_cipher_init( &ctx );
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue