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

Test the kem interface against KATs #37

Closed
Colfenor opened this issue Jan 8, 2023 · 1 comment · Fixed by #38
Closed

Test the kem interface against KATs #37

Colfenor opened this issue Jan 8, 2023 · 1 comment · Fixed by #38
Assignees

Comments

@Colfenor
Copy link
Owner

Colfenor commented Jan 8, 2023

I guess there should also be some tests that test the kem interface against KATs, since this would have detected the breakage introduced before.

Happy new year ! Thanks a lot for this suggestion @dkales, today I took some time to go through the current katkem tests we have and I was thinking about implementing the tests for the kem interface against KATs.

However first I need some clarification, the existing test_crypto_kem_api uses keypair_boxed() and the kem designated try_encap() and try_decap() functions which would be assumed to break on a byte number mismatch of CryptoCiphertextBytesTypenum != CRYPTO_CIPHERTEXTBYTES

these kem functions are unrelated/separate concerns in comparison to the described heap feature keypair_boxed(), encapsulate_boxed(), decapsulate_boxed() which currently are also not tested so far ?

Concerning implementing the tests for the kem interface against KATs, I was thinking about options:

  • one possibility would be to augment the Testcase struct with separate public key, secret key, ciphertext and sharedsecret bytes for the kem feature, allowing us to run the kem function calls () inside the already existing verify, create_request_file and create_response_file functions without code duplication.

  • the other option would be to run the kem_feature tests separately which, would need basically the same other asserts and file I/O functions as the already existing ones, having some code duplication

If possible I would love to hear some feedback on my initial thoughts :)

@Colfenor Colfenor self-assigned this Jan 8, 2023
@faern
Copy link
Contributor

faern commented Jan 25, 2023

However first I need some clarification, the existing test_crypto_kem_api uses keypair_boxed() and the kem designated try_encap() and try_decap() functions which would be assumed to break on a byte number mismatch of CryptoCiphertextBytesTypenum != CRYPTO_CIPHERTEXTBYTES

Not really true. As you acknowledged in #39 (comment)

It still makes sense to run as many tests as possible via the kem API. but I don't think this needs to block #33 and a release of the round4 algorithms.

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 a pull request may close this issue.

2 participants