Questions tagged [scrypt]

SCrypt is a key derivation function (KDF) based on the concept of sequential memory-hard functions mostly used for password hashing.

SCrypt is a key derivation function (KDF) based on the concept of sequential memory-hard functions mostly used for password hashing.

Resources

141 questions
4
votes
0 answers

Scrypt Hashing algorithm behaves differently in PHP 7.2 and PHP 7.3

I am trying to upgrade the PHP version from 7.2.25 to 7.3.21 version, after upgrade of PHP to 7.3.21 and Scyprt DLL, Scyrpt hash algorithm stopped working, user is not able to login, when tried to get into the root cause found that in PHP 7.3.21…
J Cheema
  • 41
  • 2
4
votes
1 answer

NPM / Nodejs: Can't install scrypt@6.0.3

Actually I am trying to install express-basic-auth, but it fails due to the installation of scrypt@6.0.3. I already tried: sudo apt-get install build-essential and also tried deleting ~/.node-gyp as stated here:…
sunwarr10r
  • 4,420
  • 8
  • 54
  • 109
4
votes
0 answers

Replicating Rails/AuthLogic Scrypt Hash Comparison on Node/Express Server

I'm working on a migrating an older ruby-on-rails site to node/express/react/redux, and I've run smack into a wall on authenticating users' existing passwords. The site is currently using AuthLogic(scrypt) for authentication/password hashing, with…
4
votes
1 answer

Speeding up scrypt on android

I am using scrypt in making an Android app and it takes a very long time to compute the hash. This is how I call it: String hash = Base64.encodeToString(SCrypt.scrypt("password".getBytes(), "salt".toString().getBytes(), 16384, 16, 2, 128),…
pratnala
  • 3,723
  • 7
  • 35
  • 58
4
votes
2 answers

Python - Proper way to store passwords with scrypt?

Im failing to understand how should i store hashed passwords with scrypt. Here is the example: import pyscrypt hashed = pyscrypt.hash(password = b"password", salt = b"seasalt", N = 1024, …
RhymeGuy
  • 2,102
  • 5
  • 32
  • 62
4
votes
1 answer

Golang crypto multiple calls have different responses

I'm having a problem with some Go code I've written for a password authentication library. The general idea is to provide 2 functions, Check() and New(), which are both provided a password and a 256 bit HMAC key. The Check() function is also…
Intermernet
  • 18,604
  • 4
  • 49
  • 61
3
votes
1 answer

How can I fix scrypt's invalid parameter combination?

I have the following function call to scrypt() from hashlib using Python 3.7.9: def aes_encrypt(msg, passwordStr): kdfSalt = urandom(16) # 16 bytes == 128 bits hashedKey = scrypt(passwordStr.encode(),salt=kdfSalt,n=16384,r=16,p=1, dklen=64)…
the_endian
  • 2,259
  • 1
  • 24
  • 49
3
votes
1 answer

Python: cannot import scrypt from hashlib

I need to use scrypt algorithm and since I´m already using hashlib, I figured... why not? I already checked this and it pointed out OpenSSL 1.1+ was necessary. Also, according to official doc: hashlib.scrypt(password, *, salt, n, r, p, maxmem=0,…
Adriano_Pinaffo
  • 1,429
  • 4
  • 23
  • 46
3
votes
1 answer

Golang Scrypt Decrypt

I'm trying to mimic in Go, the functionality that is available in a python library (https://pypi.org/project/scrypt/) for decrypting a scrypt generated digest (given the correct password). It seems the go library only provides one function for…
Integralist
  • 5,899
  • 5
  • 25
  • 42
3
votes
1 answer

Unable to create same scrypt digest between Ruby-s and Go-s implementations

I'm having a problem of calculating the same scrypt digest between RbNaCl and Go's implementation. Here's how I'm generating key with rbnacl: opslimit = 2**20 memlimit = 2**24 digest_size = 32 digest = RbNaCl::PasswordHash.scrypt( …
Jarmo Pertman
  • 1,905
  • 1
  • 12
  • 19
3
votes
3 answers

Usage of Firebase SCrypt params in nodejs scrypt package

I've been struggling with this for some time now, hopefully someone has done this before and can help me on my way. I went to the Firebase people to request the scrypt params in order to migrate our user authentication away from Firebase to our own…
3
votes
1 answer

How to implement Scrypt in Java?

I have really been struggling trying to get Bouncy Castle Scrypt going in my web app for password encryption. I am fairly new to programming in Java and security. I have tried looking at Bouncy Castle's documentation for their Scrypt class. However,…
Perdue
  • 479
  • 9
  • 19
3
votes
1 answer

Do I need to Salt an password that has been hashed using scrypt?

I am storing passwords in a database at the minute, by using an scrypt algorithm and then storing that string. I am then doing the password check, by then hashing the password provided, and checking it against that. My question is, do I want to be…
MickeyThreeSheds
  • 986
  • 4
  • 23
  • 42
3
votes
1 answer

SCrypt Lookup Gap Negative Effect

I'm developing a Litecoin Miner for a processor that has only 32KB of internal memory. So I was looking at SCrypt algorithms and for Litecoin it uses N = 1024, that gives me 2^10 * 1 * 128 = 128KB memory use aproximate. So I was looking into GPU…
Lucas Teske
  • 642
  • 9
  • 19
3
votes
1 answer

Python - Hard time understanding scrypt max time

As I understand the maximum time parameter: data = scrypt.encrypt('MESSAGE', 'password', maxtime=0.1) Means python will hash for that amount of time. However, I can go down as low as .76 and it will still decrypt scrypt.decrypt(data, 'password',…
1
2
3
9 10