Decryption panics when importing invalid key components
評估
- 難度
- 2/5
- 預估耗時
- 1-3 小時
- 新手友好度
- 70/100
- Issue 類型
- 缺陷
- 描述清晰度
- 描述清楚
- 活躍度
- 活躍
- 技術堆疊
- rust
- 領域
- cryptography, security
研究方向
panic 來自 backend-openssl 程式碼路徑,因此從該 backend 模組開始,並追蹤 decrypt 和 legacy::decrypt_aesgcm 在進行任何解密之前如何匯入 EcKeyComponents(尤其是公開金鑰)。把 issue 中的程式碼片段改成現有解密測試旁邊的測試,並在啟用 backend-openssl feature 的情況下執行它,以確認 panic 及其原始碼行。完成意味著空、截斷或錯誤的金鑰透過 Result 傳回現有的金鑰匯入錯誤,而不是 panic,並且其他 backend 仍然通過。
由索引模型根據 Issue 內容生成。
描述
In 2.4.2, decrypt and legacy::decrypt_aesgcm panic on invalid key import with the backend-openssl feature.
An empty, truncated, or invalidly encoded public key reproduces the panic while the other inputs remain valid.
let (key, auth) = ece::generate_keypair_and_auth_secret().unwrap();
let components = key.raw_components().unwrap();
let ciphertext = ece::encrypt(components.public_key(), &auth, b"message").unwrap();
let invalid = ece::EcKeyComponents::new(components.private_key().to_vec(), vec![]);
assert!(ece::decrypt(&invalid, &auth, &ciphertext).is_err());
Expected: return the key-import error through the existing Result.
- 主要語言
- Rust
- 星號
- 29
- 分支
- 14
- PR 合併指標
- 30 天內沒有已合併 PR
環境準備
這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
mozilla/rust-ece 的其他 Issue
-
CI: Update CircleCI or move to Github Actions for CI process可能已有人在做 @jrconlin 於 74 天前認領。 未關閉
難度 4/5 3-5 天 新手友好度 45/100
-
難度 4/5 3-5 天 新手友好度 42/100
-
難度 4/5 3-5 天 新手友好度 35/100
-
enhancement
難度 4/5 3-5 天 新手友好度 25/100
-
Use openssl for `sha256` instead of `sha2`.可能重新可做 @jrconlin 於 2763 天前認領,目前沒有進行中的 PR。 未關閉
相似的 Issue
-
crate: spate-kafka priority: low tech-debt
難度 2/5 1-3 小時 新手友好度 74/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 72/100
維護者通常 1 天內回覆
-
macOS 菜单栏托盘图标保留橙色,与系统单色图标风格不一致可能已有人在做 @xhugoliu 今天認領。 未關閉
難度 2/5 1-3 小時 新手友好度 70/100
YizhengWw/HachimoDock#56 · 1 則留言 ·
-
bug
難度 2/5 1-3 小時 新手友好度 72/100
維護者通常 1 天內回覆
-
area:ui bug effort:low P2 source:agent
難度 1/5 1 小時以內 新手友好度 86/100
維護者通常 1 天內回覆