SHA-2 Workbench  1.0
tSHA256_core_multi Entity Reference

Multi-message test bench for the SHA-256 hash core More...

Inheritance diagram for tSHA256_core_multi:
SHA2_core

Entities

Testbench  architecture
 Detail of the test bench. More...
 

Libraries

ieee 
 Standard library.

Use Clauses

std_logic_1164 
 Standard 9-values logic library.
numeric_std 
 Arithmetic library, included for the unsigned type conversion.

Detailed Description

Multi-message test bench for the SHA-256 hash core

Test:
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"

Member Data Documentation

◆ ieee

ieee
Library

Standard library.

◆ numeric_std

numeric_std
Package

Arithmetic library, included for the unsigned type conversion.

◆ std_logic_1164

std_logic_1164
Package

Standard 9-values logic library.