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

WiP: add support for ECDH key derivation #91

Closed
wants to merge 1 commit into from

Conversation

mskalski
Copy link

@mskalski mskalski commented Nov 9, 2021

Add support for CKM_ECDH1_DERIVE mechanism - add definitions of required
structures and implemented C_DeriveKey() function.

Works well with IDPrime card.

Note: All DH mechanisms shall be aded (not only ECDH1)

Add support for CKM_ECDH1_DERIVE mechanism - add definitions of required
structures, And `C_DeriveKey()` function support

Note: All DH mechanisms shall be aded (not only ECDH1)
@mskalski
Copy link
Author

mskalski commented Nov 9, 2021

Needs some further testing - RSAOAEP fails on appveyor (because of void * mapping in swig)

@mskalski mskalski changed the title add support for ECDH key derivation WiP: add support for ECDH key derivation Nov 9, 2021
@LudovicRousseau
Copy link
Owner

From the Linux build & test I see:

test_RSA_OAEP (test_asymetric.TestUtil) ... make: *** [Makefile:45: tests] Segmentation fault (core dumped)
Error: Process completed with exit code 2.

@mskalski
Copy link
Author

mskalski commented Nov 9, 2021

Yes, it's because I changed mapping for void * to match assignment from ckbytelist to fields of CK_ECDH1_DERIVE_PARAMS. Definitely it needs some more changes.

But I didn't notice MR #72. Maybe consider joining them?

@LudovicRousseau
Copy link
Owner

Feel free to reuse code or inspiration from PR #72
This PR does not need to change the void * mapping. So it is better for me.

What would be really nice is to have code in test/ to test this new feature using SoftHSM.

@LudovicRousseau
Copy link
Owner

I guess this feature is now fixed with c6580f4

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

Successfully merging this pull request may close these issues.

2 participants