ml-dsa: PKCS#8 v2 `publicKey` is ignored on decode

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

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

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

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
活発
技術スタック
rust
領域
cryptography

調査の方向性

Start by locating SigningKey::from_pkcs8_der and ExpandedSigningKey::from_pkcs8_der and the ML-DSA PKCS#8 decoding tests. The reproducer shows that a mismatched or malformed v2 publicKey is accepted; first determine the project's preferred behavior for this RFC-permitted field. Done means the chosen behavior is implemented, documented where appropriate, and covered by tests for both cases.

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

説明

SigningKey/ExpandedSigningKey::from_pkcs8_der ignore a OneAsymmetricKey v2 publicKey, so a document whose public key belongs to another seed, or is 1 byte long, decodes fine. RFC 9881 §6 says it "MAY be included to enable keypair consistency checks during import operations", but doesn't require a check.

Options: reject v2 documents with publicKey, verify it against the derived key, or keep ignoring it (and document that). Which would you prefer? Happy to send a PR.

Reproducer (ML-DSA-44, accepted): 3038020101300b0609608648016503040311042280200b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b81020000

主要言語
Rust
スター
672
フォーク
213
平均マージ
23時間 39分
マージ済み PR(30日)
19

環境構築

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

はじめの一歩

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

RustCrypto/signatures のほかの issue

RustCrypto/signatures の issue をすべて見る

似ている issue

Rust の issue をもっと見る

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

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