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 天内回复