Safer streaming decryption
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à
- Ferma
- Stack tecnologico
- javascript, nodejs, typescript
- Ambito
- cryptography, security
Direzione di ricerca
Inizia confrontando il comportamento attuale della decrittografia in streaming di NodeJS/TypeScript con il comportamento della libreria standard Java descritto in issue 25 e l'approccio tmpfile di ironnode. Decidi quale contratto di autenticazione e buffering dovrebbero condividere le librerie; il lavoro è completato quando il comportamento scelto è implementato in modo coerente e le relative limitazioni di autenticazione sono documentate.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
https://github.com/IronCoreLabs/tenant-security-client-java/issues/25 brought up that the Java std library supports streaming AES-GCM decryption, but it's just for the interface. The implementation still buffers everything in memory before passing along the bytes after checking the auth tag. The code here is passing along the bytes as they're decrypted and then erroring if the auth tag is wrong, on the expectation the receiver will throw away/delete all the bytes it got because they've been tampered with. ironnode is writing the bytes to a tmpfile as they're decrypted, and then passing them along only if the auth tag is right.
We should make at least the two TSCs streaming behavior consistent, and probably ironnode too. Once chunking is supported we can safely do real, low memory, streaming. Until then, in all libraries, we should decide to either:
- do the safest thing and not pass along any bytes until we've confirmed the auth tag, with documentation disclaimers that the entire document will be buffered in memory. This is the easiest for the end user because they don't need to know or think about the authentication issues and can just call and use the bytes they get, but has the downside of not being able to decrypt large files (which is one of the common reasons to use streaming decryption).
- pass along bytes as we go and have the stream error if the auth tag doesn't check out. This would support large files and a lower memory footprint, but has the downside of the caller needing to understand (and us well document) that we're authenticating at the end and that they need to undo whatever they did with the bytes if they get an auth error from the stream.
- Lingua principale
- TypeScript
- Stelle
- 2
- Fork
- 2
- Merge medio
- 18h 29m
- PR unite (30g)
- 2
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
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 IronCoreLabs/tenant-security-client-nodejs
-
Handle TSP error code 212Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
Tutte le issue di IronCoreLabs/tenant-security-client-nodejs
Issue simili
-
Diagram: Gantt qa-manually-tested Type: Bug / Error
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
mermaid-js/mermaid-v13#1255 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
Name Option For /gifApertaenhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
BaseAdresseNationale/adresse.data.gouv.fr#2620 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
I maintainer di solito rispondono entro 1 giorno