From SQRLauth.net
Jump to: navigation, search

EnHash is essentially sixteen (16) chained iterations of SHA-256, with each iteration's output XORed to produce the final result. The EnHash function is described in greater detail at GRC's Key Flow page.

function EnHash (input := 32 byte key) 
  output := 32 byte buffer;

  set output to all NULL (0) bytes;

  for( i = 0; i < 16; i++ ) {
    input  = SHA256(input);
    output = output XOR input;
  return output;

Test Vectors


This is a plain text file containing 1000 tests for the EnHash function. Each line is a test:

  • (43 characters) Base64URL encoded input
  • (43 characters) Base64URL encoded output
  • "\r\n"