ecdsa, rfc6979: k, k⁻¹ and the RFC 6979 generator state are not zeroized (FIPS 186-5 § 6.4.1)
Los mantenedores suelen responder en 1 día
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 48/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- rust
- Área
- cryptography, security
Línea de trabajo
Start with src/hazmat.rs at sign_prehashed and sign_prehashed_rfc6979, then inspect rfc6979's src/hmac_drbg.rs and its feature setup. Trace how k, k_inv, k_bytes, the private key encoding, and generator state are held, and check the existing zeroize dependency and feature conventions. Done means the secret material is zeroized as proposed and the relevant tests cover the changes.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
FIPS 186-5 § 6.4.1: step 10 of signature generation orders k and k⁻¹ to be destroyed
("Securely destroy"), and the same section requires d, k and k⁻¹ to be "protected from
unauthorized disclosure and modification".
In ecdsa 0.17.0:
hazmat::sign_prehashed(src/hazmat.rs l. 52-91):k_invand the copies ofkare not
zeroized.NonZeroScalarimplementsZeroize(elliptic-curve 0.14.1,
src/scalar/nonzero.rs l. 384-396) but isCopy(l. 124), so it cannot zeroize on drop.hazmat::sign_prehashed_rfc6979(l. 102-124):k_bytesandd.to_repr(), a copy of the
private key handed toKGenerator::new, are not zeroized.
In rfc6979 0.6.0,HmacDrbgkeepskandv(src/hmac_drbg.rs l. 16 and 19), derived from
the private key, and the crate does not depend onzeroize.
Since s = k⁻¹·(z + r·d) is published,kfrom a single signature yields d. The ecdsa lines are
unchanged on the default branch at cf99f5ebe36954026fdc86d2a2b372e6c97d04fb.
Proposal: zeroize k_bytes, the key encoding, k and k_inv explicitly in hazmat (ecdsa
already depends on zeroize), and implement ZeroizeOnDrop for HmacDrbg/KGenerator behind
a zeroize feature of rfc6979.
We know of no practical exploit: the residue matters once the key itself is gone, in a memory
dump or a swapped page. We searched the tracker first; the closest reports concern keys only
(#1020, #883, #937).
- Lenguaje dominante
- Rust
- Estrellas
- 672
- Forks
- 213
- Merge medio
- 23 h 39 min
- PR fusionados (30 d)
- 19
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de RustCrypto/signatures
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
RustCrypto/signatures#1491 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
RustCrypto/signatures#1498 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
RustCrypto/signatures#1479 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Merkle Tree Improvement ProposalAbierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
RustCrypto/signatures#1460 · 8 comentarios ·
Los mantenedores suelen responder en 1 día
-
xmss: XMSS^MT height-40 keys never return `KeyExhausted`; signing after exhaustion returns `Ok` with an invalid signaturePosiblemente ocupada @choksi2212 la tomó hace 35 días. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 65/100
RustCrypto/signatures#1453 · 1 comentario · 1 reacción ·
Los mantenedores suelen responder en 1 día
Todos los issues de RustCrypto/signatures
Issues similares
-
benchmark-review
Dificultad 2/5 1-3 horas Aptitud para principiantes 63/100
Los mantenedores suelen responder en 1 día
-
area:filesystem bug need-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Captions panel does not offer to show an existing transcriptPosiblemente ocupada @thedavidweng la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
CapSoftware/Cap#4276 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
libracoder/kiri#364 ·
Los mantenedores suelen responder en 1 día