2

In alpha release of php5.6 a new hash algorithm gost-crypto was added. I tried to look into documentation but the only information I found that it is added and nothing else.

Also there is no information on google (due to the fact that it was released today).

So how should I use it (gost-crypto('hello'); does not work) and in what cases is is better then other already available hashes md5 or crypt?

divanov
  • 6,173
  • 3
  • 32
  • 51
Salvador Dali
  • 214,103
  • 147
  • 703
  • 753

2 Answers2

3

You can see the new tests here: https://github.com/php/php-src/blob/master/ext/hash/tests/gost.phpt?source=c

echo hash('gost-crypto', 'The quick brown fox jumps over the lazy dog'), "\n";

The relevant ticket with more explanations is here: https://github.com/php/php-src/pull/430

This adds a new hash identifier "gost-crypto" which uses the CryptoPro S-box tables as specified by RFC 4357, section 11.2.

GOST algorithm with CryptoPro S-Box generates different set of hash values. CryptoPro S-box is required among other for DNSSEC GOST signatures (RFC 5933).

See http://en.wikipedia.org/wiki/GOST_(hash_function)

deceze
  • 510,633
  • 85
  • 743
  • 889
-3

It's a hash algorithm, I guess you can use it now instead of say, CRYPT_BLOWFISH in functions that support it (like crypt()).

Madara's Ghost
  • 172,118
  • 50
  • 264
  • 308