practical_cryptography_engineering icon indicating copy to clipboard operation
practical_cryptography_engineering copied to clipboard

Question in https://github.dev/tleonhardt/practical_cryptography_engineering/blob/master/aes_gcm.c

Open goutham23 opened this issue 9 months ago • 0 comments

I'm getting the below error code mbedtls_gcm_setkey failed to set the key for AES cipher - returned -0x61 (MBEDTLS_ERR_CIPHER_ALLOC_FAILED)

In my project, I'm calling mbedtls_gcm_setkey, passed initialized gcm context which calls "mbedtls_cipher_setup"

Inside the "mbedtls_cipher_setup " API... if( NULL == ( ctx->cipher_ctx = cipher_info->base->ctx_alloc_func() ) ) return( MBEDTLS_ERR_CIPHER_ALLOC_FAILED );

It fails here, I don't see ctx_alloc_func references in the repo, am i missing something?

goutham23 avatar Sep 25 '23 23:09 goutham23