SHA-2 Workbench  1.0
Test List
Class test_SHA256_power_1A
Repeated hashing of a sequence of messages using SHA-256
NIST-provided test vectors: https://csrc.nist.gov/Projects/cryptographic-algorithm-validation-program/Secure-Hashing#shavs
  • Input sequence 1A:
    1. x"11ae0cbfee7bb3df"
  • Expected output:
    1. x"a46d5f010e9664f21378c7588924682338888b2680d9b34506010610066dab59"
Class test_SHA256_power_1B
Repeated hashing of a sequence of messages using SHA-256
NIST-provided test vectors: https://csrc.nist.gov/Projects/cryptographic-algorithm-validation-program/Secure-Hashing#shavs
  • Input sequence 1B:
    1. x"86f15b8b677b7655f358a2c7fd5785bc84d31e079ed859b6af88e198debd36fccaf0ffbc785aa17a9158102aca14e6d0a362b28b54e892d2"
  • Expected output:
    1. x"eaec4af4f0632711ae6d78bcadb50eb53aee0d2e65c906cd903349750ea71c92"
Class test_SHA256_power_2A
Repeated hashing of a sequence of messages using SHA-256
NIST-provided test vectors: https://csrc.nist.gov/Projects/cryptographic-algorithm-validation-program/Secure-Hashing#shavs
  • Input sequence 2A:
    1. x"86f15b8b677b7655f358a2c7fd5785bc84d31e079ed859b6af88e198debd36fccaf0ffbc785aa17a9158102aca14e6d0a362b28b54e892d2"
    2. x"11ae0cbfee7bb3df"
  • Expected output:
    1. x"eaec4af4f0632711ae6d78bcadb50eb53aee0d2e65c906cd903349750ea71c92"
    2. x"a46d5f010e9664f21378c7588924682338888b2680d9b34506010610066dab59"
Class test_SHA256_power_5A
Repeated hashing of a sequence of messages using SHA-256
NIST-provided test vectors: https://csrc.nist.gov/Projects/cryptographic-algorithm-validation-program/Secure-Hashing#shavs
  • Input sequence 5A:
    1. x"9ebf93643854ea5c97a4f38f50bd18103fde2abdd77f5266b6914a317c07cc3cde954b85f6b8e207ddf68a267c678f4d9f7445d64bdff700"
    2. x"7da5f5153548eae21034efb7276e0a52d13c72df1ad2a2bf712dac87a140d04c034e4d1ef19777d27d360a05634abe5d3d541b12f6e08fa8"
    3. x"18537da0bf81cf55e38b8fbcfaa07ea36923c59e485cdc56656dab248c87efdf065de0f260d911b16e0e97ed8e6f6dc5313e17c098478600"
    4. x"cc29f1eb3b0237e815424c6c853ad0e16232768304f57009579127872d583093d92a7ba7f9f7cec6937f7262645c2d7e74437010ee87d0a8"
    5. x"294dee95f2146fc67870cd987d2e6e673ea320579b435d8d7870cc9f63900a487762ab6180927c0c608b0b33b18c6a31abfe2fce4805bf70"
  • Expected output:
    1. x"47ee6110b83273f2b966bdcd34727007ef4d20edfec7e30b8931669c6d1c05e7"
    2. x"9d6de887db0cd7a5ac51b0b4217ede80a3b83cb909824ebb0a90407e46906958"
    3. x"56f10bcc16149f5d8bc86f4b9fe3eafbb5213ea1e4c209b0463c751c61650e04"
    4. x"660cf7af3bce342d5ede084e3a6493747cf900583a5710f16e67bae8b5a95b74"
    5. x"edee1c1d003835c8f39be8a489cf7e50b70ed96fbbc41b36ae7e5dc937c74a13"
Class tSHA256_core
Hash a single message using SHA-256
This is the detailed one-block SHA-256 test case provided by NIST at https://csrc.nist.gov/projects/cryptographic-standards-and-guidelines/example-values
  • Input sequence: "abc"
  • Expected output: x"ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad"
Class tSHA256_core_multi
Hash multiple messages using SHA-256
NIST-provided test vectors:
  • https://csrc.nist.gov/projects/cryptographic-standards-and-guidelines/example-values
  • https://csrc.nist.gov/Projects/cryptographic-algorithm-validation-program/Secure-Hashing#shavs

  • Input sequence:
    1. x"11ae0cbfee7bb3df"
    2. "abc"
    3. x"9ebf93643854ea5c97a4f38f50bd18103fde2abdd77f5266b6914a317c07cc3cde954b85f6b8e207ddf68a267c678f4d9f7445d64bdff700"
    4. x"18537da0bf81cf55e38b8fbcfaa07ea36923c59e485cdc56656dab248c87efdf065de0f260d911b16e0e97ed8e6f6dc5313e17c098478600"
    5. x"294dee95f2146fc67870cd987d2e6e673ea320579b435d8d7870cc9f63900a487762ab6180927c0c608b0b33b18c6a31abfe2fce4805bf70"
    6. x"7da5f5153548eae21034efb7276e0a52d13c72df1ad2a2bf712dac87a140d04c034e4d1ef19777d27d360a05634abe5d3d541b12f6e08fa8"
    7. x"cc29f1eb3b0237e815424c6c853ad0e16232768304f57009579127872d583093d92a7ba7f9f7cec6937f7262645c2d7e74437010ee87d0a8"
    8. x"86f15b8b677b7655f358a2c7fd5785bc84d31e079ed859b6af88e198debd36fccaf0ffbc785aa17a9158102aca14e6d0a362b28b54e892d2"
  • Expected output:
    1. x"a46d5f010e9664f21378c7588924682338888b2680d9b34506010610066dab59"
    2. x"ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad"
    3. x"47ee6110b83273f2b966bdcd34727007ef4d20edfec7e30b8931669c6d1c05e7"
    4. x"56f10bcc16149f5d8bc86f4b9fe3eafbb5213ea1e4c209b0463c751c61650e04"
    5. x"edee1c1d003835c8f39be8a489cf7e50b70ed96fbbc41b36ae7e5dc937c74a13"
    6. x"9d6de887db0cd7a5ac51b0b4217ede80a3b83cb909824ebb0a90407e46906958"
    7. x"660cf7af3bce342d5ede084e3a6493747cf900583a5710f16e67bae8b5a95b74"
    8. x"eaec4af4f0632711ae6d78bcadb50eb53aee0d2e65c906cd903349750ea71c92"
Class tSHA512_core
Hash a single message using SHA-512
This is the detailed one-block SHA-512 test case provided by NIST at https://csrc.nist.gov/projects/cryptographic-standards-and-guidelines/example-values
  • Input sequence: "abc"
  • Expected output: x"ddaf35a193617abacc417349ae20413112e6fa4e89a97ea20a9eeee64b55d39a2192992a274fc1a836ba3c23a3feebbd454d4423643ce80e2a9ac94fa54ca49f"