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

Hard-coded usage of the system RNG in ffi_pk_op #4411

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

dirkz
Copy link
Contributor

@dirkz dirkz commented Oct 27, 2024

Fixes #4340

Open questions:

  • How best to unify the _with_rng versions with their original ones?

@coveralls
Copy link

Coverage Status

coverage: 91.145% (+0.01%) from 91.135%
when pulling 598a45e on plancksecurity:ffi_rng
into d1ad41e on randombit:master.

@reneme
Copy link
Collaborator

reneme commented Oct 27, 2024

Zooming out a bit: Perhaps this could be answered in the context of #4318. Essentially, for C++ we're experimenting with a new builder-style API to configure the public key operations. For instance:

auto rng = AutoSeeded_RNG{};
auto sk = create_private_key("RSA", rng);

auto signer = sk->signer()
                  .with_rng(rng)
                  .with_padding("PSS")
                  .with_hash("SHA-256")
                  /* ... */
                  .create();

signer.sign(); 

In #4318 there's an open TODO on how to expose this paradigm via the FFI. I don't have a concrete proposal at this point. But perhaps its worth thinking in that direction and finding a usable (generic) design for this before creating many more FFI function with _with_rng().

(Please don't take this as actual opposition to these new functions from my side. I just try to connect some loose ends here.)

@dirkz
Copy link
Contributor Author

dirkz commented Oct 28, 2024

In #4318 there's an open TODO on how to expose this paradigm via the FFI. I don't have a concrete proposal at this point. But perhaps its worth thinking in that direction and finding a usable (generic) design for this before creating many more FFI function with _with_rng().

Thank you very much for the heads up, this is something to consider.

@reneme reneme mentioned this pull request Nov 1, 2024
15 tasks
@reneme
Copy link
Collaborator

reneme commented Nov 1, 2024

Some initial idea: #4318 (comment)
The linked API suggestion is very much a work in progress. Feel free to join the discussion.

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.

Hard-coded usage of the system RNG in ffi_pk_op
3 participants