SHA-256/512 password hashing

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

SHA-256/512 password hashing

Per Hedeland-4
Hi,

Surely someone has already implemented the SHA-256- and SHA-512-based
password hashing algorithms used by current libc crypt(3) implementations,
as specified in http://www.akkadia.org/drepper/SHA-crypt.txt, in Erlang,
and is willing to share the result? I didn't succeed with google...

--Per Hedeland

Reply | Threaded
Open this post in threaded view
|

SHA-256/512 password hashing

Dmitry Kolesnikov
Hello,

This is part of crypto
http://erlang.org/doc/man/crypto.html
hash_algorithms() =  md5 | ripemd160 | sha | sha224 | sha256 | sha384 | sha512

e.g. crypto:hash(sha256, <<?xxx?>>).

- Dmitry

On 21 May 2014, at 16:45, Per Hedeland <per> wrote:

> Hi,
>
> Surely someone has already implemented the SHA-256- and SHA-512-based
> password hashing algorithms used by current libc crypt(3) implementations,
> as specified in http://www.akkadia.org/drepper/SHA-crypt.txt, in Erlang,
> and is willing to share the result? I didn't succeed with google...
>
> --Per Hedeland
> _______________________________________________
> erlang-questions mailing list
> erlang-questions
> http://erlang.org/mailman/listinfo/erlang-questions


Reply | Threaded
Open this post in threaded view
|

SHA-256/512 password hashing

Per Hedeland-4
Dmitry Kolesnikov <dmkolesnikov> wrote:
>
>This is part of crypto

Thanks, I know where to find SHA-256 and SHA-512, that's not what the
question was about - i.e. it's a matter of what you hash and how. See
the link.

--Per

Reply | Threaded
Open this post in threaded view
|

SHA-256/512 password hashing

Fred Hebert
On 05/21, Per Hedeland wrote:
>
> Thanks, I know where to find SHA-256 and SHA-512, that's not what the
> question was about - i.e. it's a matter of what you hash and how. See
> the link.
>
> --Per

I know you asked for SHA, and this might be an external requirement you
can do nothing about. However, in the possibility you can choose the
technology you want there, I'd like to possibly recommend erlpass
(https://github.com/ferd/erlpass) which uses bcrypt to encapsulate
common password operations, and should be safer.

Sorry if that ends up not being helpful,
Fred.

Reply | Threaded
Open this post in threaded view
|

SHA-256/512 password hashing

Per Hedeland-4
Fred Hebert <mononcqc> wrote:
>
>I know you asked for SHA, and this might be an external requirement you
>can do nothing about. However, in the possibility you can choose the
>technology you want there, I'd like to possibly recommend erlpass
>(https://github.com/ferd/erlpass) which uses bcrypt to encapsulate
>common password operations, and should be safer.
>
>Sorry if that ends up not being helpful,

Thanks anyway, but no, compatibility with libc crypt(3) is a
requirement. It's actually pretty trivial to transcribe Drepper's
22-step specification of the algorithm to Erlang, just boring and
error-prone - which is why I hoped that someone else had already
done it.:-)

--Per