Skip to content

Conversation

@space88man
Copy link
Contributor

@space88man space88man commented Mar 11, 2022

The only supported value for the source field of OAEP params is 1UL or CKZ_DATA_SPECIFIED.

Some HSMs(Thales Luna) are strict about enforcing this and reject 0UL as an invalid mechanism.

It could be that softhsm2 is more lenient about parsing this parameter.

Addresses #439

Update: indeed softhsm2 does not check this parameter for CKZ_DATA_SPECIFIED during decryption

@space88man space88man force-pushed the fix-oaep branch 2 times, most recently from f4c96fd to f0195de Compare March 11, 2022 16:13
@Jakuje
Copy link
Member

Jakuje commented Mar 14, 2022

I am wondering why this is not caught by the tests that try the OAEP encryption. The softhsm should be checking for this since 2014.

@Jakuje
Copy link
Member

Jakuje commented Mar 14, 2022

I am wondering why this is not caught by the tests that try the OAEP encryption. The softhsm should be checking for this since 2014.

Sigh ... the check is there for encryption, wrapping, unwrapping, but not for decryption ... filled softhsm/SoftHSMv2#671

The only supported value is 1UL CKZ_DATA_SPECIFIED
@mtrojnar mtrojnar merged commit 6ae925d into OpenSC:master Mar 17, 2022
@space88man space88man deleted the fix-oaep branch March 18, 2022 00:47
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.

3 participants