Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
goutham23 opened this issue Sep 25, 2023 · 0 comments

Comments

@goutham23
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant