Skip to content

pkey_ctx: add ability to generate DSA params & keys #2432

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

Merged
merged 5 commits into from
Aug 4, 2025

Conversation

huwcbjones
Copy link
Contributor

@huwcbjones huwcbjones commented Jul 30, 2025

Progress towards #2047 by adding ability to generate DSA params using the EVP_* interfaces (rather than the deprecated DSA_* interfaces, excluding boring because they removed support for DSA in PKEY_CTX).

  • sys/evp: add EVP_PKEY_paramgen & init
  • pkey_ctx: add paramgen & init
  • sys/dsa: add EVP_PKEY_CTX_set_dsa_paramgen_bits
  • pkey_ctx: add set dsa paramgen bits
  • pkey_ctx: add dsa params generation test

@huwcbjones huwcbjones force-pushed the huw/pkey-ctx-dsa-paramgen branch 2 times, most recently from 91c42c5 to 7b510d7 Compare July 30, 2025 15:02
@huwcbjones huwcbjones force-pushed the huw/pkey-ctx-dsa-paramgen branch 2 times, most recently from c97df0f to d9fa658 Compare July 30, 2025 16:08
@huwcbjones huwcbjones marked this pull request as ready for review July 30, 2025 16:09
@alex
Copy link
Collaborator

alex commented Aug 4, 2025

Can you please add an assert to the test about the result of paramgen?

@huwcbjones huwcbjones changed the title pkey_ctx: add ability to generate DSA params pkey_ctx: add ability to generate DSA params & keys Aug 4, 2025
@huwcbjones
Copy link
Contributor Author

@alex , have extended the test to use the params to generate a key.
Is that enough, or is there something more you're looking for?

@huwcbjones huwcbjones force-pushed the huw/pkey-ctx-dsa-paramgen branch from 2a303a1 to 3589cbd Compare August 4, 2025 14:37
@alex
Copy link
Collaborator

alex commented Aug 4, 2025

looks like there's some failing tests

@huwcbjones huwcbjones force-pushed the huw/pkey-ctx-dsa-paramgen branch 2 times, most recently from b7e21ad to 9a63861 Compare August 4, 2025 15:09
boring doesn't support DSA paramgen in a pkey ctx since
google/boringssl@2e295b9
@huwcbjones huwcbjones force-pushed the huw/pkey-ctx-dsa-paramgen branch from 9a63861 to 17fe4c8 Compare August 4, 2025 15:13
@alex alex merged commit 93f9e02 into sfackler:master Aug 4, 2025
85 checks passed
@botovq
Copy link
Contributor

botovq commented Aug 5, 2025

It would be nice if DSA support in rust-openssl honored OPENSSL_NO_DSA so it can be turned off in libcrypto some time in the future. This is really not a primitive that should be used anymore if you can help it.

@alex
Copy link
Collaborator

alex commented Aug 5, 2025 via email

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