RFC: Upstreaming CKM_HKDF_DERIVE — design questions
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 25/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Necesita aclaración
- Estado de actividad
- Tranquilo
- Stack tecnológico
- cpp
- Área
- backend, cryptography
Línea de trabajo
Start by reading the PKCS#11 v3 CKM_HKDF_DERIVE requirements and the existing MacAlgorithm, CryptoFactory, CKM_CONCATENATE_BASE_AND_KEY, and CKM_DES_* patterns mentioned in the issue. The reported implementation is inline in SoftHSM.cpp, with tests in DeriveTests.cpp; the issue asks maintainers to decide several design questions before a contribution can proceed. Done means those choices are resolved and the requested implementation and tests meet them.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Hi, I have a working CKM_HKDF_DERIVE implementation against current main and would like to upstream it. Before opening a PR, I'd appreciate input on a few design choices.
What I have
- CKM_HKDF_DERIVE per PKCS#11 v3, parsing CK_HKDF_PARAMS.
- All three salt sources (NULL / DATA / KEY) and all four extract/expand combinations.
- Sensitive/extractable propagation matching CKM_CONCATENATE_BASE_AND_KEY.
- Support for all PRFs.
- Some RFC 5869 Test Cases passing as a CppUnit test.
Known gaps:
- OpenSSL backend only.
- HKDF logic inline in SoftHSM.cpp, not under src/lib/crypto/.
- CKK_HKDF not wired into newP11Object / P11Attributes.
- No CKM_HKDF_KEY_GEN / CKM_HKDF_DATA, no FIPS gating.
Questions
- Crypto layer — should I model HKDF after MacAlgorithm (new + OSSL/Botan subclasses via CryptoFactory), or build it on top of existing MacAlgorithm HMAC and skip a new factory entry?
- Botan backend — required for merge, or acceptable as follow-up?
- FIPS — for WITH_FIPS builds, allow SHA-2 PRFs only and compile out the rest, matching the CKM_DES_* pattern?
- CKK_HKDF object representation — reuse P11GenericSecretKeyObj (like the CKK_*_HMAC types), or introduce P11HKDFSecretKeyObj?
- Would CKM_HKDF_KEY_GEN / CKM_HKDF_DATA be required to merge?
- Tests — anything beyond DeriveTests.cpp and RFC 5869 vectors you'd like to see?
Motivation
My project uses SoftHSM in CI and needs HKDF; we'd rather upstream than maintain a fork.
Thanks!
- Lenguaje dominante
- C++
- Estrellas
- 1.1k
- Forks
- 434
- Merge medio
- 12 d 14 h
- PR fusionados (30 d)
- 2
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 softhsm/SoftHSMv2
-
C_DigestKey digests a sensitive EC private key's CKA_VALUE: no check that the object is a secret keyAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
-
Dificultad 4/5 3-5 días Aptitud para principiantes 54/100
-
Dificultad 4/5 3-5 días Aptitud para principiantes 56/100
Todos los issues de softhsm/SoftHSMv2
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
ROCm/rocm-systems#15475 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 68/100
Sendspin/sendspin-cpp#257 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
pocoproject/poco#5664 ·
Los mantenedores suelen responder en 2 días
-
community:good-first-issue kind:bug kind:test scope:control status:needs-triage vehicle:rover
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
PX4/PX4-Autopilot#29727 ·
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