indutny / indutny/hash.js

why it is wrong ?

Open
#15 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
323
Forks
40
PR merge metrics
No merged PRs in 30d

Description

I want to compute SHA1(salt | SHA1(identity | ":" | pass))
cli.hasher = hash.sha1;
var h = cli.hasher();
var buf1 = h.update(cli.identity + ':' + cli.pass).digest('hex');
// console.log("XXX", buf1)

var h2 = cli.hasher();
var buf2 = h2.update(cli.salt).digest('hex');
console.log("buf2", buf2)

var h3 = cli.hasher();
var buf3 = h3.update(buf1).update(buf2).digest('hex');
console.log("buf3", buf3)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the calculation using the hash.sha1 entry point and the cli.hasher calls shown in the issue. Compare the resulting values with the expected SHA1(salt | SHA1(identity | ":" | pass)) output, including how each intermediate value is represented. Done means the discrepancy is explained and the issue's expected computation is verified or corrected.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
cryptography, security
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.