@aws-crypto/client-browser Buffer usage in raw2der causing ReferenceError when decrypting
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- typescript
- Domain
- cryptography
Research direction
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.
Written by the indexing model from the issue text.
Description
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 dependency to the package.
- Dominant language
- TypeScript
- Stars
- 260
- Forks
- 68
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from aws/aws-encryption-sdk-javascript
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
aws/aws-encryption-sdk-javascript#1656 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 68/100
aws/aws-encryption-sdk-javascript#1691 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
aws/aws-encryption-sdk-javascript#1665 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 52/100
aws/aws-encryption-sdk-javascript#1663 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
aws/aws-encryption-sdk-javascript#1520 · 1 comment ·
All issues in aws/aws-encryption-sdk-javascript
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
copse-dev/agent-pane#2953 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·