[PATCH 1/1] crypt: streebog - carry test vectors to tests

Vitaly Chikunov vt at altlinux.org
Tue Oct 9 03:28:44 MSK 2018


---
 crypto/testmgr.h | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 54 insertions(+)

diff --git a/crypto/testmgr.h b/crypto/testmgr.h
index 9f9b7d6e4072..42eff1d2d3d2 100644
--- a/crypto/testmgr.h
+++ b/crypto/testmgr.h
@@ -2340,6 +2340,31 @@ static const struct hash_testvec sb256_tv_template[] = {
 			"\xc0\xca\xc6\x28\xfc\x66\x9a\x74"
 			"\x1d\x50\x06\x3c\x55\x7e\x8f\x50",
 	},
+	{
+		.plaintext =
+			"\xEE\xEE\xEE\xEE\xEE\xEE\xEE\xEE"
+			"\xEE\xEE\xEE\xEE\xEE\xEE\xEE\xEE"
+			"\xEE\xEE\xEE\xEE\xEE\xEE\xEE\xEE"
+			"\xEE\xEE\xEE\xEE\xEE\xEE\xEE\xEE"
+			"\xEE\xEE\xEE\xEE\xEE\xEE\xEE\xEE"
+			"\xEE\xEE\xEE\xEE\xEE\xEE\xEE\xEE"
+			"\xEE\xEE\xEE\xEE\xEE\xEE\xEE\xEE"
+			"\xEE\xEE\xEE\xEE\xEE\xEE\xEE\xEE"
+			"\x16\x11\x11\x11\x11\x11\x11\x11"
+			"\x11\x11\x11\x11\x11\x11\x11\x11"
+			"\x11\x11\x11\x11\x11\x11\x11\x11"
+			"\x11\x11\x11\x11\x11\x11\x11\x11"
+			"\x11\x11\x11\x11\x11\x11\x11\x11"
+			"\x11\x11\x11\x11\x11\x11\x11\x11"
+			"\x11\x11\x11\x11\x11\x11\x11\x11"
+			"\x11\x11\x11\x11\x11\x11\x11\x16",
+		.psize = 128,
+		.digest =
+			"\x81\xbb\x63\x2f\xa3\x1f\xcc\x38"
+			"\xb4\xc3\x79\xa6\x62\xdb\xc5\x8b"
+			"\x9b\xed\x83\xf5\x0d\x3a\x1b\x2c"
+			"\xe7\x27\x1a\xb0\x2d\x25\xba\xbb"
+	},
 };
 
 static const struct hash_testvec sb512_tv_template[] = {
@@ -2378,6 +2403,35 @@ static const struct hash_testvec sb512_tv_template[] = {
 			"\x3f\x0c\xb9\xdd\xdc\x2b\x64\x60"
 			"\x14\x3b\x03\xda\xba\xc9\xfb\x28",
 	},
+	{ /* carry */
+		.plaintext =
+			"\xEE\xEE\xEE\xEE\xEE\xEE\xEE\xEE"
+			"\xEE\xEE\xEE\xEE\xEE\xEE\xEE\xEE"
+			"\xEE\xEE\xEE\xEE\xEE\xEE\xEE\xEE"
+			"\xEE\xEE\xEE\xEE\xEE\xEE\xEE\xEE"
+			"\xEE\xEE\xEE\xEE\xEE\xEE\xEE\xEE"
+			"\xEE\xEE\xEE\xEE\xEE\xEE\xEE\xEE"
+			"\xEE\xEE\xEE\xEE\xEE\xEE\xEE\xEE"
+			"\xEE\xEE\xEE\xEE\xEE\xEE\xEE\xEE"
+			"\x16\x11\x11\x11\x11\x11\x11\x11"
+			"\x11\x11\x11\x11\x11\x11\x11\x11"
+			"\x11\x11\x11\x11\x11\x11\x11\x11"
+			"\x11\x11\x11\x11\x11\x11\x11\x11"
+			"\x11\x11\x11\x11\x11\x11\x11\x11"
+			"\x11\x11\x11\x11\x11\x11\x11\x11"
+			"\x11\x11\x11\x11\x11\x11\x11\x11"
+			"\x11\x11\x11\x11\x11\x11\x11\x16",
+		.psize = 128,
+		.digest =
+			"\x8b\x06\xf4\x1e\x59\x90\x7d\x96"
+			"\x36\xe8\x92\xca\xf5\x94\x2f\xcd"
+			"\xfb\x71\xfa\x31\x16\x9a\x5e\x70"
+			"\xf0\xed\xb8\x73\x66\x4d\xf4\x1c"
+			"\x2c\xce\x6e\x06\xdc\x67\x55\xd1"
+			"\x5a\x61\xcd\xeb\x92\xbd\x60\x7c"
+			"\xc4\xaa\xca\x67\x32\xbf\x35\x68"
+			"\xa2\x3a\x21\x0d\xd5\x20\xfd\x41"
+	},
 };
 
 /* Example vectors below taken from
-- 
2.11.0



More information about the oss-gost-crypto mailing list