1

Does the scrypt program use a hashing algorithm behind the scenes?

What's the output size of scrypt (I mean the underlying algorithm, is that 4096 bits)?

Tower
  • 98,741
  • 129
  • 357
  • 507

2 Answers2

7

Yes, it does. In fact, it uses two. If you look at the scrypt paper, you'll see that it uses

  1. SHA-256 in the PBKDF2 construction for initial key expansion and for the final output generation, and

  2. the Salsa 20/8 core by D. J. Bernstein as part of the actual memory-hard mixing function SMix.

(The Salsa 20/8 core is not actually a cryptographic hash function in the same sense as, say, SHA-256, but merely a part of one, but I've included it for completeness.)

Ilmari Karonen
  • 49,047
  • 9
  • 93
  • 153
3

The output size is whatever you ask PBKDF2 for; IIRC this is limited to something on the order of 4 GB.

tc.
  • 33,468
  • 5
  • 78
  • 96
  • Yes it seems the output size is whatever I want (up to 4096-bits), shouldn't we then just always choose the highest figures? Where do you draw the line -- how much maximum time etc. you want to choose? – Tower Jul 21 '12 at 14:14
  • @rFactor: Do you mean for the output size, or the other parameters (memory used/parallelism/etc)? – tc. Jul 23 '12 at 15:25