aws / aws/aws-encryption-sdk-javascript
@aws-crypto/client-browser Buffer usage in raw2der causing ReferenceError when decrypting
- 主要语言
- TypeScript
- 星标
- 260
- 派生
- 68
- 平均合并
- 22 小时 19 分钟
- 30 天内合并 PR
- 2
描述
### 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.
贡献指南
调研方向
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.
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- typescript
- 领域
- cryptography
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100