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

Đang mở
#1,479 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
35/100
Loại issue
Tính năng
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Sôi nổi
Công nghệ
rust
Lĩnh vực
cryptography

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
Rust
Star
672
Fork
213
Merge trung bình
23 giờ 39 phút
Pull request đã merge (30 ngày)
19

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của RustCrypto/signatures

Tất cả issue của RustCrypto/signatures

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.