question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Where is the "p" in N, r, p?

See original GitHub issue

Hey thanks for the lib!

How come there is no param for p in the usual scrypt N, r, p?

For example, from the node.js reference implementation:

scrypt.hashSync(key,{"N":16,"r":1,"p":1},64,"")

https://github.com/barrysteyn/node-scrypt#test-vector-1

Thanks!

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
thinkloopcommented, Jun 23, 2016

The ethereum blockchain requires p be over 1 for certain values, and web workers will take a while for wide-spread support, there’s a nice little niche spot for single-threaded chunked variable p scrypt’ing. Just showing a case for demand, not asking for free work 😄. All the best.

On Wed, Jun 22, 2016 at 5:40 AM, Dmitry Chestnykh notifications@github.com wrote:

Yeah, I’d like to implement parallelization parameter one day, but this will happen in a new library I’m currently writing (although I’ll probably accept a pull request). Here I just removed it for simplicity of implementation, as interrupted async loop is already crazy enough.

The thing is that each p is intended to load one CPU thread, so the proper implementation would use a web worker for each computation. (Although, even the reference implementation doesn’t implement parallelization yet!) However, if we have access to web workers, we don’t even need the complexity of scrypt-async, we can just make scrypt synchronous and put the whole scrypt computation into a web worker.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/dchest/scrypt-async-js/issues/22#issuecomment-227693991, or mute the thread https://github.com/notifications/unsubscribe/AAHQHnT6eSQzjhdwgybUofwE1EJHku7Vks5qOQMmgaJpZM4HmUft .

0reactions
dchestcommented, Jun 22, 2016

Yeah, I’d like to implement parallelization parameter one day, but this will most likely happen in a new library I’m currently writing (although I’ll probably accept a pull request). Here I just removed it for simplicity of implementation, as interrupted async loop is already crazy enough.

The thing is that each p is intended to load one CPU thread, so the proper implementation would use a web worker for each computation. (Although, even the reference implementation doesn’t implement parallelization yet!) However, if we have access to web workers, we don’t even need the complexity of scrypt-async, we can just make scrypt synchronous and put the whole scrypt computation into a web worker.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Neonatal Resuscitation Program
The Neonatal Resuscitation Program® (NRP®) course conveys an evidence-based approach to care of the newborn at birth and facilitates effective team-based ...
Read more >
Newborn Resuscitation: The Science of NRP 7th Edition
Open the mouth and lift the jaw forward. Try PPV and reassess chest movement. P. Pressure increase. Increase pressure in 5 to 10...
Read more >
Neonatal Resuscitation Program - an overview
The NRP is a training program for providers of newborn resuscitation created by the AAP and the American Heart Association to provide a...
Read more >
Neonatal Resuscitation Program (NRP) - RQI Partners
The NRP 8 th Edition is Here. The Neonatal Resuscitation Program ® (NRP® ) equips healthcare providers and teams with an evidence ...
Read more >
Information for N, R, and P Particulate Respirator Categories
N, R, and P are NIOSH certification categories that apply to negative pressure air-purifying respirators that protect against respiratory particulates.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found