Skip to content

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

Description

@goutham23

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions