RFC: Upstreaming CKM_HKDF_DERIVE — design questions
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Da chiarire
- Stato di attività
- Tranquilla
- Stack tecnologico
- cpp
- Ambito
- backend, cryptography
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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!
- Lingua principale
- C++
- Stelle
- 1.1k
- Fork
- 434
- Merge medio
- 12g 14h
- PR unite (30g)
- 2
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di softhsm/SoftHSMv2
-
C_DigestKey digests a sensitive EC private key's CKA_VALUE: no check that the object is a secret keyAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 54/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 56/100
Tutte le issue di softhsm/SoftHSMv2
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
charmplusplus/charm#4210 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
I maintainer di solito rispondono entro 1 giorno
-
[BUG] VPN auth dialog spawned by the secret agent fails with "TLS support is not available" on NixOSApertabug nixos umbriel
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
noctalia-dev/noctalia#5310 ·
I maintainer di solito rispondono entro 1 giorno
-
area/docdb kind/bug priority/medium status/awaiting-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
yugabyte/yugabyte-db#37426 ·
I maintainer di solito rispondono entro 1 giorno