browserify / browserify/randombytes

Implement browser getRandomValues without depending on crypto

未关闭
#37 3 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
question
主要语言
JavaScript
星标
102
派生
47
PR 合并指标
30 天内没有已合并 PR

描述

This is based on this [discussion](https://github.com/browserify/crypto-browserify/issues/232)

TL;DR: I propose having an implementation of `getRandomValues` that does not depend on a native implementation of crypto.

I am having an issue with bundling my code and running it in a non-browser environment, using modules that depend on `crypto`, which depends on `randombytes`' implementation of `getRandomValues`. If I bundle my code in "browser" mode, I get the error `'Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11'`.

If I don't bundle it in browser mode but force browser fallback for `crypto-browserify` (which is necessary in my use-case, the javascript VM I'm using does not implement `crypto`), then I get a circular dependency and getRandomBytes is never implemented.

Is it possible to implement it in this package? If not is there any particular reason? And can I help in some way?

贡献指南

这个仓库没有索引到贡献指南

调研方向

首先检查此 package 的 browser getRandomValues 实现以及链接的 crypto-browserify 讨论。跟踪在 browser 模式下如何选择 randombytes,以及 crypto-browserify fallback 如何创建所报告的循环依赖。当一个受支持的实现能够在所描述的非浏览器 JavaScript VM 中运行,且不依赖 native crypto 实现时,即表示完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
javascript
领域
cryptography
Issue 类型
功能
难度
5/5
预计耗时
一周以上
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。