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

Add kem-API tests and move non kem-API interface related tests out of kem module #39

Merged
merged 3 commits into from
Jan 25, 2023

Conversation

faern
Copy link
Contributor

@faern faern commented Jan 25, 2023

Some tests not related to the kem feature were still placed in the kem_api module. Meaning they would only run if the kem feature was active (which it is not in the CI). So I moved them out to the regular test module and made sure they work. For the tests running on the stack we must run it in a separate thread until we get the stack usage under control.

I also added a test that verifies that the CryptoCiphertextBytesTypenum always corresponds to CRYPTO_CIPHERTEXTBYTES since the CI passed when this was set wrong over in #33. This should help catch such errors.

@faern faern changed the title Move non kem-API interface related tests out of kem module Add kem-API tests and move non kem-API interface related tests out of kem module Jan 25, 2023
This was referenced Jan 25, 2023
@Colfenor
Copy link
Owner

Hi @faern thank you for the clarification and adding these unit tests + refactor.

I read your response at #34 & I agree that CryptoCiphertextBytesTypenum only affects the from_bytes implementation on the EncappedKey. Initially I thought that it affected the key encapsulation methods of kem but this does not seem to be the case.

Copy link
Owner

@Colfenor Colfenor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

src/lib.rs Outdated Show resolved Hide resolved
@Colfenor Colfenor merged commit 28a7c97 into Colfenor:main Jan 25, 2023
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