aws / aws/aws-encryption-sdk-javascript

@aws-crypto/client-browser Buffer usage in raw2der causing ReferenceError when decrypting

Aperta
#1,050 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
TypeScript
Stelle
260
Fork
68
Merge medio
22h 19m
PR unite (30g)
2

Descrizione

### Problem:
When using @aws-crypto/client-browser version 3.1.1, calling `decrypt()` will result in a `ReferenceError`. `decrypt` calls `raw2der`, which includes a reference to global `Buffer` type. The `buffer` npm package is not listed as a dependency in the package.json.

### Solution:
Either decouple the browser and node `ecdsa_signature.ts` helpers and use a `Uint8Array` instance instead of `Buffer` or add the [buffer](https://www.npmjs.com/package/buffer) dependency to the package.

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Start with the browser package's ecdsa_signature.ts and package.json, then trace decrypt() into raw2der to confirm where the global Buffer reference is used. The fix is complete when browser decryption no longer raises ReferenceError, using either the browser-safe helper approach or the declared buffer dependency described in the issue.

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

Valutazione

Stack tecnologico
typescript
Ambito
cryptography
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.