diff --git a/sw/device/tests/crypto/cryptotest/BUILD b/sw/device/tests/crypto/cryptotest/BUILD index 10b1dfab3438e..7c429ada9a68d 100644 --- a/sw/device/tests/crypto/cryptotest/BUILD +++ b/sw/device/tests/crypto/cryptotest/BUILD @@ -236,8 +236,6 @@ SHAKE128_TESTVECTOR_TARGETS = [ "LongMsg", "VariableOut", ] -] + [ - "//sw/host/cryptotest/testvectors/data:hjson_shake128", ] SHAKE128_TESTVECTOR_ARGS = " ".join([ @@ -261,8 +259,6 @@ SHAKE256_TESTVECTOR_TARGETS = [ "LongMsg", "VariableOut", ] -] + [ - "//sw/host/cryptotest/testvectors/data:hjson_shake256", ] SHAKE256_TESTVECTOR_ARGS = " ".join([ diff --git a/sw/device/tests/crypto/testvectors/BUILD b/sw/device/tests/crypto/testvectors/BUILD index 05fdc54ae22cb..5bc305b00b0ae 100644 --- a/sw/device/tests/crypto/testvectors/BUILD +++ b/sw/device/tests/crypto/testvectors/BUILD @@ -49,6 +49,4 @@ autogen_cryptotest_hjson_external( exports_files([ "sha3_224_hardcoded.hjson", - "shake128_hardcoded.hjson", - "shake256_hardcoded.hjson", ]) diff --git a/sw/device/tests/crypto/testvectors/shake128_hardcoded.hjson b/sw/device/tests/crypto/testvectors/shake128_hardcoded.hjson deleted file mode 100644 index 47d05272829fe..0000000000000 --- a/sw/device/tests/crypto/testvectors/shake128_hardcoded.hjson +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright lowRISC contributors (OpenTitan project). -// Licensed under the Apache License, Version 2.0, see LICENSE for details. -// SPDX-License-Identifier: Apache-2.0 - -// The following vectors are obtained from two different sources: -// SHAKE: https://csrc.nist.gov/Projects/Cryptographic-Algorithm-Validation-Program/Secure-Hashing -// CSHAKE: https://csrc.nist.gov/projects/cryptographic-standards-and-guidelines/example-values - -[ - { - vector_identifier: "NIST CAVP, byte-oriented, SHAKE128ShortMsg_msg.rsp, Len = 56" - operation: SHAKE - security_str: 128 - input_msg: 0x7216a825029da1 - digest: 0x9de6ffacf3e59693a3de81b02f7db77a - } - { - vector_identifier: "NIST CAVP, byte-oriented, SHAKE128ShortMsg_msg.rsp, Len = 128" - operation: SHAKE - security_str: 128 - input_msg: 0xd4d67b00ca51397791b81205d5582c0a - digest: 0xd0acfb2a14928caf8c168ae514925e4e - } - { - vector_identifier: "NIST CAVP, byte-oriented, SHAKE128ShortMsg_msg.rsp, Len = 1336" - operation: SHAKE - security_str: 128 - input_msg: 0x18636f702f216b1b9302e59d82192f4e002f82d526c3f04cbd4f9b9f0bcd2535ed7a67d326da66bdf7fc821ef0fff1a905d56c81e4472856863908d104301133ad111e39552cd542ef78d9b35f20419b893f4a93aee848e9f86ae3fd53d27fea7fb1fc69631fa0f3a5ff51267785086ab4f682d42baf394b3b6992e9a0bb58a38ce0692df9bbaf183e18523ee1352c5fad817e0c04a3e1c476be7f5e92f482a6fb29cd4bbf09ea - digest: 0xb7b9db481898f888e5ee4ed629859844 - } - { - vector_identifier: "NIST SP 800-185, cSHAKE_samples.pdf, Sample #1" - operation: CSHAKE - security_str: 128 - input_msg: 0x00010203 - cust_str: 0x456d61696c205369676e6174757265 - digest: 0xc1c36925b6409a04f1b504fcbca9d82b4017277cb5ed2b2065fc1d3814d5aaf5 - } -] diff --git a/sw/device/tests/crypto/testvectors/shake256_hardcoded.hjson b/sw/device/tests/crypto/testvectors/shake256_hardcoded.hjson deleted file mode 100644 index f5fad70c4bceb..0000000000000 --- a/sw/device/tests/crypto/testvectors/shake256_hardcoded.hjson +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright lowRISC contributors (OpenTitan project). -// Licensed under the Apache License, Version 2.0, see LICENSE for details. -// SPDX-License-Identifier: Apache-2.0 - -// The following vectors are obtained from two different sources: -// SHAKE: https://csrc.nist.gov/Projects/Cryptographic-Algorithm-Validation-Program/Secure-Hashing -// CSHAKE: https://csrc.nist.gov/projects/cryptographic-standards-and-guidelines/example-values - -[ - { - vector_identifier: "NIST CAVP, byte-oriented, SHAKE256ShortMsg.rsp, Len = 312" - operation: SHAKE - security_str: 256 - input_msg: 0xf532d0ece583bebaec55d030c93fcd43ad7c96a493ef15e7d06470e5eb19825fae7d8be47d3726 - digest: 0x225ace4d5140a3d75993ca8c7b993662030d046fa0201ee9c5c335d92b4d5801 - } - { - vector_identifier: "NIST CAVP, byte-oriented, SHAKE256VariableOut.rsp, Count = 1245, Len = 2000" - operation: SHAKE - security_str: 256 - input_msg: 0x8d8001e2c096f1b88e7c9224a086efd4797fbf74a8033a2d422a2b6b8f6747e4 - digest: 0x2e975f6a8a14f0704d51b13667d8195c219f71e6345696c49fa4b9d08e9225d3d39393425152c97e71dd24601c11abcfa0f12f53c680bd3ae757b8134a9c10d429615869217fdd5885c4db174985703a6d6de94a667eac3023443a8337ae1bc601b76d7d38ec3c34463105f0d3949d78e562a039e4469548b609395de5a4fd43c46ca9fd6ee29ada5efc07d84d553249450dab4a49c483ded250c9338f85cd937ae66bb436f3b4026e859fda1ca571432f3bfc09e7c03ca4d183b741111ca0483d0edabc03feb23b17ee48e844ba2408d9dcfd0139d2e8c7310125aee801c61ab7900d1efc47c078281766f361c5e6111346235e1dc38325666c - } - { - vector_identifier: "NIST SP 800-185, cSHAKE_samples.pdf, Sample #3" - operation: CSHAKE - security_str: 256 - input_msg: 0x00010203 - cust_str: 0x456d61696c205369676e6174757265 - digest: 0xd008828e2b80ac9d2218ffee1d070c48b8e4c87bff32c9699d5b6896eee0edd164020e2be0560858d9c00c037e34a96937c561a74c412bb4c746469527281c8c - } -] diff --git a/sw/host/cryptotest/testvectors/data/BUILD b/sw/host/cryptotest/testvectors/data/BUILD index e9dd61b2e6941..40072ddbd3821 100644 --- a/sw/host/cryptotest/testvectors/data/BUILD +++ b/sw/host/cryptotest/testvectors/data/BUILD @@ -324,30 +324,6 @@ run_binary( ] ] -[ - run_binary( - name = "hjson_{}".format(hash_alg), - srcs = [ - "//sw/device/tests/crypto/testvectors:{}_hardcoded.hjson".format(hash_alg), - "//sw/host/cryptotest/testvectors/data/schemas:hash_schema.json", - ], - outs = [":hjson_{}.json".format(hash_alg)], - args = [ - "--src", - "$(location //sw/device/tests/crypto/testvectors:{}_hardcoded.hjson)".format(hash_alg), - "--dst", - "$(location :hjson_{}.json)".format(hash_alg), - "--schema", - "$(location //sw/host/cryptotest/testvectors/data/schemas:hash_schema.json)", - ], - tool = "//sw/host/cryptotest/testvectors/parsers:hjson_hash_parser", - ) - for hash_alg in [ - "shake128", - "shake256", - ] -] - [ run_binary( name = cryptotest_name,