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

Segmentation fault using AES GCM and SoftHSMv2 #1

Open
jonasholtkamp opened this issue Jul 11, 2019 · 0 comments
Open

Segmentation fault using AES GCM and SoftHSMv2 #1

jonasholtkamp opened this issue Jul 11, 2019 · 0 comments

Comments

@jonasholtkamp
Copy link

We're trying to use this proxy (thanks for the work!) together with SoftHSMv2 and Graphene to encrypt using AES GCM. We started by patching the following files to allow for AES GCM support:

However, that yields a segfault in libsofthsm2.so at this spot. Probably it's the access of CK_GCM_PARAMS_PTR(pMechanism->pParameter)->pIv that's failing here.

Judging from the implementation we're calling C_EncryptInit with the following mechanism parameters:

{ 
  iv: <Buffer 31 32 33 34 35 36 37 38 39 30 31 32>, // that's 123456789012 in UTF-8
  ivBits: 128,
  ivLen: 12,
  aad: <Buffer >,
  aadLen: 0,
  tagBits: 128,
}

Can you/somebody give any advice or help on how we can fix or at least debug this issue?

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