Home
last modified time | relevance | path

Searched refs:iv (Results 1 – 25 of 30) sorted by relevance

12

/net-tools-latest/mbedtls-2.4.0/tests/suites/
Dtest_suite_ccm.function43 unsigned char iv[14];
53 memset( iv, 0, sizeof( iv ) );
61 TEST_ASSERT( mbedtls_ccm_encrypt_and_tag( &ctx, msg_len, iv, iv_len, add, add_len,
64 decrypt_ret = mbedtls_ccm_auth_decrypt( &ctx, msg_len, iv, iv_len, add, add_len,
85 unsigned char iv[13];
95 memset( iv, 0x00, sizeof( iv ) );
101 iv_len = unhexify( iv, iv_hex );
109 TEST_ASSERT( mbedtls_ccm_encrypt_and_tag( &ctx, msg_len, iv, iv_len, add, add_len,
130 unsigned char iv[13];
142 memset( iv, 0x00, sizeof( iv ) );
[all …]
Dtest_suite_cipher.function101 unsigned char iv[32];
107 memset( iv, 0, sizeof( iv ) );
116 TEST_ASSERT( mbedtls_cipher_set_iv( &ctx, iv, MBEDTLS_MAX_IV_LENGTH + 1 )
120 TEST_ASSERT( mbedtls_cipher_set_iv( &ctx, iv, 0 )
138 unsigned char iv[16];
184 memset( iv , 0x00 + i, sizeof( iv ) );
192 TEST_ASSERT( 0 == mbedtls_cipher_set_iv( &ctx_dec, iv, sizeof( iv ) ) );
193 TEST_ASSERT( 0 == mbedtls_cipher_set_iv( &ctx_enc, iv, sizeof( iv ) ) );
263 unsigned char iv[16];
274 memset( iv , 0, 16 );
[all …]
/net-tools-latest/mbedtls-2.4.0/library/
Dblowfish.c264 unsigned char iv[MBEDTLS_BLOWFISH_BLOCKSIZE], in mbedtls_blowfish_crypt_cbc()
282 output[i] = (unsigned char)( output[i] ^ iv[i] ); in mbedtls_blowfish_crypt_cbc()
284 memcpy( iv, temp, MBEDTLS_BLOWFISH_BLOCKSIZE ); in mbedtls_blowfish_crypt_cbc()
296 output[i] = (unsigned char)( input[i] ^ iv[i] ); in mbedtls_blowfish_crypt_cbc()
299 memcpy( iv, output, MBEDTLS_BLOWFISH_BLOCKSIZE ); in mbedtls_blowfish_crypt_cbc()
319 unsigned char iv[MBEDTLS_BLOWFISH_BLOCKSIZE], in mbedtls_blowfish_crypt_cfb64()
331 mbedtls_blowfish_crypt_ecb( ctx, MBEDTLS_BLOWFISH_ENCRYPT, iv, iv ); in mbedtls_blowfish_crypt_cfb64()
334 *output++ = (unsigned char)( c ^ iv[n] ); in mbedtls_blowfish_crypt_cfb64()
335 iv[n] = (unsigned char) c; in mbedtls_blowfish_crypt_cfb64()
345 mbedtls_blowfish_crypt_ecb( ctx, MBEDTLS_BLOWFISH_ENCRYPT, iv, iv ); in mbedtls_blowfish_crypt_cfb64()
[all …]
Dccm.c138 const unsigned char *iv, size_t iv_len, in ccm_auth_crypt() argument
187 memcpy( b + 1, iv, iv_len ); in ccm_auth_crypt()
245 memcpy( ctr + 1, iv, iv_len ); in ccm_auth_crypt()
308 const unsigned char *iv, size_t iv_len, in mbedtls_ccm_encrypt_and_tag() argument
313 return( ccm_auth_crypt( ctx, CCM_ENCRYPT, length, iv, iv_len, in mbedtls_ccm_encrypt_and_tag()
321 const unsigned char *iv, size_t iv_len, in mbedtls_ccm_auth_decrypt() argument
332 iv, iv_len, add, add_len, in mbedtls_ccm_auth_decrypt()
367 static const unsigned char iv[] = { variable
423 iv, iv_len[i], ad, add_len[i], in mbedtls_ccm_self_test()
437 iv, iv_len[i], ad, add_len[i], in mbedtls_ccm_self_test()
Dcamellia.c561 unsigned char iv[16], in mbedtls_camellia_crypt_cbc()
579 output[i] = (unsigned char)( output[i] ^ iv[i] ); in mbedtls_camellia_crypt_cbc()
581 memcpy( iv, temp, 16 ); in mbedtls_camellia_crypt_cbc()
593 output[i] = (unsigned char)( input[i] ^ iv[i] ); in mbedtls_camellia_crypt_cbc()
596 memcpy( iv, output, 16 ); in mbedtls_camellia_crypt_cbc()
616 unsigned char iv[16], in mbedtls_camellia_crypt_cfb128()
628 mbedtls_camellia_crypt_ecb( ctx, MBEDTLS_CAMELLIA_ENCRYPT, iv, iv ); in mbedtls_camellia_crypt_cfb128()
631 *output++ = (unsigned char)( c ^ iv[n] ); in mbedtls_camellia_crypt_cfb128()
632 iv[n] = (unsigned char) c; in mbedtls_camellia_crypt_cfb128()
642 mbedtls_camellia_crypt_ecb( ctx, MBEDTLS_CAMELLIA_ENCRYPT, iv, iv ); in mbedtls_camellia_crypt_cfb128()
[all …]
Ddes.c666 unsigned char iv[8], in mbedtls_des_crypt_cbc()
681 output[i] = (unsigned char)( input[i] ^ iv[i] ); in mbedtls_des_crypt_cbc()
684 memcpy( iv, output, 8 ); in mbedtls_des_crypt_cbc()
699 output[i] = (unsigned char)( output[i] ^ iv[i] ); in mbedtls_des_crypt_cbc()
701 memcpy( iv, temp, 8 ); in mbedtls_des_crypt_cbc()
765 unsigned char iv[8], in mbedtls_des3_crypt_cbc()
780 output[i] = (unsigned char)( input[i] ^ iv[i] ); in mbedtls_des3_crypt_cbc()
783 memcpy( iv, output, 8 ); in mbedtls_des3_crypt_cbc()
798 output[i] = (unsigned char)( output[i] ^ iv[i] ); in mbedtls_des3_crypt_cbc()
800 memcpy( iv, temp, 8 ); in mbedtls_des3_crypt_cbc()
[all …]
Dcipher.c215 const unsigned char *iv, size_t iv_len ) in mbedtls_cipher_set_iv() argument
219 if( NULL == ctx || NULL == ctx->cipher_info || NULL == iv ) in mbedtls_cipher_set_iv()
237 memcpy( ctx->iv, iv, actual_iv_size ); in mbedtls_cipher_set_iv()
263 ctx->iv, ctx->iv_size, ad, ad_len ); in mbedtls_cipher_update_ad()
351 ctx->operation, block_size, ctx->iv, in mbedtls_cipher_update()
392 ctx->operation, ilen, ctx->iv, input, output ) ) ) in mbedtls_cipher_update()
408 ctx->operation, ilen, &ctx->unprocessed_len, ctx->iv, in mbedtls_cipher_update()
424 ilen, &ctx->unprocessed_len, ctx->iv, in mbedtls_cipher_update()
683 ctx->operation, mbedtls_cipher_get_block_size( ctx ), ctx->iv, in mbedtls_cipher_finish()
813 const unsigned char *iv, size_t iv_len, in mbedtls_cipher_crypt() argument
[all …]
Dpkcs12.c94 unsigned char *iv, size_t ivlen ) in pkcs12_pbe_derive_key_iv() argument
121 if( iv == NULL || ivlen == 0 ) in pkcs12_pbe_derive_key_iv()
124 if( ( ret = mbedtls_pkcs12_derivation( iv, ivlen, unipwd, pwdlen * 2 + 2, in pkcs12_pbe_derive_key_iv()
184 unsigned char iv[16]; in mbedtls_pkcs12_pbe() local
197 iv, cipher_info->iv_size ) ) != 0 ) in mbedtls_pkcs12_pbe()
210 if( ( ret = mbedtls_cipher_set_iv( &cipher_ctx, iv, cipher_info->iv_size ) ) != 0 ) in mbedtls_pkcs12_pbe()
227 mbedtls_zeroize( iv, sizeof( iv ) ); in mbedtls_pkcs12_pbe()
Dxtea.c148 unsigned char iv[8], const unsigned char *input, in mbedtls_xtea_crypt_cbc()
165 output[i] = (unsigned char)( output[i] ^ iv[i] ); in mbedtls_xtea_crypt_cbc()
167 memcpy( iv, temp, 8 ); in mbedtls_xtea_crypt_cbc()
179 output[i] = (unsigned char)( input[i] ^ iv[i] ); in mbedtls_xtea_crypt_cbc()
182 memcpy( iv, output, 8 ); in mbedtls_xtea_crypt_cbc()
Dcipher_wrap.c124 unsigned char *iv, const unsigned char *input, unsigned char *output ) in aes_crypt_cbc_wrap() argument
126 return mbedtls_aes_crypt_cbc( (mbedtls_aes_context *) ctx, operation, length, iv, input, in aes_crypt_cbc_wrap()
133 size_t length, size_t *iv_off, unsigned char *iv, in aes_crypt_cfb128_wrap() argument
136 return mbedtls_aes_crypt_cfb128( (mbedtls_aes_context *) ctx, operation, length, iv_off, iv, in aes_crypt_cfb128_wrap()
479 size_t length, unsigned char *iv, in camellia_crypt_cbc_wrap() argument
482 return mbedtls_camellia_crypt_cbc( (mbedtls_camellia_context *) ctx, operation, length, iv, in camellia_crypt_cbc_wrap()
489 size_t length, size_t *iv_off, unsigned char *iv, in camellia_crypt_cfb128_wrap() argument
493 iv_off, iv, input, output ); in camellia_crypt_cfb128_wrap()
843 unsigned char *iv, const unsigned char *input, unsigned char *output ) in des_crypt_cbc_wrap() argument
845 return mbedtls_des_crypt_cbc( (mbedtls_des_context *) ctx, operation, length, iv, input, in des_crypt_cbc_wrap()
[all …]
Dpadlock.c123 unsigned char iv[16], in mbedtls_padlock_xcryptcbc()
140 memcpy( iw, iv, 16 ); in mbedtls_padlock_xcryptcbc()
163 memcpy( iv, iw, 16 ); in mbedtls_padlock_xcryptcbc()
Dpem.c63 static int pem_get_iv( const unsigned char *s, unsigned char *iv, in pem_get_iv() argument
68 memset( iv, 0, iv_len ); in pem_get_iv()
79 iv[i >> 1] = (unsigned char)( iv[i >> 1] | k ); in pem_get_iv()
86 unsigned char *iv, in pem_pbkdf1() argument
100 mbedtls_md5_update( &md5_ctx, iv, 8 ); in pem_pbkdf1()
120 mbedtls_md5_update( &md5_ctx, iv, 8 ); in pem_pbkdf1()
Dssl_ticket.c296 unsigned char *iv = start + 4; in mbedtls_ssl_ticket_write() local
297 unsigned char *state_len_bytes = iv + 12; in mbedtls_ssl_ticket_write()
326 if( ( ret = ctx->f_rng( ctx->p_rng, iv, 12 ) ) != 0 ) in mbedtls_ssl_ticket_write()
342 iv, 12, key_name, 4 + 12 + 2, in mbedtls_ssl_ticket_write()
392 unsigned char *iv = buf + 4; in mbedtls_ssl_ticket_parse() local
393 unsigned char *enc_len_p = iv + 12; in mbedtls_ssl_ticket_parse()
432 if( ( ret = mbedtls_cipher_auth_decrypt( &key->ctx, iv, 12, in mbedtls_ssl_ticket_parse()
Dgcm.c268 const unsigned char *iv, in mbedtls_gcm_starts() argument
295 memcpy( ctx->y, iv, iv_len ); in mbedtls_gcm_starts()
303 p = iv; in mbedtls_gcm_starts()
444 const unsigned char *iv, in mbedtls_gcm_crypt_and_tag() argument
455 if( ( ret = mbedtls_gcm_starts( ctx, mode, iv, iv_len, add, add_len ) ) != 0 ) in mbedtls_gcm_crypt_and_tag()
469 const unsigned char *iv, in mbedtls_gcm_auth_decrypt() argument
484 iv, iv_len, add, add_len, in mbedtls_gcm_auth_decrypt()
538 static const unsigned char iv[MAX_TESTS][64] = variable
761 iv[iv_index[i]], iv_len[i], in mbedtls_gcm_self_test()
788 iv[iv_index[i]], iv_len[i], in mbedtls_gcm_self_test()
[all …]
Daes.c863 unsigned char iv[16], in mbedtls_aes_crypt_cbc()
876 if( mbedtls_padlock_xcryptcbc( ctx, mode, length, iv, input, output ) == 0 ) in mbedtls_aes_crypt_cbc()
893 output[i] = (unsigned char)( output[i] ^ iv[i] ); in mbedtls_aes_crypt_cbc()
895 memcpy( iv, temp, 16 ); in mbedtls_aes_crypt_cbc()
907 output[i] = (unsigned char)( input[i] ^ iv[i] ); in mbedtls_aes_crypt_cbc()
910 memcpy( iv, output, 16 ); in mbedtls_aes_crypt_cbc()
930 unsigned char iv[16], in mbedtls_aes_crypt_cfb128()
942 mbedtls_aes_crypt_ecb( ctx, MBEDTLS_AES_ENCRYPT, iv, iv ); in mbedtls_aes_crypt_cfb128()
945 *output++ = (unsigned char)( c ^ iv[n] ); in mbedtls_aes_crypt_cfb128()
946 iv[n] = (unsigned char) c; in mbedtls_aes_crypt_cfb128()
[all …]
/net-tools-latest/mbedtls-2.4.0/include/mbedtls/
Dgcm.h105 const unsigned char *iv,
137 const unsigned char *iv,
160 const unsigned char *iv,
Daes.h145 unsigned char iv[16],
180 unsigned char iv[16],
211 unsigned char iv[16],
Dccm.h100 const unsigned char *iv, size_t iv_len,
123 const unsigned char *iv, size_t iv_len,
Dcipher.h242 unsigned char iv[MBEDTLS_MAX_IV_LENGTH]; member
498 const unsigned char *iv, size_t iv_len );
636 const unsigned char *iv, size_t iv_len,
664 const unsigned char *iv, size_t iv_len,
698 const unsigned char *iv, size_t iv_len,
Dcipher_internal.h55 unsigned char *iv, const unsigned char *input,
62 unsigned char *iv, const unsigned char *input,
Dcamellia.h139 unsigned char iv[16],
175 unsigned char iv[16],
Dblowfish.h131 unsigned char iv[MBEDTLS_BLOWFISH_BLOCKSIZE],
162 unsigned char iv[MBEDTLS_BLOWFISH_BLOCKSIZE],
Ddes.h226 unsigned char iv[8],
268 unsigned char iv[8],
/net-tools-latest/mbedtls-2.4.0/tests/scripts/
Dgen_gcm_encrypt.pl60 my $iv = get_val("IV");
68 print(":\"$iv\"");
Dgen_gcm_decrypt.pl75 my $iv = get_val("IV");
85 print(":\"$iv\"");

12