P-521 signature algorithms require the aws_lc_rs feature even for custom SigningKeys

Aperta
#460 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
30/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
rust
Ambito
cryptography

Direzione di ricerca

Start with the #[cfg(feature = "aws_lc_rs")] attributes on the PKCS_ECDSA_P521_SHA256/384/512 statics and the sign_alg field they set, then check how the crate's crypto and aws_lc_rs features interact when default-features = false. The issue offers two fixes (a broader cfg gate, or making sign_alg optional), and the choice needs a maintainer decision first. Done means a build without aws-lc-rs can name a P-521 algorithm from a custom SigningKey, and the existing feature-combination tests still pass.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

PKCS_ECDSA_P521_SHA256, PKCS_ECDSA_P521_SHA384, and PKCS_ECDSA_P521_SHA512 are behind #[cfg(feature = "aws_lc_rs")] (also on main), and SignatureAlgorithm has no public constructor. So a custom SigningKey built with default-features = false (an HSM, a remote signer, or another crypto backend) cannot return a P-521 algorithm from PublicKeyData::algorithm() without compiling aws-lc-rs, even though rcgen never calls aws-lc-rs for that key.

The gate exists for sign_alg, which only rcgen's own KeyPair reads. One option is to gate the statics on any(feature = "aws_lc_rs", not(feature = "crypto")), so they exist whenever no backend that lacks P-521 is compiled in; another is to make sign_alg optional for algorithms the active backend cannot sign with.

Context: rind-rcgen implements SigningKey on a pure-Rust backend that signs P-521, and builds rcgen without crypto.

(Written by Claude Opus 5.5)

Lingua principale
Rust
Stelle
516
Fork
160
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di rustls/rcgen

Tutte le issue di rustls/rcgen

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.