Welcome, Guest
Guest Settings
Help

Thread: scrypt hash length?



Permlink Replies: 5 - Last Post: Dec 15, 2016 8:59 AM Last Post By: bernard roussely Threads: [ Previous | Next ]
Markus Humm

Posts: 4,265
Registered: 11/9/03
scrypt hash length?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 22, 2016 1:14 AM
Hello,

I might use the scrypt password hashing alrogithm in some application,
but I don't know how long the resulting hash value will be and whether
this is influenced by the CPU and memory factores which are parameters
to this algorithm.

So how long will the resulting hash be?

Greetings

Markus
Anton Kecherk

Posts: 8
Registered: 12/7/16
Re: scrypt hash length?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 10, 2016 2:18 AM   in response to: Markus Humm in response to: Markus Humm
I often told that the hardware doesn't care what language a program is written in as it only sees the compiled binary code, however this is not the whole truth. For example, consider the humble Z80; its extensions to the 8080 instruction set include instructions like CPIR which is useful for scanning C-style (NULL-terminated) strings, e.g. to perform strlen(). The designers must have identified that running C programs (as opposed to Pascal, where the length of a string is in the header) was something that their design was likely to be used for. Another classic example is the Lisp Machine.
Rudy Velthuis (...


Posts: 6,384
Registered: 9/22/99
Re: scrypt hash length?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 13, 2016 4:28 PM   in response to: Anton Kecherk in response to: Anton Kecherk
Anton Kecherk wrote:

I often told that the hardware doesn't care what language a program
is written in as it only sees the compiled binary code, however this
is not the whole truth.

That is the whole truth. That different languages may use different
representations of non-scalar data doesn't change that.

--
Rudy Velthuis http://www.rvelthuis.de

"The difference between our decadence and the Russians' is that
while theirs is brutal, ours is apathetic."
-- James Thurber
Rudy Velthuis (...


Posts: 6,384
Registered: 9/22/99
Re: scrypt hash length?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 13, 2016 5:18 PM   in response to: Anton Kecherk in response to: Anton Kecherk
Anton Kecherk wrote:

I often told that the hardware doesn't care what language a program
is written in as it only sees the compiled binary code, however this
is not the whole truth.

General purpose hardware doesn't. That some processors may have
instructions that make some tasks in some programming languages easier
doesn't change that.

--
Rudy Velthuis http://www.rvelthuis.de

Harp's Corollary To Estridge's Law: Your "IBM PC-compatible"
computer grows more incompatible with every passing moment.
Dan Barclay

Posts: 697
Registered: 11/9/03
Re: scrypt hash length?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 14, 2016 3:00 PM   in response to: Anton Kecherk in response to: Anton Kecherk
Anton Kecherk wrote:

I often told that the hardware doesn't care what language a program
is written in as it only sees the compiled binary code, however this
is not the whole truth. For example, consider the humble Z80; its
extensions to the 8080 instruction set include instructions like CPIR
which is useful for scanning C-style (NULL-terminated) strings, e.g.
to perform strlen(). The designers must have identified that running
C programs (as opposed to Pascal, where the length of a string is in
the header) was something that their design was likely to be used
for. Another classic example is the Lisp Machine.

That's news to me. Does Pascal require that the length of a string is
in the header? If I'm not mistaken, that structure is an implemenation
detail, not a part of the language.

If someone is writing Pascal, how do they even know where/how the
length is stored?

The implemenation detail may be (should be?) influenced by the target
hardware, but hidden from the language itself.

Dan
bernard roussely

Posts: 92
Registered: 2/8/05
Re: scrypt hash length?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 15, 2016 8:59 AM   in response to: Markus Humm in response to: Markus Humm
I might use the scrypt password hashing alrogithm in some application,
but I don't know how long the resulting hash value will be and whether
this is influenced by the CPU and memory factores which are parameters
to this algorithm.

Hi Markus,
You may want to consider using PBKDF2 or Argon2 from the TMS Cryptography Pack.
bernard
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02