nodejs crypto module DH secret hash is not the same with diffie-hellman/browser
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- javascript, nodejs
- 领域
- cryptography
调研方向
首先比较通过 ./browser 使用的浏览器实现与通过 ./ 使用的常规模块,重点关注 getDiffieHellman、getPublicKey('hex') 和 computeSecret(..., 'hex')。复现 modp18 示例,并验证双方是否生成相同的十六进制密钥;当不匹配的原因得到解释,且回归检查覆盖所演示的调用时,该 issue 即完成。
由索引模型根据 Issue 内容生成。
描述
I do a test about crypto module with diffie-hellman/browser
- When I use the followed , DH secret hex is not the same,
var dh1_secret = dh1.computeSecret(dh2.getPublicKey('hex'), 'hex');
var dh2_secret = dh2.computeSecret(dh1.getPublicKey('hex'), 'hex');
console.log(dh1_secret.toString('hex') === dh2_secret.toString('hex')); // false
- when I use the followed, DH secret is the same,
var dh1_secret = dh1.computeSecret(dh2.getPublicKey());
var dh2_secret = dh2.computeSecret(dh1.getPublicKey()); // true
The followed is the completed code.
var myCrypto = require('./browser');
var crypto = require('./');
p1 = "modp18"
var dh1 = myCrypto.getDiffieHellman(p1);
let dh1_secret_key = dh1.generateKeys();
let dh1_pk = dh1.getPublicKey('hex');
let dh2 = myCrypto.getDiffieHellman(p1);
let dh2_secret_key = dh2.generateKeys();
var dh1_secret = dh1.computeSecret(dh2.getPublicKey('hex'), 'hex');
var dh2_secret = dh2.computeSecret(dh1.getPublicKey('hex'), 'hex');
console.log(dh1_secret.toString('hex') === dh2_secret.toString('hex'));
- 主要语言
- JavaScript
- 星标
- 95
- 派生
- 26
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
browserify/diffie-hellman 的其他 Issue
-
难度 3/5 1-2 天 新手友好度 30/100
browserify/diffie-hellman#33 ·
-
难度 3/5 1-2 天 新手友好度 25/100
browserify/diffie-hellman#28 ·
-
难度 2/5 1-3 小时 新手友好度 30/100
browserify/diffie-hellman#25 · 5 条评论 ·
-
难度 4/5 3-5 天 新手友好度 35/100
browserify/diffie-hellman#24 ·
-
Compute secret should have blinds可能重新可做 @calvinmetcalf 于 3459 天前认领,目前没有进行中的 PR。 未关闭question
browserify/diffie-hellman#22 · 13 条评论 · 已指派 1 人 ·
查看 browserify/diffie-hellman 的全部 Issue
相似的 Issue
-
type: bug
难度 2/5 1-3 小时 新手友好度 76/100
blamechris/chroxy#8579 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 66/100
modusensus/dsh-mneme#411 ·
-
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 65/100
nextcloud-libraries/nextcloud-dialogs#2669 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
XRPLF/xrpl-dev-portal#4000 ·
维护者通常 1 天内回复