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

Abierto
#432 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
38/100
Tipo de issue
Refactorización
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
rust
Área
cryptography

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.
Lenguaje dominante
Rust
Estrellas
130
Forks
63
Merge medio
4 d 3 h
PR fusionados (30 d)
2

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de RustCrypto/KEMs

Todos los issues de RustCrypto/KEMs

Issues similares

Más issues de Rust

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.