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

オープン
#432 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
38/100
issue の種類
リファクタリング
明瞭さ
おおむね明確
活発さ
活発
技術スタック
rust
領域
cryptography

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.
主要言語
Rust
スター
130
フォーク
63
平均マージ
4日 3時間
マージ済み PR(30日)
2

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

RustCrypto/KEMs のほかの issue

RustCrypto/KEMs の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。