Scrypt algorithm output doesn t match up as expected

0 votes

I am trying to get my head around the scrypt algorithm output. Have tried to get the scrypt encryption result for the headerString:

01000000ae178934851bfa0e83ccb6a3fc4bfddff3641e104b6c4680c31509074e699be2bd672d8 d2199ef37a59678f92443083e3b85edef8b45c71759371f823bab59a97126614f44d5001d45920180 [little endian]

to

000000003b4ba52ab765631e20a04b88cd27f0b66d3509fb2da7781fae6d7901. [big endian]

I'm trying to replicate this but I'm not able to reproduce that result. I'm using an implementation that gives the correct output for the test vectors but when running the headerString through it with the correct settings for N,r,p (1024,1,1) i get the result

c17fcd0c6d698828112ade740d4e8ad76705764da3abfc49ff3bb1863cd16472. [big endian]

I have tried it with the same result those implementations with the same result from both:

data = "01000000ae178934851bfa0e83ccb6a3fc4bfddff3641e104b6c4680c31509074e699be2bd672d8 d2199ef37a59678f92443083e3b85edef8b45c71759371f823bab59a97126614f44d5001d45920180"; https://github.com/cheongwy/node-scrypt-js 

var result = scrypt(data,data, 1024,1,1,32); https://github.com/tonyg/js-scrypt 
var result = scrypt.crypto_scrypt(scrypt.encode_utf8(data), scrypt.encode_utf8(data), 1024, 1, 1, 32);


I’m after the script call. I'm just parsing the byte array to a hex string. I just can't understand why I am not getting the same result when I have validated my scrypt implementation against the paper about it. I really need help solving this! If I haven't provided enough information please ask and I'll try my best to clear things out.

Mar 1, 2022 in Blockchain by Soham
• 9,700 points
226 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In Blockchain

0 votes
1 answer

SHA256 Hash doesn't match the one listed on Bitcoin Wiki

The problem occurring here is that you ...READ MORE

answered Feb 28, 2022 in Blockchain by Soham
• 9,700 points
566 views
+1 vote
2 answers

Challenge while setting up Hyperledger Fabric 1.0 in Ubuntu 16.04

The rocksdb error you're seeing wouldn't be ...READ MORE

answered Mar 27, 2018 in Blockchain by ned_crew
• 1,610 points

edited Jun 8, 2020 by Sirajul 928 views
+1 vote
4 answers

How PBFT algorithm works?

PBFT is a way for a distributed ...READ MORE

answered Apr 25, 2019 in Blockchain by Kiran
7,628 views
0 votes
2 answers

Why is network already up to date while trying to deploy a contract on truffle?

I guess you have ganache running already ...READ MORE

answered Apr 24, 2018 in Blockchain by Shashank
• 10,400 points
4,153 views
+1 vote
1 answer

Protocols used in a distributed/dlt system for the nodes to establish communication

yes all are over TCP/IP connections secured ...READ MORE

answered Aug 6, 2018 in Blockchain by aryya
• 7,450 points
1,148 views
0 votes
1 answer

Truffle tests not running after truffle init

This was a bug. They've fixed it. ...READ MORE

answered Sep 11, 2018 in Blockchain by Christine
• 15,790 points
1,706 views
0 votes
1 answer

Hyperledger Sawtooth vs Quorum in concurrency and speed Ask

Summary: Both should provide similar reliability of ...READ MORE

answered Sep 26, 2018 in IoT (Internet of Things) by Upasana
• 8,620 points
1,237 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP