Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

SubtleCrypto deriveBits for PBKDF2

Aperta
#345 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
c, javascript
Ambito
api, security

Direzione di ricerca

Start by reading the existing crypto.subtle.importKey implementation and the proposed CryptoAlgorithmDeriveBits base class to understand how crypto operations are wired through the runtime. Implement the scoped PBKDF2 import and deriveBits support, including the specified PRFs and length coercion; done means PBKDF2 keys can be used with deriveBits and deriveKey usages are accepted as stated.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

crypto.subtle.deriveBits with PBKDF2 is needed by Fastly Compute apps that do key derivation for cookie/token schemes. A concrete example: the HUMAN Security (PerimeterX) _px3 cookie flow requires PBKDF2-HMAC-SHA256 (hundreds to thousands of iterations, 384 derived bits split into a 32-byte AES-256 key and 16-byte IV) followed by AES-256-CBC decryption. Without native PBKDF2, a JS implementation costs roughly ~45 ms per request versus ~1 ms natively, which is significant inside a Fastly Compute request handler.

Scope for the first increment:

  • crypto.subtle.importKey("raw", keyData, "PBKDF2", extractable, usages) producing a secret CryptoKey usable for deriveBits/deriveKey (usages restricted to those two).
  • crypto.subtle.deriveBits(algorithm, baseKey, length) wired through a CryptoAlgorithmDeriveBits base class, with the PBKDF2 operation implemented via OpenSSL PKCS5_PBKDF2_HMAC and the optional [EnforceRange] unsigned long length coercion semantics from the spec.
  • SHA-1 / SHA-256 / SHA-384 / SHA-512 PRFs.

Follow-on work (not part of the first PR): deriveKey for PBKDF2, AES-CBC encrypt/decrypt to complete the _px3 flow, and the remaining HKDF/ECDH deriveBits algorithms.

Lingua principale
C
Stelle
293
Fork
61
Merge medio
1g 6h
PR unite (30g)
12

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

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di bytecodealliance/StarlingMonkey

Tutte le issue di bytecodealliance/StarlingMonkey

Issue simili

Altre issue su C

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.