Replace `subtle` with `ctutils`?
@newpavlov y travaille déjà.
Depuis le 27/12/2025.
Évaluation
Cette issue n'a pas encore été évaluée.
Description
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.
- Langage dominant
- Aucune donnée de langage
- Étoiles
- 13
- Forks
- 4
- Merge moyen
- 41 min
- PR mergées (30 j)
- 1
Préparer son environnement
Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de RustCrypto/meta
-
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 25/100
RustCrypto/meta#38 · 5 commentaires ·
-
Proof systemOuverte
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 20/100
RustCrypto/meta#37 · 3 commentaires ·
-
Difficulté 4/5 3-5 jours Accessibilité débutants 35/100
RustCrypto/meta#36 · 8 commentaires ·
-
Difficulté 4/5 3-5 jours Accessibilité débutants 32/100
RustCrypto/meta#34 · 8 commentaires ·
-
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 25/100
RustCrypto/meta#28 · 1 commentaire ·