Lines Matching refs:ilen
530 size_t ilen, unsigned char *output, size_t *olen ) in mbedtls_cipher_update() argument
536 CIPHER_VALIDATE_RET( ilen == 0 || input != NULL ); in mbedtls_cipher_update()
561 if( ilen != block_size ) in mbedtls_cipher_update()
564 *olen = ilen; in mbedtls_cipher_update()
578 *olen = ilen; in mbedtls_cipher_update()
579 return( mbedtls_gcm_update( (mbedtls_gcm_context *) ctx->cipher_ctx, ilen, input, in mbedtls_cipher_update()
587 *olen = ilen; in mbedtls_cipher_update()
589 ilen, input, output ) ); in mbedtls_cipher_update()
594 ( ctx->unprocessed_len != 0 || ilen % block_size ) ) in mbedtls_cipher_update()
608 ilen <= block_size - ctx->unprocessed_len ) || in mbedtls_cipher_update()
610 ilen < block_size - ctx->unprocessed_len ) || in mbedtls_cipher_update()
612 ilen < block_size - ctx->unprocessed_len ) ) in mbedtls_cipher_update()
615 ilen ); in mbedtls_cipher_update()
617 ctx->unprocessed_len += ilen; in mbedtls_cipher_update()
643 ilen -= copy_len; in mbedtls_cipher_update()
649 if( 0 != ilen ) in mbedtls_cipher_update()
655 copy_len = ilen % block_size; in mbedtls_cipher_update()
663 memcpy( ctx->unprocessed_data, &( input[ilen - copy_len] ), in mbedtls_cipher_update()
667 ilen -= copy_len; in mbedtls_cipher_update()
673 if( ilen ) in mbedtls_cipher_update()
676 ctx->operation, ilen, ctx->iv, input, output ) ) ) in mbedtls_cipher_update()
681 *olen += ilen; in mbedtls_cipher_update()
692 ctx->operation, ilen, &ctx->unprocessed_len, ctx->iv, in mbedtls_cipher_update()
698 *olen = ilen; in mbedtls_cipher_update()
708 ilen, &ctx->unprocessed_len, ctx->iv, input, output ) ) ) in mbedtls_cipher_update()
713 *olen = ilen; in mbedtls_cipher_update()
723 ilen, &ctx->unprocessed_len, ctx->iv, in mbedtls_cipher_update()
729 *olen = ilen; in mbedtls_cipher_update()
744 ctx->operation, ilen, ctx->iv, input, output ); in mbedtls_cipher_update()
750 *olen = ilen; in mbedtls_cipher_update()
760 ilen, input, output ) ) ) in mbedtls_cipher_update()
765 *olen = ilen; in mbedtls_cipher_update()
1240 const unsigned char *input, size_t ilen, in mbedtls_cipher_crypt() argument
1248 CIPHER_VALIDATE_RET( ilen == 0 || input != NULL ); in mbedtls_cipher_crypt()
1297 input, ilen, in mbedtls_cipher_crypt()
1298 output, ilen, olen ); in mbedtls_cipher_crypt()
1303 output + *olen, ilen - *olen, in mbedtls_cipher_crypt()
1319 if( ( ret = mbedtls_cipher_update( ctx, input, ilen, in mbedtls_cipher_crypt()
1340 const unsigned char *input, size_t ilen, in mbedtls_cipher_aead_encrypt() argument
1359 if( output == NULL || tag != output + ilen ) in mbedtls_cipher_aead_encrypt()
1366 input, ilen, in mbedtls_cipher_aead_encrypt()
1367 output, ilen + tag_len, olen ); in mbedtls_cipher_aead_encrypt()
1379 *olen = ilen; in mbedtls_cipher_aead_encrypt()
1381 ilen, iv, iv_len, ad, ad_len, in mbedtls_cipher_aead_encrypt()
1388 *olen = ilen; in mbedtls_cipher_aead_encrypt()
1389 return( mbedtls_ccm_encrypt_and_tag( ctx->cipher_ctx, ilen, in mbedtls_cipher_aead_encrypt()
1404 *olen = ilen; in mbedtls_cipher_aead_encrypt()
1406 ilen, iv, ad, ad_len, input, output, tag ) ); in mbedtls_cipher_aead_encrypt()
1420 const unsigned char *input, size_t ilen, in mbedtls_cipher_aead_decrypt() argument
1439 if( input == NULL || tag != input + ilen ) in mbedtls_cipher_aead_decrypt()
1446 input, ilen + tag_len, in mbedtls_cipher_aead_decrypt()
1447 output, ilen, olen ); in mbedtls_cipher_aead_decrypt()
1462 *olen = ilen; in mbedtls_cipher_aead_decrypt()
1463 ret = mbedtls_gcm_auth_decrypt( ctx->cipher_ctx, ilen, in mbedtls_cipher_aead_decrypt()
1478 *olen = ilen; in mbedtls_cipher_aead_decrypt()
1479 ret = mbedtls_ccm_auth_decrypt( ctx->cipher_ctx, ilen, in mbedtls_cipher_aead_decrypt()
1501 *olen = ilen; in mbedtls_cipher_aead_decrypt()
1502 ret = mbedtls_chachapoly_auth_decrypt( ctx->cipher_ctx, ilen, in mbedtls_cipher_aead_decrypt()
1522 const unsigned char *input, size_t ilen, in mbedtls_cipher_auth_encrypt() argument
1529 CIPHER_VALIDATE_RET( ilen == 0 || input != NULL ); in mbedtls_cipher_auth_encrypt()
1530 CIPHER_VALIDATE_RET( ilen == 0 || output != NULL ); in mbedtls_cipher_auth_encrypt()
1535 input, ilen, output, olen, in mbedtls_cipher_auth_encrypt()
1545 const unsigned char *input, size_t ilen, in mbedtls_cipher_auth_decrypt() argument
1552 CIPHER_VALIDATE_RET( ilen == 0 || input != NULL ); in mbedtls_cipher_auth_decrypt()
1553 CIPHER_VALIDATE_RET( ilen == 0 || output != NULL ); in mbedtls_cipher_auth_decrypt()
1558 input, ilen, output, olen, in mbedtls_cipher_auth_decrypt()
1571 const unsigned char *input, size_t ilen, in mbedtls_cipher_auth_encrypt_ext() argument
1578 CIPHER_VALIDATE_RET( ilen == 0 || input != NULL ); in mbedtls_cipher_auth_encrypt_ext()
1601 return( mbedtls_nist_kw_wrap( ctx->cipher_ctx, mode, input, ilen, in mbedtls_cipher_auth_encrypt_ext()
1608 if( output_len < ilen + tag_len ) in mbedtls_cipher_auth_encrypt_ext()
1612 input, ilen, output, olen, in mbedtls_cipher_auth_encrypt_ext()
1613 output + ilen, tag_len ); in mbedtls_cipher_auth_encrypt_ext()
1627 const unsigned char *input, size_t ilen, in mbedtls_cipher_auth_decrypt_ext() argument
1634 CIPHER_VALIDATE_RET( ilen == 0 || input != NULL ); in mbedtls_cipher_auth_decrypt_ext()
1657 return( mbedtls_nist_kw_unwrap( ctx->cipher_ctx, mode, input, ilen, in mbedtls_cipher_auth_decrypt_ext()
1664 if( ilen < tag_len || output_len < ilen - tag_len ) in mbedtls_cipher_auth_decrypt_ext()
1668 input, ilen - tag_len, output, olen, in mbedtls_cipher_auth_decrypt_ext()
1669 input + ilen - tag_len, tag_len ) ); in mbedtls_cipher_auth_decrypt_ext()