Replace `subtle` with `ctutils`?
@newpavlov 已經在處理了。
開始於 2025年12月27日。
評估
這個 Issue 還沒有評估資料。
描述
I've written a modern replacement for subtle which uses the cmov crate to support constant-time predication instructions (cmov/csel families) via asm!, along with a portable "best effort" fallback similar to what subtle was doing before:
https://github.com/RustCrypto/utils/tree/master/ctutils
It's also an extraction of what we had built in crypto-bigint as a sort of half-baked subtle replacement to work around many issues we were having with subtle, including lack of const fn support, and the inability to support heap-allocated types due to copy bounds. I am in the process of completely switching crypto-bigint over to ctutils (while maintaining optional backwards compatibility with subtle, in part through the subtle interop built into ctutils). Preliminary benchmarking in crypto-bigint has not shown notable performance changes, either.
I've tried making some of these changes upstream to subtle, but it seems somewhat unmaintained at this point, and with an entrenched userbase making breaking changes seems difficult:
- https://github.com/dalek-cryptography/subtle/pull/118
- https://github.com/dalek-cryptography/subtle/pull/136
- https://github.com/dalek-cryptography/subtle/pull/137
ctutils is otherwise mostly an easy drop-in replacement for subtle, and I think we could potentially adopt it in the places we are currently using subtle so as to have a maintained, in-org crate which should theoretically provide better guarantees on most modern platforms. I've just released v0.2.0 and I think it's ready to begin adopting.
- 主要語言
- 沒有語言資料
- 星號
- 13
- 分支
- 4
- 平均合併
- 41 分鐘
- 30 天內合併 PR
- 1
環境準備
這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
RustCrypto/meta 的其他 Issue
-
難度 5/5 一週以上 新手友好度 25/100
RustCrypto/meta#38 · 5 則留言 ·
-
Proof system未關閉
難度 5/5 一週以上 新手友好度 20/100
RustCrypto/meta#37 · 3 則留言 ·
-
難度 4/5 3-5 天 新手友好度 35/100
RustCrypto/meta#36 · 8 則留言 ·
-
難度 4/5 3-5 天 新手友好度 32/100
RustCrypto/meta#34 · 8 則留言 ·
-
難度 5/5 一週以上 新手友好度 25/100
RustCrypto/meta#28 · 1 則留言 ·