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 support for ML-DSA context #29

Closed

Conversation

johngray-dev
Copy link
Contributor

  • Added support for the ML-DSA Context
  • Updated version to 1.1
  • Added Tests for testing the context in java.
  • Question: If an algorithm that doesn't support a context calls the API with a context, is it expected to fail, or should the context just be ignored by the libOQS library. I think it should fail because it would be operator error, and they should be alerted to the fact that they are trying to call an algorithm with a context that doesn't support a context.

@johngray-dev
Copy link
Contributor Author

johngray-dev commented Dec 10, 2024

When resolved, this closes #27

@SWilson4
Copy link
Member

* Question:  If an algorithm that doesn't support a context calls the API with a context, is it expected to fail, or should the context just be ignored by the libOQS library.   I think it should fail because it would be operator error, and they should be alerted to the fact that they are trying to call an algorithm with a context that doesn't support a context.

liboqs will return an error code unless the provided context / length are NULL / 0. See https://github.com/open-quantum-safe/liboqs/blob/0.12.0/src/sig/mayo/sig_mayo_1.c#L92 for an example.

Copy link
Member

@SWilson4 SWilson4 left a comment

Choose a reason for hiding this comment

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

Thanks for this @johngray-dev! Would you also be able to switch out the tests/examples to use ML-KEM / ML-DSA instead of Kyber / Dilithium? Since this will be a new release, it would be nice for it to work with future versions of liboqs that no longer support the older algorithms.

RELEASE.md Outdated Show resolved Hide resolved
@@ -69,4 +104,12 @@ private static Stream<String> getEnabledSigsAsStream() {
return enabled_sigs.parallelStream();
}

// /**
Copy link
Member

Choose a reason for hiding this comment

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

Is there a reason for this commented code block?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It was added because only ML-DSA can use a context at the moment. I suppose in the future SLH-DSA and others might make use of it, and they would need testing as well.

…st that makes use of the algorithms only makes use algorithms that support the context (ML-DSA at the moment).
Signed-off-by: John Gray <[email protected]>
- Add testing for the context

Signed-off-by: John Gray <[email protected]>
Signed-off-by: John Gray <[email protected]>
…st that makes use of the algorithms only makes use algorithms that support the context (ML-DSA at the moment).

Signed-off-by: John Gray <[email protected]>
 into addContext

Adding --signoff into the previous 4 commits to meet the DCO requirements
@johngray-dev
Copy link
Contributor Author

Fixing up issues in a different branch. Will submit a new pull.

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.

LibOQS-Java will need to support passing in the Context String into the Sign API
3 participants