API Gap: KeyPairGenerator
Maintainers usually reply within 2 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- rust
- Domain
- backend-api-design, cryptography
Research direction
Start by reading traits.rs and the existing SignaturePublicKey, SignaturePrivateKey, KEMPublicKey, KEMPrivateKey, RNG, SignatureError, and KEMError definitions. Compare the proposed key-generation traits with the current API and decide whether KEM should remain distinct from broader encryption or agreement terminology. Done means the trait scope and naming are agreed and the relevant key types can use the resulting API.
Written by the indexing model from the issue text.
Description
There's currently nothing in traits.rs for this.
My learned machine colleague suggests a natural fit for the public/private key classes would be:
pub trait SignatureKeyPairGenerator<
PK: SignaturePublicKey<PK_LEN>,
SK: SignaturePrivateKey<SK_LEN>,
const PK_LEN: usize,
const SK_LEN: usize,
>
{
/// Generates a key pair using the library's default OS-backed RNG.
fn keygen() -> Result<(PK, SK), SignatureError>;
/// Generates a key pair using the provided RNG.
fn keygen_from_rng(rng: &mut dyn RNG) -> Result<(PK, SK), SignatureError>;
}
and
pub trait KEMKeyPairGenerator<
PK: KEMPublicKey<PK_LEN>,
SK: KEMPrivateKey<SK_LEN>,
const PK_LEN: usize,
const SK_LEN: usize,
>
{
/// Generates a key pair using the library's default OS-backed RNG.
fn keygen() -> Result<(PK, SK), KEMError>;
/// Generates a key pair using the provided RNG.
fn keygen_from_rng(rng: &mut dyn RNG) -> Result<(PK, SK), KEMError>;
}
These could then be combined with the appropriate types to simplify the notation for invoking one.
It's possible that KEMKeyPairGenerator might be better as EncryptionKeyPairGenerator in-case RSA/OAEP get's added at a later date, XDH might be another candidate for "Encryption" although again, it and Diffie-Hellman might deserve "Agreement".
- Dominant language
- Rust
- Stars
- 25
- Forks
- 18
- Avg merge
- 14d 10h
- Merged PRs (30d)
- 5
Getting set up
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from bcgit/bc-rust
-
Improve docs in FactoriesPossibly taken @pollychen-lab claimed this 10 days ago. Opendocumentation good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
bcgit/bc-rust#161 · 1 reaction ·
Maintainers usually reply within 2 days
-
good first issue refactor
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 2 days
-
Difficulty 4/5 3-5 days Newbie friendliness 42/100
Maintainers usually reply within 2 days
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
bcgit/bc-rust#163 · 4 comments ·
Maintainers usually reply within 2 days
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Maintainers usually reply within 2 days
Similar issues
-
awaiting-response bug needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
wildcard/caro#1562 · 1 comment ·
Maintainers usually reply within 3 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
objectionary/sodg.rs#301 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
HakanSeven12/OpenCADStudio#1706 · 1 comment ·
Maintainers usually reply within 1 day
-
[Bug] Completion info popup (.cm-completionInfo) ignores the configured editor fontPossibly taken A pull request linked to this issue is open or already merged. Openbug user-priority/P2
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
rescript-lang/rescript#8765 ·
Maintainers usually reply within 1 day