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

Precise capture of parameter sets in BouncyCastle #149

Open
hugoqnc opened this issue Sep 19, 2024 · 0 comments
Open

Precise capture of parameter sets in BouncyCastle #149

hugoqnc opened this issue Sep 19, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@hugoqnc
Copy link
Member

hugoqnc commented Sep 19, 2024

Some BouncyCastle rules do not capture all available information, in particular static fields defining the parameter sets of certain algorithms. This would for example distinguish the use of kyber512, kyber768 or kyber1024.
Capturing this information is not very difficult but it is a long task given how many classes are used for this in BouncyCastle.

Encapsulated Secrets

Check BcEncapsulatedSecretExtractor and BcEncapsulatedSecretGenerator: for most KEM classes, we only capture them withAnyParameters().
This should be changed to capture the precise content of each constructor.
Most of them have for argument a class of AsymmetricKeyParameter (46 different classes to detect).
These classes do not contain the information directly, instead they usually have a CipherParameters argument. Some of them are already supported, but for these KEM classes, we need support for the classes in the subinterface KEMParameters (9 classes to detect).

Digests

We have a similar scenario with BcDigests, where we could be more precise for some constructor if we add detection rules for additional parameter classes.
For example for Ascon, we should add support for AsconParameters.

@hugoqnc hugoqnc added the enhancement New feature or request label Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant