aws / aws/aws-encryption-sdk-javascript

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

オープン
#1,050 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
TypeScript
スター
260
フォーク
68
平均マージ
22時間 19分
マージ済み PR(30日)
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

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。