frodo-kem: Use seeds instead of expanded private/decapsulation keys

Aperta
#432 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

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

Direzione di ricerca

Start with frodo-kem/src/kem.rs, especially the key-generation path around line 116, then inspect the KeyInit and KeyExport implementations for DecapsulationKey and the KemSizes trait. Compare the seed-oriented behavior of ml-kem and determine how parameter-specific seed sizes should be represented. The work is done when seed-based initialization and export are defined, the existing expanded-key path is deprecated or handled deliberately, and serialized key-format implications are resolved.

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

Descrizione

frodo-kem currently requires the hazmat feature to work with seeds, and by default only generates, loads, and saves the expanded private key. By contrast, ml-kem primarily loads and saves the seed rather than the expanded key.

Would you be open to a PR for some of this that brings frodo-kem closer to ml-kem's design; or do you recommend advanced users stick to the hazmat-gated K::default().generate_keypair_from_seed(&mut seed.clone())?

Using same approach as ml-kem would be a breaking change to the serialized key format, and could be achieved by:

  • adding a seed: Option<...> field of KEY_SEED_SIZE bytes to frodo_kem::kem::DecapsulationKey
  • keeping the seed in Generate (it's currently discarded in frodo-kem/src/kem.rs:116)
  • refactoring KeyInit/KeyExport to operate on the seed, not the expanded private key
  • deprecating the current expanded TryKeyInit path
  • the main complication is that frodo-kem's seed size differs per parameter set (len_s + len_seedSE + len_z), so KemSizes would need a SeedSize associated type rather than a single fixed Seed type.
Lingua principale
Rust
Stelle
130
Fork
63
Merge medio
4g 3h
PR unite (30g)
2

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 RustCrypto/KEMs

Tutte le issue di RustCrypto/KEMs

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.