From c8ddf09392d10b7cedbea159644cb39c92266485 Mon Sep 17 00:00:00 2001 From: Amir Vakili Date: Mon, 26 Aug 2024 20:40:27 +0000 Subject: [PATCH 1/2] Counter KDF: NIST SP 800-108r1-upd1 --- CHANGELOG.md | 6 + CMakeLists.txt | 3 +- README.md | 3 + build.gradle | 2 +- csrc/counter_kdf.cpp | 32 + examples/gradle-kt-dsl/lib/build.gradle.kts | 2 +- .../AmazonCorrettoCryptoProvider.java | 16 +- .../crypto/provider/CounterKdfSpec.java | 54 ++ .../crypto/provider/CounterKdfSpi.java | 66 ++ test-data/kbkdf_counter.txt | 802 ++++++++++++++++++ .../provider/test/ConcatenationKdfTest.java | 18 +- .../crypto/provider/test/CounterKdfTest.java | 120 +++ 12 files changed, 1112 insertions(+), 12 deletions(-) create mode 100644 csrc/counter_kdf.cpp create mode 100644 src/com/amazon/corretto/crypto/provider/CounterKdfSpec.java create mode 100644 src/com/amazon/corretto/crypto/provider/CounterKdfSpi.java create mode 100644 test-data/kbkdf_counter.txt create mode 100644 tst/com/amazon/corretto/crypto/provider/test/CounterKdfTest.java diff --git a/CHANGELOG.md b/CHANGELOG.md index 2cb8a381..4c64e30d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## 2.5.0 + +### Minor +* [PR 397:](https://github.com/corretto/amazon-corretto-crypto-provider/pull/397) Support for Concatenation KDFs +* [PR 399:](https://github.com/corretto/amazon-corretto-crypto-provider/pull/399) Support for Counter KDFs + ## 2.4.1 ### Patch diff --git a/CMakeLists.txt b/CMakeLists.txt index 31083958..b7c43964 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -285,7 +285,8 @@ if(FIPS) else() set(TEST_FIPS_PROPERTY "-DFIPS=false") set(C_SRC ${C_SRC} - csrc/concatenation_kdf.cpp) + csrc/concatenation_kdf.cpp + csrc/counter_kdf.cpp) endif() add_library(amazonCorrettoCryptoProvider SHARED ${C_SRC}) diff --git a/README.md b/README.md index 483f527a..1867d32c 100644 --- a/README.md +++ b/README.md @@ -87,6 +87,9 @@ SecretKeyFactory: * ConcatenationKdfWithSHA512 (not available in FIPS builds) * ConcatenationKdfWithHmacSHA256 (not available in FIPS builds) * ConcatenationKdfWithHmacSHA512 (not available in FIPS builds) +* CounterKdfWithHmacSHA256 (not available in FIPS builds) +* CounterKdfWithHmacSHA384 (not available in FIPS builds) +* CounterKdfWithHmacSHA512 (not available in FIPS builds) SecureRandom: * ACCP's SecureRandom uses [AWS-LC's DRBG implementation](https://github.com/aws/aws-lc/blob/main/crypto/fipsmodule/rand/rand.c). diff --git a/build.gradle b/build.gradle index b4885c51..0ed1c2d3 100644 --- a/build.gradle +++ b/build.gradle @@ -13,7 +13,7 @@ plugins { } group = 'software.amazon.cryptools' -version = '2.4.1' +version = '2.5.0' ext.isFips = Boolean.getBoolean('FIPS') if (ext.isFips) { ext.awsLcGitVersionId = 'AWS-LC-FIPS-2.0.13' diff --git a/csrc/counter_kdf.cpp b/csrc/counter_kdf.cpp new file mode 100644 index 00000000..ce165c27 --- /dev/null +++ b/csrc/counter_kdf.cpp @@ -0,0 +1,32 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 +#include "buffer.h" +#include "env.h" +#include "generated-headers.h" +#include +#include + +using namespace AmazonCorrettoCryptoProvider; + +extern "C" JNIEXPORT void Java_com_amazon_corretto_crypto_provider_CounterKdfSpi_nKdf(JNIEnv* env, + jclass, + jint digestCode, + jbyteArray jSecret, + jint secretLen, + jbyteArray jInfo, + jint infoLen, + jbyteArray jOutput, + jint outputLen) +{ + try { + EVP_MD const* digest = digest_code_to_EVP_MD(digestCode); + JBinaryBlob secret(env, nullptr, jSecret); + JBinaryBlob info(env, nullptr, jInfo); + JBinaryBlob output(env, nullptr, jOutput); + if (KBKDF_ctr_hmac(output.get(), outputLen, digest, secret.get(), secretLen, info.get(), infoLen) != 1) { + throw_openssl(EX_RUNTIME_CRYPTO, "KBKDF_ctr_hmac failed."); + } + } catch (java_ex& ex) { + ex.throw_to_java(env); + } +} diff --git a/examples/gradle-kt-dsl/lib/build.gradle.kts b/examples/gradle-kt-dsl/lib/build.gradle.kts index eead2716..d339d8ea 100644 --- a/examples/gradle-kt-dsl/lib/build.gradle.kts +++ b/examples/gradle-kt-dsl/lib/build.gradle.kts @@ -1,4 +1,4 @@ -val accpVersion = "2.4.1" +val accpVersion = "2.5.0" val accpLocalJar: String by project val fips: Boolean by project val PLATFORMS_WITHOUT_FIPS_SUPPORT = setOf("osx-x86_64", "osx-aarch_64") diff --git a/src/com/amazon/corretto/crypto/provider/AmazonCorrettoCryptoProvider.java b/src/com/amazon/corretto/crypto/provider/AmazonCorrettoCryptoProvider.java index cc7a4091..c0fa0510 100644 --- a/src/com/amazon/corretto/crypto/provider/AmazonCorrettoCryptoProvider.java +++ b/src/com/amazon/corretto/crypto/provider/AmazonCorrettoCryptoProvider.java @@ -10,6 +10,9 @@ import static com.amazon.corretto.crypto.provider.ConcatenationKdfSpi.CKDF_WITH_SHA256; import static com.amazon.corretto.crypto.provider.ConcatenationKdfSpi.CKDF_WITH_SHA384; import static com.amazon.corretto.crypto.provider.ConcatenationKdfSpi.CKDF_WITH_SHA512; +import static com.amazon.corretto.crypto.provider.CounterKdfSpi.CNTRKDF_WITH_SHA256; +import static com.amazon.corretto.crypto.provider.CounterKdfSpi.CNTRKDF_WITH_SHA384; +import static com.amazon.corretto.crypto.provider.CounterKdfSpi.CNTRKDF_WITH_SHA512; import static com.amazon.corretto.crypto.provider.HkdfSecretKeyFactorySpi.HKDF_WITH_SHA1; import static com.amazon.corretto.crypto.provider.HkdfSecretKeyFactorySpi.HKDF_WITH_SHA256; import static com.amazon.corretto.crypto.provider.HkdfSecretKeyFactorySpi.HKDF_WITH_SHA384; @@ -102,12 +105,17 @@ private void buildServiceMap() { // Once these KDFs are added to a FIPS branch of AWS-LC, we can remove this check. if (!Loader.FIPS_BUILD) { - final String concatenationKdfSpi = "ConcatenationKdf"; + final String concatenationKdfSpi = "ConcatenationKdfSpi"; addService("SecretKeyFactory", CKDF_WITH_SHA256, concatenationKdfSpi, false); addService("SecretKeyFactory", CKDF_WITH_SHA384, concatenationKdfSpi, false); addService("SecretKeyFactory", CKDF_WITH_SHA512, concatenationKdfSpi, false); addService("SecretKeyFactory", CKDF_WITH_HMAC_SHA256, concatenationKdfSpi, false); addService("SecretKeyFactory", CKDF_WITH_HMAC_SHA512, concatenationKdfSpi, false); + + final String counterKdfSpi = "CounterKdfSpi"; + addService("SecretKeyFactory", CNTRKDF_WITH_SHA256, counterKdfSpi, false); + addService("SecretKeyFactory", CNTRKDF_WITH_SHA384, counterKdfSpi, false); + addService("SecretKeyFactory", CNTRKDF_WITH_SHA512, counterKdfSpi, false); } addService("KeyPairGenerator", "RSA", "RsaGen"); @@ -342,6 +350,12 @@ public Object newInstance(final Object constructorParameter) throws NoSuchAlgori if (ckdfSpi != null) { return ckdfSpi; } + + final CounterKdfSpi cntrKdfSpi = + CounterKdfSpi.INSTANCES.get(CounterKdfSpi.getSpiFactoryForAlgName(algo)); + if (cntrKdfSpi != null) { + return cntrKdfSpi; + } } if ("KeyGenerator".equalsIgnoreCase(type) && "AES".equalsIgnoreCase(algo)) { diff --git a/src/com/amazon/corretto/crypto/provider/CounterKdfSpec.java b/src/com/amazon/corretto/crypto/provider/CounterKdfSpec.java new file mode 100644 index 00000000..7620e3dd --- /dev/null +++ b/src/com/amazon/corretto/crypto/provider/CounterKdfSpec.java @@ -0,0 +1,54 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 +package com.amazon.corretto.crypto.provider; + +import java.security.spec.KeySpec; +import java.util.Objects; + +/** + * Represents the inputs to CounterKdfSpec algorithms. + * + *

If info is not provided, an empty byte array is used. + * + *

The algorithmName is the name of algorithm used to create SecretKeySpec. + */ +public class CounterKdfSpec implements KeySpec { + private final byte[] secret; + private final byte[] info; + private final int outputLen; + private final String algorithName; + + public CounterKdfSpec( + final byte[] secret, final byte[] info, final int outputLen, final String algorithName) { + this.secret = Objects.requireNonNull(secret); + if (this.secret.length == 0) { + throw new IllegalArgumentException("Secret must be byte array with non-zero length."); + } + this.info = Objects.requireNonNull(info); + if (outputLen <= 0) { + throw new IllegalArgumentException("Output size must be greater than zero."); + } + this.outputLen = outputLen; + this.algorithName = Objects.requireNonNull(algorithName); + } + + public CounterKdfSpec(final byte[] secret, final int outputLen, final String algorithName) { + this(secret, Utils.EMPTY_ARRAY, outputLen, algorithName); + } + + public byte[] getSecret() { + return secret; + } + + public byte[] getInfo() { + return info; + } + + public int getOutputLen() { + return outputLen; + } + + public String getAlgorithName() { + return algorithName; + } +} diff --git a/src/com/amazon/corretto/crypto/provider/CounterKdfSpi.java b/src/com/amazon/corretto/crypto/provider/CounterKdfSpi.java new file mode 100644 index 00000000..7748df1e --- /dev/null +++ b/src/com/amazon/corretto/crypto/provider/CounterKdfSpi.java @@ -0,0 +1,66 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 +package com.amazon.corretto.crypto.provider; + +import java.security.spec.InvalidKeySpecException; +import java.security.spec.KeySpec; +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; +import javax.crypto.SecretKey; +import javax.crypto.spec.SecretKeySpec; + +class CounterKdfSpi extends KdfSpi { + private final int digestCode; + + CounterKdfSpi(final int digestCode) { + this.digestCode = digestCode; + } + + @Override + protected SecretKey engineGenerateSecret(final KeySpec keySpec) throws InvalidKeySpecException { + if (!(keySpec instanceof CounterKdfSpec)) { + throw new InvalidKeySpecException("Expected a key spec of type CounterKdfSpec"); + } + final CounterKdfSpec spec = (CounterKdfSpec) keySpec; + + final byte[] secret = spec.getSecret(); + + final byte[] info = spec.getInfo(); + + final byte[] output = new byte[spec.getOutputLen()]; + + nKdf(digestCode, secret, secret.length, info, info.length, output, output.length); + + return new SecretKeySpec(output, spec.getAlgorithName()); + } + + private static native void nKdf( + int digestCode, + byte[] secret, + int secretLen, + byte[] info, + int infoLen, + byte[] output, + int outputLen); + + static final Map INSTANCES = getInstances(); + + private static final String CNTR_KDF = "CounterKdf"; + private static final String WITH_HMAC = "WithHmac"; + static final String CNTRKDF_WITH_SHA256 = CNTR_KDF + WITH_HMAC + "SHA256"; + static final String CNTRKDF_WITH_SHA384 = CNTR_KDF + WITH_HMAC + "SHA384"; + static final String CNTRKDF_WITH_SHA512 = CNTR_KDF + WITH_HMAC + "SHA512"; + + private static Map getInstances() { + final Map kdfs = new HashMap<>(); + kdfs.put(getSpiFactoryForAlgName(CNTRKDF_WITH_SHA256), new CounterKdfSpi(Utils.SHA256_CODE)); + kdfs.put(getSpiFactoryForAlgName(CNTRKDF_WITH_SHA384), new CounterKdfSpi(Utils.SHA384_CODE)); + kdfs.put(getSpiFactoryForAlgName(CNTRKDF_WITH_SHA512), new CounterKdfSpi(Utils.SHA512_CODE)); + return Collections.unmodifiableMap(kdfs); + } + + static String getSpiFactoryForAlgName(final String alg) { + return alg.toUpperCase(); + } +} diff --git a/test-data/kbkdf_counter.txt b/test-data/kbkdf_counter.txt new file mode 100644 index 00000000..49e55973 --- /dev/null +++ b/test-data/kbkdf_counter.txt @@ -0,0 +1,802 @@ +[TEST] + +HASH=SHA1 +SECRET=F7591733C856593565130975351954D0155ABF3C +INFO=8E347EF55D5F5E99EAB6DE706B51DE7CE004F3882889E259FF4E5CFF102167A5A4BD711578D4CE17DD9ABE56E51C1F2DF950E2FC812EC1B217CA08D6 +EXPECT=34FE44B0D8C41B93F5FA64FB96F00E5B + +HASH=SHA1 +SECRET=47EA5D00826F111BFA468E899B0CA3FDA7C8336D +INFO=DBED14156E1826AA1D4D66469C64A32571701131B27A8C595E8C0595665478FCF1B95C76AE997DE6184C919F4B810D588548508CD4C457A541260725 +EXPECT=7DE374B5EF7240FD425B7CF7C54C29F4 + +HASH=SHA1 +SECRET=3B16654E2E89FF4ACC57A6C5C8AF8064807804A6 +INFO=05E16ED1B560C4C9C43267F12EE454DAFC0161BEDCE1A7D371EC17426D081EFE54AF8C2F2566D4EEA38AABAB91FB98FDBE16CCB6B114D677BCB00C66 +EXPECT=1D29A3D2499E9473DC62544D830BA773 + +HASH=SHA1 +SECRET=57E9FD6E0C54C90065593B44482342F2EA72C128 +INFO=BBBBEFD47C997609C4522F64BC94A028A5C55C471181C74FEF5A539BA3BE77674B4EED9BB5EA0995B162027164E38DC63CEEB0CE6F5E7730EBE3471A +EXPECT=9691F99B94F20F9C548276DE4EAF0665 + +HASH=SHA1 +SECRET=F7CA5241794B7E6BB242414431B04C704F00E018 +INFO=124690EBFAD3486989A0AE06A080208273B0A23FD5B706B4084A059AC769E7668E6C7A652E155B5EBC4A8325D70C25C73805346FD269FAEC8937483B +EXPECT=81369F6D72726BE58BE6429DEED8A4CB + +HASH=SHA1 +SECRET=B279F2098A21F15D34B2EDD452ACEC93985751E3 +INFO=96A4CAA2244B55D65448C1B701D3A1A6B6FF7DDDE45777D04B84944035E4A6C37B156B8D504C8B039F68E78EB98D2E1AE7BD9A137E3576206883E427 +EXPECT=4F9443CE7C76B8B7752ACB18B2F9B060 + +HASH=SHA1 +SECRET=5A720D9E92E76E47D7A63B94BDCCE70A1E2E45AD +INFO=EB7BE6F431C40C9E9A4AC3B2D511D7BBDB9B0E42AB6988A28D2333263EB86587FDE8D7E5F733E204627AAEC5CE5C7A83603612341B706C0F6B1EA95F +EXPECT=8164B4521BC9F09B8F4663762CF55B7E + +HASH=SHA1 +SECRET=433B7E6742BBD8040F7BAAA7882EB3BD9E9408B8 +INFO=67E84ACBDC0CBCA9C176A11CE6AF5F849AA17ECF97349DEF6B69F79C149FA4094630DAFC76BC69A66F1C68EB249C1DE2674A681AC0E2522BF5E760C2 +EXPECT=84D2C95EEEED9AE098800F337316E2A5 + +HASH=SHA1 +SECRET=C67BC860F8D775DBDE482B02918FCBA9C21DDAD0 +INFO=26D73E0BCEFB7E1EF62B675C263B7905B86B3DE8E923E40DDE9BA8A05DDE67C963A732A42281DAA93CBB76AEC6FE8D583C0A7DF035F8207E2E72082F +EXPECT=98E53AECF42D67E92861C2951D9D4F67 + +HASH=SHA1 +SECRET=88A2B39B436A45728838014D445F162FA9FD7B0A +INFO=F6647876BF617132A07C5C1B49A28EEC3C2B6A1074FD5142AAE132D533E4A172CB166EA89B7CB1CDD164C6FC7F254A06035B2B1D28AC45FF0871AE04 +EXPECT=37808EB40AF34454AD4DD6750BDC8E73 + +HASH=SHA1 +SECRET=C1EFB8D25AFFC61ED060D994FCD5017C2ADFC388 +INFO=B92FC055057FEC71B9C53E7C44872423A57ED186D6BA66D980FECD1253BF71479320B7BF38D505EF79CA4D62D78CA662642CDCEDB99503EA04C1DBE8 +EXPECT=8DB784CF90B573B06F9B7C7DCA63A1EA16D93EE7D70FF9D87FA2558E83DC4EAA + +HASH=SHA1 +SECRET=7E925CDCBC2FD5B3213CBA7714CB71D359936109 +INFO=1F95A577958981B7477CA2A71D44E66564E5A56D8189542718EB1ACE81436E16F4158789A46D19D4384E15555BC3B4FFA10B5471AC33BF904982F49E +EXPECT=557B5E1FE770B4C76EA0CCD31F5C1DD4FFA0463A8CE9FA04F7F5D1AA53380043 + +HASH=SHA1 +SECRET=98B6F0B4B7A822E8F567A32D27FEBDA9E46217D3 +INFO=E08A61238719B21FB5F6361F215EB5A5603233BF73A101F32F0963974C0117FC22D024D8193F19FE095CC873AFC7B89888CBE41762E7AB6E8B783A00 +EXPECT=5504793A62976E77B1F3F8BBEBC5854E1538FA002A98AF5B935D9850B65F9A61 + +HASH=SHA1 +SECRET=BA3E6131CF924C0E67BE01205DE07CC8C77CB94D +INFO=9D13B23FEDB18BAE4DFCF8C3F6070E83EA87A1ED20A4013737229E05F6C1F8F26B384A2CEDA37D632595156ABCB2120BDE03CC3AE9F3E58BCD9AE525 +EXPECT=5A4841A14A12F04C65AD5E60C9F10E4CED3AFE9EE10AA8AED66BA629D86E213C + +HASH=SHA1 +SECRET=5A3B55D4A4897A1F5AD4A3A5E2259CCD7B2FF62F +INFO=F02EF61961BE2DEFC3CB9064F30F9FD7CA80174AD3F60E02DD7B64528B6F4018029864555D3AC03E4215CBDDBFB4F258A26BEC46507A9CFE055437F7 +EXPECT=CB09826916E9B73BDDB6BF25E6CAF5B6856F88D51DB351FD8315E29088985921 + +HASH=SHA1 +SECRET=7B9167E2F62F379659AC044F450AEF7BD5E938C6 +INFO=F433E8F177D8FD5743ED5990A8A0EDA19AAE08DB11DB6F82E4E1DEE67D699F9E11D29D6D7DA8F06EB7E973F3A133FD54C0E40A445B5803D5AB366537 +EXPECT=44BBB6978694B107716347D6C674A634597CFC51A825B19C236DF68C3F409884 + +HASH=SHA1 +SECRET=6F9D1E92A8F155C2C71CA9D6860FA4DED3B5E01C +INFO=D2EB8E67B3118569162850CD849732242C2918554C4CF861948168B8DB783D45BCFDCEDB55BA9AC90E3914328333B5F12CD5548EDCB11E8BFB3F405F +EXPECT=CF4E88BB3231F905E403653FE9661836A325A00A3914EBE1923562505A1F00AE + +HASH=SHA1 +SECRET=8B20D1F259C52CE5AEB06A824966955110145A8F +INFO=43D9DBBF085414BEBBCAE8AAF890AB14A90FD925A582B010F9C3A08A3E10A897CB5AE809982C558B65F7C15FE7A316D5417F26C273075CAD5701D15D +EXPECT=4E2338976E7832F16FCDF06FD3DC4BD777D170CF56F6A8E2117435CF05D2B5F8 + +HASH=SHA1 +SECRET=693B557C8FD4054A8176CFC31B681815DBE07180 +INFO=8E948A3451AFD83B6041576D959456BAC97B9F93A3D133198CDA273D846F7B8BC9AFD19B8320C3C50859C292EBF967D88EA09124B333B1443163F18C +EXPECT=359B213884B0AA5650353A53FCBFBE5B0E0014F367CC2D430D7C437A3C09326C + +HASH=SHA1 +SECRET=FFF0FEE2364B5596F7388EC0021DDBA8CA94FB20 +INFO=5E40CEAFED97475454F581ECB848BAD010AF0D6783B32CE86BEC57AF6E5F05D6C731911F526ABAF49596D5FF0B29C20BBF7B849ECA058B1EABC60D64 +EXPECT=4BF749512E8493F2BAEC602BD1FB1DF841CC92496BB28C05363F77A4F2A54BA8 + +HASH=SHA1 +SECRET=E02BA5D5C410E855BBD13F840124273E6B864237 +INFO=B14E227B4438F973D671141C6246ACDC794EEE91BC7EFD1D5FF02A7B8FB044009FB6F1F0F64F35365FB1098E1995A34F8B70A71ED0265ED17AE7AE40 +EXPECT=F077C2D5D36A658031C74EF5A66AA48B4456530A + +HASH=SHA1 +SECRET=D1BCDF028960195CECF478B9E861EA243962EBE9 +INFO=EC4B12610F46F7FE4411E39AB28619EBFFEE6DFC638E4E938EF1E04342D75DEE121B375BE292295704C0908AA61B488F6A29AB106468134E71B5439E +EXPECT=09D71D8AEF2D34E552F9BE25FCFA60F87F5DB6AB + +HASH=SHA1 +SECRET=D1D2A910D689848FD220FF30177C690395842C69 +INFO=E8CEFEE65EB88095B6FC81D9313E35B490946F9F114AFE236D5D89277740E500FE50C2B900B6C9139B0AD93F398801707189ABF3BC73779D46FBC012 +EXPECT=60D8206CE28E33C67A884F0DCB8AB70CF55DA75F + +HASH=SHA1 +SECRET=887B74B2C8A6EB888FC389CC2DA1870F04047472 +INFO=C95FE491B7538A9D69E4CE3FFFC6C79AD8BB14CCB5FBBFB0A371ED6C018640B96382A57B23BAAE3F4D783A3D21D5B9D9E111A244C960118A22269CDD +EXPECT=F6602DE3DFCE074FE322D267C99A508A46CF2562 + +HASH=SHA1 +SECRET=F6AFA445041C7073A74C1FB92E915143F2F80BBC +INFO=07511C89C68A9ED06D525DFAF84E5115E60789200F8692EB13B2069900C2F88AAFCBB0B759A113E7FD65F7EF57913419B54DFDFCBFB48A9DD7B14D19 +EXPECT=23264C430FEE98C67796483A203861ADBB9C418F + +HASH=SHA1 +SECRET=EE5F23363E74A7F46811BD78E306DF6D0D546A41 +INFO=2793B5A9CA4723093944B9D585744A41D4E037F6B774A94E8D94EA43C92CFFE4E142BE1539EF9B30765BE3B8ACA854BCC4F300DE400C4FEF345B5F17 +EXPECT=9ABA4A847A411483BE6ED032B10213F1058A2E85 + +HASH=SHA1 +SECRET=D20FD65C2A15B99E189274DE5639B30D9D9DB4B7 +INFO=52D32FC17DC3827B316FAEDB8B8FDE901B35576FDC87669A685F20B1F8B2DE059F75634ED7B07BFDE390FC970B6D1D686DFB60E3BA968A84F161FDB8 +EXPECT=E9B534C532601378BE46880716F797156B9496F2 + +HASH=SHA1 +SECRET=8025B3590CD514C2F95DE9CC9003FF825622EE30 +INFO=170F08FB74DA631D2A8935EAC2E0CD59FF83F733D298930B6C458F7F8822FD621356861D0B98D0A8B137A1987C731199FFD4EFBEABC99C2A65810F84 +EXPECT=587E581D9E59418D57EAC0ABF93D9405CF4335B1 + +HASH=SHA1 +SECRET=9BE97630193F094DEC260D4CD87CCE72F66DCE58 +INFO=C5DFA14DF472B472A4BCA208C6D822E7FD46716ED1AE232CF335F6672335E1FCD40229F8C90E42E4833DA0AC9CA3702E79576079050E1762C2A940A7 +EXPECT=50E16BC16B54C8693B91A6AD362B255C2A7C684A + +HASH=SHA1 +SECRET=A8FB15282F90F49937B5ED6427660C37B3069583 +INFO=6570AC2DC0CD78465803341C29D73FBE5AB804B21F677FAC533218AD967749FCDDDD83F74A43839C64B073DAD3B430A4D199527A794F0F56987EA917 +EXPECT=7DBF26FB3A07AA3EC4B5739F3E08FD2B2D1D820B + +HASH=SHA1 +SECRET=693ADB9037184627AD300F176985BD379F388A95 +INFO=7F09570C2D9304EC743AB845A8761C126C18F5CF72358EADA2B5D1DEB43DC6A0F4FF8F933BEF7AF0BCFACB33FA07F8CA04A06AFE231835D5075996BE +EXPECT=52F55F51010E9BD78E4F58CAB274ECAFA561BD4E0F20DA84F0303A1E5FF9BEBC514361EC6DF5C77E + +HASH=SHA1 +SECRET=70EA0FFE1CD76DF86B78150993ABCF5F86E2DEEE +INFO=AF780B1F4C00B555761937FC569533710DC6C6B76C1B956C9B02ACF8727677D36C396ED1F3AA6671105C8F16C8DC75C1F7262BFB3DDEB80B96B3DF81 +EXPECT=780BB40A387ABF54A92AB91D24F3151236E9AFB8E826866F4433C32F0C6BE4EA347A78E2335F282D + +HASH=SHA1 +SECRET=EEA784C3E3181AF8348385456878A775C3A41708 +INFO=51D601ECB9CABB4C5CC6348983A1D24344831812F6D3559399396418FF8824B7EAE36350BB40DD66EC0677F49B5F5AB9805CB272562ED5C7CE0B30C9 +EXPECT=2FD6DC21E31CEE812AE3738CEA9F7C2A121C0A0F4B985B1D506EFF72FDE7FB6F0948C92A86B4B525 + +HASH=SHA1 +SECRET=3BE6E8A3EE32F99313A5B8A51E23E355812A4779 +INFO=30C3F68EE6E2FA79E892680A699831134E04099F99ACB76E35437CCDF1950EFEF3E7BDCDD15F5DFFDF4825E288323FB7789EB1C54B38A6D8B50EE5BC +EXPECT=0059FE3650673C2192A8D7746B6EFC8E069E42CC6AD9A10C46B6B741CC7D1DF04BE7E0FF805F0C26 + +HASH=SHA1 +SECRET=9ECA5318091614B60A3E44F69BA28F411EA990E8 +INFO=1079043F6F6DD21F7269A3C4214AB4D75282EE64F913E9ECC668192B6214FB12743EA9B687ECDA79D4CD97C2F78D9267A508FF46B95B0C8F1F31AEFB +EXPECT=D8575B817887183D95E92FF4ED887E52EE15BD75820DC1A9AE753DA6B97FCD6D82E8F457C2036770 + +HASH=SHA1 +SECRET=F9DFC13F0413C469F04135FAC630830F31ED82A9 +INFO=B663C6CDE0E3B5B0341F1905D19D58EE2E8DA999D788D34D4B8B4C091D97DCC73C1093169CC1D37948774FEC2CF08964D2EFD82F71A4407288A29C24 +EXPECT=4CA390CCAFE9D66D4B43A02CC337C3DD74D7BE5C49BEFF5EC4E139B2DD38CA695AA87B11B96031CE + +HASH=SHA1 +SECRET=EB0A4598FF09189A9136A97BBF8718A0CD673386 +INFO=17D388AE1CA1F603422E5E218E1AAA9E28BF24A794F073661327412206F2A2A6EE5EC0DA1BFF02DEE876991AB9DBC69E30E7F2596750B7D974E21CB2 +EXPECT=0AB9FD6102904D02D1CC3A31FFD8947444D1A15669847184540B408C072052504E066E4C995A388C + +HASH=SHA1 +SECRET=18A5533DF305E0217B622CD1DB488574D835FF73 +INFO=FF2E2C3E28BBF915B15E58E59E5FC2A49705D7EB17A84D9B410A84F2BFBE493DE705EC43491D570ACBB958AEFC4BEBC47AE7B2BC189D42EEA3C7188D +EXPECT=2830800C092C409CDCC73424A032456D05386FEFA101F01D69D5414FD22CAACFB23B9CCF7730504E + +HASH=SHA1 +SECRET=25C999C2BC65F3AEA03A309DC8CC8C000A11ED96 +INFO=FA7C3D22F1BC8EA5918FA71ADA7AC52EEC0D3C19F25D177A3DBB14FB3F369F52DD35F5430600C877850870A2021B15E426744569136E3A075419C3DF +EXPECT=1BA4EC321ADCF193C10B3D09BEC935E0286634C6579A95EFD492E812D085CC93C53AD29582247C45 + +HASH=SHA1 +SECRET=5A254A0DADA84BD3AAA5111A1191E654DBF9E728 +INFO=3583D0B1D0D70F26DBDDAA1DEA74E4986285185FF21333AD44935BCF68953F1D6DB4686C53BD6521C590CE9082E282C9493B2C7BC1F99D9F89D3EEBC +EXPECT=263FE62A0442DF8230D29EF860276D3A1A3F7E7216CEEB3813CD522EA2FA81B3E4AA4B08D7117975 + +HASH=SHA-256 +SECRET=DD1D91B7D90B2BD3138533CE92B272FBF8A369316AEFE242E659CC0AE238AFE0 +INFO=01322B96B30ACD197979444E468E1C5C6859BF1B1CF951B7E725303E237E46B864A145FAB25E517B08F8683D0315BB2911D80A0E8ABA17F3B413FAAC +EXPECT=10621342BFB0FD40046C0E29F2CFDBF0 + +HASH=SHA-256 +SECRET=32C4003872A146194023EAC1BDA74DDF2B66977DAD8A554B974CA2A62F7E4F43 +INFO=33D8CF6D0C759FB622D867EA8CF1285DE4020AF81CC287ADDF38CC2DA4643E6DB3B215AD3E33BFC47877C3620E336887C3C9AD4A1C6C0476B0F90A33 +EXPECT=F593AF0E1A492A7B904A2662897FA1C1 + +HASH=SHA-256 +SECRET=3C87E9CC98579B2749FF92C8B823A2AD6B367AC26622E7B5B80A2CE6F450E361 +INFO=777D66A24C2D3CC3299CA0718F4F6DCD1161ECBEF6EB3C71F0BC145B4E765A6EECE807A74CA7A698D55B2EB0D30D8D3E5CD71FD2A02B5608274C95C3 +EXPECT=EA6425F03803F2F06C42D8BA11CE4EE9 + +HASH=SHA-256 +SECRET=DE1F4ABFE78C4DD6F02331C057EFA939AE2DB1F1E7E7C650E07537D259B1EA72 +INFO=4C1F00198D76F3630D3260F56D94F52507394F4A98CDC2937D4ABAA76EBB3FD409A8769DF074DC002917EF818A4852CF004F0225EFC4663211A08C5D +EXPECT=74182AE81EE88C6A1634FF4991BEB9EE + +HASH=SHA-256 +SECRET=8C299BEEAEA05F445D59F5C354DBD0C8B4CD009F197A35369FB3B8612B75026B +INFO=1A73FCE114CB427DFAA6A699AB2751BF7136FA03D238DA492D9A036143148334294D0BDBE4852C8FF37706BB27D722DDF909BC8BEF91AC72E1841CAD +EXPECT=16614F3E848515CBE526FD2B1B5A0BC3 + +HASH=SHA-256 +SECRET=FA1F4C6CA4268480527B37CC1635B69D4A07118F720C60BD13CEDC867DFC2754 +INFO=464516D6F8BB6589928849B984BEA6DC3A45A3E3CBE9B27A95E94801C718901764D78910E72E5FE69860E76E8F2BBBA9298676E8A86B3D63563B45A2 +EXPECT=67507B8FBC813D2387F69BC4D3BDA44A + +HASH=SHA-256 +SECRET=AB12CA4709CA38350CAF5602EEE5218EC950353D19E65DE9EFC4DC2D19FE3017 +INFO=A8DA5B25E4F292C149C88F9203C5370822193CDAC135FBCD6B03F42300B8C372F68520DD3B525C79AA25F250B786E6DE7F5D73B5FB46C987671C7F76 +EXPECT=A7F44187D4EBE759B9A37E484A844E2B + +HASH=SHA-256 +SECRET=12A9C4B3921B4EC2754E1CF093A38A98702ACF0B8EB30F4BF654B8E3A10D3990 +INFO=C5170E6E67CCEFEBE8415EE2FB6429DF37D6C2EE8FBDD6B970C3A98D486E8718C2202F7FC09FE438D53DFDAEEB0874EF0FD7B4DFA209CC9C5C512BAA +EXPECT=9D1A3121760B17EA787E0F64C90BF109 + +HASH=SHA-256 +SECRET=218B0F76980954CC381F2646636907E702078F7902A1894952966547ACE91B19 +INFO=16CB8BEDB363B4795153A105C6049291F1978E7B2AAB01AB64E29C9BB562418CF3AB4F1EE6111D5ED2E58EBE3AD9665588E0E4D9DEAE8524B5B79ED8 +EXPECT=80175FD5C9CA252C52BDCB5302DE3DB1 + +HASH=SHA-256 +SECRET=3433F2C53824D6EEBE11E11EB656DA9740C5A342F5769DF7FE17C4C4801132CA +INFO=07E3F8FF03E6AF5AAD503CACB1DB119D3178BBD3E2377888D6F5E6B7BF7B8F7C563A88AA8A778848F4DC01B29CAF85A3B2307E3CDFE3DE1E7043DDEF +EXPECT=AE81916CD3641C59897512649B657252 + +HASH=SHA-256 +SECRET=E204D6D466AAD507FFAF6D6DAB0A5B26152C9E21E764370464E360C8FBC765C6 +INFO=7B03B98D9F94B899E591F3EF264B71B193FBA7043C7E953CDE23BC5384BC1A6293580115FAE3495FD845DADBD02BD6455CF48D0F62B33E62364A3A80 +EXPECT=770DFAB6A6A4A4BEE0257FF335213F78D8287B4FD537D5C1FFFA956910E7C779 + +HASH=SHA-256 +SECRET=AEEECA60F689A441B13B0CBCD441D82DF0CF87DAC236290DECE8931DF8D70317 +INFO=588EC041E5733B7031212C5538EFE4F6AAFA4CDA8B925D261F5A2688F007B3AC240EE12991E77B8CB8538678615966164A81872BD1CFCBFB39A4F450 +EXPECT=3E81D6113CEE3C529ECEDFF89A6999CE25B618C15EE1D19D45CB376A1C8E2374 + +HASH=SHA-256 +SECRET=95C8F76E11367EB55526A2B393AE906583D1CBDD47962146F506CC7CAC12F464 +INFO=CAD60E904B9E9C8BFEB4A81A7F67D3BDDCC05E64255870403770F3533AE6DD634CEAA56C53E688BD137AE6018935F34B9FB084EA48E4C688F6BBB388 +EXPECT=CAFA5CA03F5FBE2A242004ABCBD3DE1059C7407B1EE579255124AF189BE0B556 + +HASH=SHA-256 +SECRET=4D05391FD6FB1E292E78AB9619B1B72A7D63EE59D7435DD71897B9FF7EE7AE70 +INFO=F078E6F9B7F82D64554FA6B604C808F19B1F6AD6727DB7AA6F1C86694E104B5256C8B4039919646481D7EA2452C72C17A3E8D7D3916285460AA5EB81 +EXPECT=6B16E8F53B831AA5E86BF97A5C4FA37D089BC172DA5A1E7F662DD4A595339AB7 + +HASH=SHA-256 +SECRET=0F68A82FF1671634CC9136C564A9E02A767621DD74A1BF5C24129B808214B752 +INFO=648599809C2C4E7C6A5E6C449F0031EBF55C3661A895B44DB0572EE88083B1F4B12602AA55FC1DF150A65A6D6EEDA0AA79A434A1039B91B5A58FC7F1 +EXPECT=E297640F7768485D4A6E7CFE245F8BFA84700D99762692EA1A425CCC0275E8F5 + +HASH=SHA-256 +SECRET=43EEF6D824FD820405626AB9B6D79F1FD04E126AB8E17729E3AFC7CB5AF794F8 +INFO=5E269B5A7BDEDCC3E875E2725693A257FC60011AF7DCD68A3358507FE29B0659CA66951DAA05A15032033650BC58A27840F8FBE9F4088B9030738F68 +EXPECT=F0A339ECBCAE6ADD1AFB27DA3BA40A1320C6427A58AFB9DC366B219B7EB29ECF + +HASH=SHA-256 +SECRET=E5F31D98A13F2390B354DBA08E1E85116F99A56C2E8761D386958A0D0A888A29 +INFO=02113F45151B63F374CFCDB1BEDE41CEF2226A42B6C02C9F090F9F3DB39D4E98A8258C42E27224279CD45C2501CA45A008D8F38915E5B45B8B995F5B +EXPECT=98E7A023092A3064050902C8B90C749D72005626E0296E1DFB28C10E450B2DD3 + +HASH=SHA-256 +SECRET=E6CFA4864D31FE09960FFF968AC62F03B6F63B5A221CC95C3A1058B4B60FE9BC +INFO=4670A7C2C8F5643B75EA4CEED87E253E58FFAA87472299160D35240753F3164C0820374B1F4BEDB2DC34692C8B7E06C7951EE73F1645B10E3F272D17 +EXPECT=4F208E7306B076BF06133F439A6617A3D650253CF87775C3D6D7FEDE32139F4F + +HASH=SHA-256 +SECRET=2F180B1A10445D3D29683B3FACB856807689C6DE54C760F6050C3329A4A1DE4E +INFO=4D48CA49A279A79BF9B3A9E346C3AF74926FAB6AD881027DEE6A6F40DCF67ADD04EFEC4D86DF31BBFC190D43E3A7AEEA9BABCEBAEAD3B07B69DD3D6E +EXPECT=7765D245FDF143B6CA4359A2503AD1D8EA8CAA7DA8D556B1FE8E25C44C70DBE1 + +HASH=SHA-256 +SECRET=2EB0A49FD3199A57264F746B1C8ACBC76F7CE51223F72134590FBBEB3176264B +INFO=980A908ED38B6E699DF3F44E651F0AD3A9D209D3867C495E52673855D09E4F1A58FB477067C400CACCA9AB9260E205C4556905F2727925561280639C +EXPECT=06D5ADC2D5C517BF40406CC6BB56553B222F70ABF2BB505584000E88628BAF17 + +HASH=SHA-256 +SECRET=DC60338D884EECB72975C603C27B360605011756C697C4FC388F5176EF81EFB1 +INFO=44D7AA08FEBA26093C14979C122C2437C3117B63B78841CD10A4BC5ED55C56586AD8986D55307DCA1D198EDCFFBC516A8FBE6152AA428CDD800C062D +EXPECT=29AC07DCCF1F28D506CD623E6E3FC2FA255BD60B + +HASH=SHA-256 +SECRET=7A7ECEE4F04C1F5453F29B8C65BEE909F673C44F65E8F9CC18C31C32E9BCFC5A +INFO=0E2B53DD63008E0663962A25DA9CD55FC2EA377148783DA229FF7E3BD6142A43C854B6B5D06D87B535936F1EDC7CD067E8DBBA220A1F9A5932B32A64 +EXPECT=96FB8EF9380AC9DE2711EF5A83249E608DC7BFFC + +HASH=SHA-256 +SECRET=DE71295DC50AC76EB5579410869E918B7BE757AFA606C509BE4378BD98EDA686 +INFO=33CA974F8A1A065B75090C34C948449910495611E28ECC62CED29E5B3AE76217E139267041BA40BE235DE130438C1B14AA833296EB8E4BABE2101010 +EXPECT=385D60538090A45A2B2544275905C4C16E9F23E2 + +HASH=SHA-256 +SECRET=389DE0B914661C8AC9AAF11D261F6261BAF4652886CF20D2B13DF67BE2E3B185 +INFO=92B3D47EA042591DB5B531907E09A45A60A9C5C5FE0251806B7805B641C5B3EBCDE14D6CB542B4CB242B04F5A9B60B2C66D1A24C66141FE0B818E93C +EXPECT=B12A4E200180D20DA404B44C952639A955DD83D0 + +HASH=SHA-256 +SECRET=311AF73874E13A8ACAD981490113934065B3BD5D448E2BB8DFA68B70C69D7D45 +INFO=EA20FC9D32CDDC78DCBCA2EAD6C5C66744DA85D95B643D3FFAB2D0E2D5677DD3A27313153B019CFCD33B3E305ED66404042B2DB0E3DE2267CB557FD8 +EXPECT=C6E86D1043333FB690AD23274A908204D6BCBBAC + +HASH=SHA-256 +SECRET=756F9980CBEFEA398350B886CA4C1B2910708B5B8154A0EC4B9648AC77B9D7DC +INFO=3F09AA15D2FA769C6E8A3380BC55844827BA3EA64CCF177BEB4BFBD5142B3963BF696803A89974AA7D5AF0192CD525A83B71CD8EE7B0BC92F07B9515 +EXPECT=E3BC62B38A7B3C7E7FCB9EF007AA4AD6A9BB519C + +HASH=SHA-256 +SECRET=AE815BFE220407BCE6638F20AEFA109B63C7382E91D7BB8B010ED7C6D8D3757D +INFO=A221F1A3623ECA5F6385B57E7AFE67D134011C6058E3977DF977BDF0C7AB0E14B6D5C059F39948982912B047D00103DC4836E59B7A470222DBAE72CA +EXPECT=ED5E876D76227D0A7F1ACF5CA08C812995303FB2 + +HASH=SHA-256 +SECRET=D5110C808A951C5FE36AA4852FBDE7E0BC372A2C69A35ACFC890CC9FF78E40FB +INFO=F45187072A7D78FE91282F5825DAEB256A28A818C70A285262B080CD3EE2EC785125B27E4026AC9688A5EAE657DB578CD207956249F04A064870D677 +EXPECT=0E7DE25FC559969C08D973AB40795DF74E51965D + +HASH=SHA-256 +SECRET=4AA25A61F8B31F061E0FC1D541DEB20E097663CC57054E1F9A347989D8172D62 +INFO=E473FE5877FA137C50BEADC2295187F1B66E35C80B7864BF01C1C620FC09893991500E9A93851AE122170911562BF6EE3C75D5DDEADED27814623D2C +EXPECT=E235FF72D9C0A64A80CD86FDB26F1CD8740E2704 + +HASH=SHA-256 +SECRET=26B29556106C06A85C6950AAF20B5E08A523E80E198A725B69E23FE93BD2E16D +INFO=BD973F9BC6FF0226B2ACC682E0084B8C67B285EA9B8B838938D18F96DE84521FE47D560337115F8232D765166751F1B7026E608D25EC6504346D106D +EXPECT=E23B197D4D5FD8081CA54DD86A1D459CCA7C69B0 + +HASH=SHA-256 +SECRET=C4BEDBDDB66493E7C7259A3BBBC25F8C7E0CA7FE284D92D431D9CD99A0D214AC +INFO=1C69C54766791E315C2CC5C47ECD3FFAB87D0D273DD920E70955814C220EACACE6A5946542DA3DFE24FF626B4897898CAFB7DB83BDFF3C14FA46FD4B +EXPECT=1DA47638D6C9C4D04D74D4640BBD42AB814D9E8CC22F4326695239F96B0693F12D0DD1152CF44430 + +HASH=SHA-256 +SECRET=22256CA571D5C896DB80A8758FF81CF8631D2BC38C7E76F3BAFB0C2AF540A356 +INFO=9DD2DCD97B926251B50C6111D988E2951B02ACCC143702C88920CF36848F7C731756AB0537CB26E22725F11DE069E5335802B0CB56C158DD75014791 +EXPECT=A11AA3B1A93D2CE117550866C28D6974CF626719385B8868101A71A5D2AA793BC23C3CFDEBE52EC9 + +HASH=SHA-256 +SECRET=8066E057E73296158ED5479848317AD5E64EE8FB2E54D4EF85B7792F57F6F887 +INFO=16DA06E7360E4C27419B5F697E4C8548925CE55B53AD9E5E85B94C7F8E57AD142A1A0A0384337B1ADF6410EDCECEA921152B94D6B23A192CE6F602D7 +EXPECT=6EBEF64B358050EDC3C841F52188C5E442CB69630FEC0BE5114816AF616A333F0AAC5153E9265AA6 + +HASH=SHA-256 +SECRET=56F06CC0BC392AB108696C7DF71495B5A5CD3638E0A92045AF7CBD3076F6DD18 +INFO=4FCAE8F32B08B8FB746121A2DB2BC99FBB24B9FF11C60A1DC91F14AD9A60C6BAFE4ADB4DC160E9901EEEEB212A147EE0A7E76D4AEFA427F66A205C86 +EXPECT=CCDA8231FA5C0702BA282A8F18A0C1DEC6BAEF308625FB8F504410522C3F3B6D647C177054317A07 + +HASH=SHA-256 +SECRET=617F1B6810C551AA5C21878B00656351466069D41ADC7FEE1CED3F2F3432435C +INFO=2113F7005C580B77060990C2A3F9E8C8825F0D7E93A3F69F208EBB5B97C488DABD0DE7C7F00E08B4515DB2C02E1824F96E71C9A21A18079C4B649D81 +EXPECT=0325B1C85F3D25AD5EBC2E7B380CFEDE6B3C8ADA1AF0D0D5BCD9D2B34C29083115168B8AEF54C584 + +HASH=SHA-256 +SECRET=659EDB9A0DF51A3867D4AA01F74F60B7B151B01A3437C2F774FD37B6881A9CA4 +INFO=3FB60870A5813BADFD7AF948C3C924BEC05C92D540140BF28F2546825C5FBD40F1571493A178467FDA9793F2F7EED45B40EF68E0107B8D74C0CF32E4 +EXPECT=5C12C7B6EC38F516F72E76689C3106EE00EE8C2F50862CBF7FCB74BF8798EB761A33838788E276A3 + +HASH=SHA-256 +SECRET=5703C556E3A53B8D2BF3C5CA773D0C6ED2C1B66A84E6680475A8286941B246B3 +INFO=119E37D64B5AD702CA59F7952E5822CDAFB723C0F92CD70338A17E24D3AF6267AF792B189A01A8A3353ACD7A85B4D63BF7E4B22F73D7992E8E4E7389 +EXPECT=E302C1C1E5C8F688A7580997399433FBAAE499400B8A48901D808839C1EB49DFDF6324145F1EF01E + +HASH=SHA-256 +SECRET=9A6E83B91BD999737E577E449142DAE05968E774B223C1185DC574DA785C93CC +INFO=4B5845C6737202632B2946C3579D9D4582B475DFA373945B0ABC68C8F0DAA36520179439086C6809AA182094453BC0BFFEF0DC2888B96295FCD6E442 +EXPECT=E90E3ED902A8EB1FC67823AF534A2B48466BF2C5877DAD0AADC7D6FF741D8F437B2E6D0031846960 + +HASH=SHA-256 +SECRET=9BEBF465003A85BC25ED340C6095D963885504D3CF0266AF252EFFD22AD32D6F +INFO=17506DB459DCA14840917DAD23264303AB1C83E35018A72258099D20D4F8AB85C5227404B23AED6AE108BD1282E50A00D160E534264770A11B4FCC75 +EXPECT=1A32EA308AA6DC6F1B7C77F1D9AAE40672FCAE22438BBB0528E280073B31797886B6A80036A00E19 + +HASH=SHA-256 +SECRET=1D9209183E557D3AAC7E2AB53D26EC659DF2A745FE56A53818EF5853A42CE194 +INFO=C01A431A32833930A22ABEE5C6EA34DB459316DEF3B241529ECE7E39E2069A1E6B942946132EEBC9679801D2CEFEF4BBB6A1B84EF853325B7BC498FD +EXPECT=DABCFFA16A7589DEEE6C768AAF01E0813DE909005526DA54700083EF068F854D49941279689A1726 + +HASH=SHA-384 +SECRET=216ED044769C4C3908188ECE61601AF8819C30F501D12995DF608E06F5E0E607AB54F542EE2DA41906DFDB4971F20F9D +INFO=638E9506A2C7BE69EA346B84629A010C0E225B7548F508162C89F29C1DDBFD70472C2B58E7DC8AA6A5B06602F1C8ED4948CDA79C62708218E26AC0E2 +EXPECT=D4B144BB40C7CABED13963D7D4318E72 + +HASH=SHA-384 +SECRET=912141F04E2BCF79FE4BAFE46F44DC9082CA39DCF964D9409C486139787467EAC87095A8F2E2561C19D418EE6F3D836B +INFO=CBA728C3CB42F62B9FDE6598C8628E0F88F7639FD605B39D81296A0749F27C8B75830686DEAB949DE1BBD0062E46524B1F30746C1CBA02508FB4C29F +EXPECT=158B313C6D28B03B288AE2154EAB2140 + +HASH=SHA-384 +SECRET=43C80426677180BC073D093A809436E16D56082647CE17948765D560B6CCF0442129EB55341370768197BADC754B095D +INFO=FD71974C9F2D40C04D62B73AEDB6A380AB65E84712E7C7DC3C109AE30311F3EDE77C7ECE413DD5769FD74CBCCB020C92F7B87C376205FF9490B689C3 +EXPECT=E241E2C538FD0293DE1D5F6E7CD56C7C + +HASH=SHA-384 +SECRET=06F29A5D684A2EEB623532484A691AD85040D987248DC82C51D9B0B7E7BE51847E9076E26FA7D33BE6856207FE4CE035 +INFO=56FAFFD4911601C217725FD816FE0C1A1FBD8F1553F20D8101422FC72058CAB9C2E63A6266A726075CC31EDC0A327FA4449B5EC981A86D9141932AB9 +EXPECT=A2DF03F0212038CB83BA468E9E05A502 + +HASH=SHA-384 +SECRET=FCF5DB9AB3214FD36D9FB4247AB2A6F58862F1387917E585FA656FE0A19847B3C111FBEE5A868092F224C79658EBDB52 +INFO=C792FC8B32A86C94212B5C845FC78A9A66D94EF98378E4D800B369F543F0A077FDE0B6B109EFB4C6BACFA1502249DDC1E39C7C56DFBE3B285D8E1970 +EXPECT=B75B0C95AE60EACF7ED7B6A216C0A395 + +HASH=SHA-384 +SECRET=4179A34CAC89DE053CC0E1557D41BA96C2AEA4E35A0D304DFE2D4591DFD5DEEDCE94FFC7BA6ABA8B17DCDA0E9CF8C420 +INFO=3BFAB95F22FC446E0E3682EE197F34DB085FF24088FB6A26299878A309EAE112EE32BF4882E218AD0A618B3062D685707E1261C15D62D14C5CE958D0 +EXPECT=49A25905C12EF9FECE58C0A2861078C6 + +HASH=SHA-384 +SECRET=816E498680E5CC39B8264709B508AF653A50B927FCBDCEFF2EBE62BA3A25B79950268D3114AC49168C57C419FD77DC50 +INFO=40486CB22CACDDDE870B727DE81E11667EF92CB4F920CE7F2F80A0EF29ADD016142CE2694E866E1D631B5C1C13BA1E3FD0DDC9A16447C20186FAC13B +EXPECT=79A867C0333D346F0DF8EA2C6D4CB14B + +HASH=SHA-384 +SECRET=6CFC570A4ADCEBCCB8651C6DB504E765364079EF34315C783546605AC48CC2AA933C6F10E824ACC3C7338A09C01E1A30 +INFO=D5F8EE6DE37E3D1A54C370BC2A80C88749A546857C60C6EE6DF22F4F166BE188BD2999870FA5FCC1D7CC455828F3446E6A450A14A667E715D3C16622 +EXPECT=7CF844677F8970285AD148E9904AB137 + +HASH=SHA-384 +SECRET=D6D454975EDF1598FC5532C5C3D9FA0ECD357EA587B0601C90C7515729A84BE28C0C9313A6EC757B8C2AF5C17E994675 +INFO=5C3EDF4D856931D83F8939BE9A245EF34638F406DEE47AAE5162A71F0F68C46C95CEDE46FA452A83D0691E7D06DA9AB200FD5FB2F7C5F28C8A122C41 +EXPECT=0B14055CFB841A465259B80DC3E87D90 + +HASH=SHA-384 +SECRET=D62569C3669F1012C966F54AC5AC121D8A89871582347B13B208DEFD50CD3BC4908C9896257B10345BEC2D40DF2B6C5D +INFO=918C0244A3A7870E3AE4F8C07628BB754A0F6F8A52137D549C7E9E17103B42A029688857185E608470953F787CC97A7ED75E7A3609EED2F3B1A20E39 +EXPECT=2DC4524AECCB5A21ACF1F0B13053F5A5 + +HASH=SHA-384 +SECRET=8FCA201473433F2DC8F6AE51E48DE1A5654CE687E711D2D65F0DC5DA6FEE9A6A3DB9D8535D3E4455AB53D35850C88272 +INFO=195BD88AA2D4211912334FE2FD9BD24522F7D9FB08E04747609BC34F2538089A9D28BBC70B2E1336C3643753CEC6E5CD3F246CAA915E3C3A6B94D3B6 +EXPECT=F51AC86B0F462388D189ED0197EF99C2FF3A65816D8442E5EA304397B98DD11F + +HASH=SHA-384 +SECRET=96C45DCE79A02D2BFC2A10A8E744C974812E6A9B83474CE53743FCB334B87D826F411BAD836DE017790CFE07087F8B02 +INFO=80698CD988E02B1BBB0D02C1BB2BDAF544FFDB3527EDE621D2F2F5EAB4A4964EF530378E94AE9AB7484D1EEF854832D5BB204A8BFF21651A9E3CE758 +EXPECT=8EF1E0FC26D3997F985AB5567066391C0D8CED54F1CDABCE57B5ACCABE21EF78 + +HASH=SHA-384 +SECRET=822C764A1B117085C10F0E689814D2BFBD9B43287F1A8C75D795A9831A286184C8586F3577B6E5BBCE1637925E04FC47 +INFO=AF346110B941B11D2189316C9FC2B9F4213775A5D7368D35412678A28FCD03B07F0549666EFDF30C80F0AB5563720A56EF616A13BB8F7780036FC08E +EXPECT=E0AE235CB82380527BE76934A69622396D90E7BFA7E2D295E4375BCEE0D1B101 + +HASH=SHA-384 +SECRET=340E212D758E83CC5B89E4B56A86EE8C9631AE4E4BBAEC15AC095EA4407BC7B634AD630DD0BE85A91C08A8C7E1E1030B +INFO=3CD5561AD12FADFCE408E04180AFCEE38B83156B9E4BE0779C4F0DB9E26BFE5CCD43E15921977CD26B1DB8288B80089EB7D1BBD7F59E1011B3E18B51 +EXPECT=05FA577B7081210E7C9DE69DB03D7C2026CF4469A90BFA29F1C2C10818D463E0 + +HASH=SHA-384 +SECRET=BEB7DBDE7E0A8ACCA2F3EBF8C37A1E9C318E447B9592F93FC9021E690888391A354810B9673E1E2400F05060D3AAB851 +INFO=560BE29C62ECA33855BD1CC70ADFAF4E7EABA4FE55075D466E91467AC4F4B9BEB678E1B2C961511AB12AFA28D34A11CD2EE2B151609BC851036D1845 +EXPECT=63F96D3339E355487091287012D8D46280387567AFB67517AC616D340FA36466 + +HASH=SHA-384 +SECRET=A360F0B516FC35A76D1D4A9EC6A08E856B8EFA9310411398BF1AC69F28539300BC2256D76388E504C1F60C8B60E60698 +INFO=0206FAF5C9AC40EAACA9A1D16AC71F19E2DE844DB2E73E4FB7E34567E221D5ACBC6931412745DCB0B05E119284D21C4BB3F9A939271750F68784FD9D +EXPECT=88ECEE742A071F9D24720520E8BDBFE140CE57E7FE2B686966871EED0A6165EB + +HASH=SHA-384 +SECRET=DC875B2F393C1D40C241261B0918790601C8B908608448F766E6E8AECFA5E4927E7574AF4030047D98B11468108288E3 +INFO=C63AE3B995AFEE4AC3154BF9EFC6BB10E537736AB5BC427F3C376BE8FB81AA5E0764A4B0165EAAB0A519ECFF45E6F6C769EA664BDD6935C94D8ACEC2 +EXPECT=473DC6A980D6E2465BFA3D02E7E5341B9CEA5E09F27767A5C58F7DB60B5F744B + +HASH=SHA-384 +SECRET=49DB7631A3507F02D6B9048E26AFCE48B05E91B50FEC3B7CCF2E8BDE9AA9D79C0B6673F814D8CE39795E79239CBC3967 +INFO=C9083A35299B25141CDC60B4CC7C24263693F15E7AF1A8C6D121D798FE0B9948A83338DC2CBDC75876EFC83FD3398CA0DF223B105B0F13EC2033BAD4 +EXPECT=B350425347979C6F1C100DB1F6DE919100FF713765C1DEA146C62A69896235A6 + +HASH=SHA-384 +SECRET=E2168AB072C12DA471FC024FCBC52778E9BD68F44762B9D8BAAB746DB9C14FFE7181F71C2EE6488130832830FD0BD5F0 +INFO=59569454B2F5424A914A2D166DA8EE127B0EC5AB4788B115C1D9966A5297181C64549073229A32E5DE40C94A8F9EFE71A0C968F6330482876E37BEDD +EXPECT=16CB6BC93D9A001460B83259BC9A4344D4B4CB422C6102565DC5B190DE1C5673 + +HASH=SHA-384 +SECRET=00A12D3CE4FF75A6E30F41F3557C826AF1326B6302F4CE887BAD3D3317A548C8C03A057284DCC38D8BC690BD4A565F47 +INFO=24C5C0B2C810DFA08E35D7FEEBB8C78E0CD726C92ECD42D9171013738CA2531A947F523C37F64CDB04305BD969D1D6F9ECD46405D28280F968500BA7 +EXPECT=AEF3D57C8DA7D9582C5D1C62D6B64896DA9B1B0E4012A44CDC3DCF4B70AD6C66 + +HASH=SHA-384 +SECRET=BC3157B8932E88D1B1CF8E4622137010A242D3527B1D23D6D9C0DB9CC9EDFC20E5135DE823977BF4DEFAFAE44D6CDAB6 +INFO=B42A8E43CC2D4E5C69EE5E4F6B19FF6B8071D26BAB4DFE45650B92B1F47652D25162D4B61441D8448C54918AE568AE2FB53091C624DBFFFACEE51D88 +EXPECT=91314BDF542162031643247D6507838EABA50F1A + +HASH=SHA-384 +SECRET=23D5F3F34C9FE733E808949F4011BA3171376E3BEE807EC5B28496BF4EB51D85AA37C42E1ED93CFFBAB96C6DCA3AFB3B +INFO=6EC7B6BBD81A312FF787DC6AF7C7C7B9CDBB7D0C19D808536BC0990BD7E79E232BBC1433CA567CBCC4DAF79E8D7224C30124A639852587E2715AE62E +EXPECT=C3C3579CD70AF7F8C184C580224F27F7664C9FD3 + +HASH=SHA-384 +SECRET=0000D9B7EC6FBEFDF256FD68220B5205AC65A2001145118C50BA6B657032198B8B7CE3B2F7068A780DC17C22459AF2B7 +INFO=D857541C62B85756DC73DE7DC2D86F5D5E8B28338BB0A945B5C4FD7C81F71961B9705D3D153B19195D003B74212068ED10F96C53438653087A0152CF +EXPECT=793EF113F96397AB0031EAA0FAA777C107E7D03C + +HASH=SHA-384 +SECRET=4F3D744D3E449E0627BF4498743828F86E638F60620A7ED4A7C9B5B073691C9EC94728C58822E827F0F6CCF86DBC1CAE +INFO=301FEEB25E6CA8503ECD821F1D3787AEBFB3D0EC518BB31174F5209B2AC1F28ED3E698736BAD10A18E3CBDB5DC27BBD12D058B36DB0892F9CFD08300 +EXPECT=85EF9505B230565ECCF2A64AB3DE53E5A91C7B51 + +HASH=SHA-384 +SECRET=6AF3E1659EE7CAF1D10AD9135C9757350F69886CCAB1BA4FDE50C4614B319E2B20ECC7636C5F6BBAE71CD35565A4A2C8 +INFO=79BAC447F12FBE96C197963B91B939AC3DBF4541BEDEBB22C5677F54B377A0CC3B55A2BF4033D422401A149E74A81615472D0D4F8E4F0CE54384D844 +EXPECT=28ABEC20D6F092D09E32360986359303753CEDBE + +HASH=SHA-384 +SECRET=0299D1F064352D5A83FB61E1E050980F65B4B440819D2C1C29B6AD5BDFB2C00347DA993CC9EC00FCC4BD01C03FED9B65 +INFO=6F9EE5CB3852EEC2AC3F095C25C20363D0F7F4770899BF99187E2A830C6571AFF821CEB7E80B6C744F8C5E7BC0B2B8196FB540002B8DB7BC60913998 +EXPECT=293E0FD3E4D06EFE9EE1BA7D8BAB1D36BD7509C1 + +HASH=SHA-384 +SECRET=1EDC7FE9AD33A7F6F12F350C128E2893EC1BE59C0A77FA5896F2E276BF9EB19CE5B1C1CC2FF25F9391DA304D26037BE3 +INFO=FE3483540341174FADD6BFA9F96473EABD964AD588AE1460739DEB3BF512475C6D57E017DC46E1115733DD81FA6A5DAA9C1F9D23C0AFBBB36958CDAC +EXPECT=3C192347CE7313E9E54291C37C412CF90AF58A65 + +HASH=SHA-384 +SECRET=27A9A514E63943E9B90CAD1291FB2A3054C85B4A745CC3CF31BDC1C8935D153FB495E7BA4AB641B7C9E3B5A7C497B1CA +INFO=C5AF66CE6C03FB7FD88017B38149A32C8C9DCAB96665EFAD28DEB71B61EE75887E1324800B01B13FDD5DB00B8BB4BE50CC2EAEEA43CF26E77DE6DCB3 +EXPECT=886DB74207DE3B034F3E70CF9B47324D57DF5185 + +HASH=SHA-384 +SECRET=E358BB04A5AAED97939AE415AB3FFE9D2AB14C86C3C3F72B285BFDFB7C1440F80D75CCF28D2C64D503426F552CB4FDBA +INFO=6B93ADD9163F5E14DF0160B0EE0402B3542F920FB12CBA71C2C7988877BE46BE951113DABF48AFF27E8C9B214CBF293B8A966D2EA7FF515B6BDAA8E1 +EXPECT=48BC1BC135D5CE4AC04B11E7C50CDBBF84C44ED7 + +HASH=SHA-384 +SECRET=6E3AB74222CAA37F732DE378992BA75C37B1C14B3F5A2C2BB42C270D6F213EEBAD3C3524A4B354F753BCE5ED7CA865DB +INFO=79D39097B19BC6172ADB445CF9418979B943825228307F2F3AA8A591E0331C77BA01AEDCA2C094390C04694DAC907BE1ED20C124C0C1E5B278F63A3C +EXPECT=629354FADAFB077D7344F524B82B7D14A5CEAB22 + +HASH=SHA-384 +SECRET=582F968A54B8797B9EA8C655B42E397ADB73D773B1984B1E1C429CD597B8015D2F91D59E4136A9D523BF6491A4733C7A +INFO=E6D3C193EFF34E34F8B7B00E66565AEB01F63206BB27E27AA281592AFC06AE1EC5B7EB97A39684CE773D7C3528F2667C1F5D428406E78CE4CF39F652 +EXPECT=691726C111E5030B5F9657069107861ECC18BC5835A814C3D2E5092C901CB1FB6C1A7CD3EB0BE2A7 + +HASH=SHA-384 +SECRET=BDA32EBF6B8D6C21B4078C05582CCAC57D0E09D598ED51CA808BBAE4315FF3082086E772A50F828BA3A8A47089604C1F +INFO=723A6AA3E2093F2B3A377E4D716CFADEF784EB38D10302A8BC88294FFAB02E8AB43E6C83A70489DC91A4040E1C04F711A9ADF601D49A2AD07835C668 +EXPECT=92EBA10440A0F28ECA40C765CC08031BFBAEC5FA2A2D3FA19069CB3D5DD08E01702CD5EE16328D0F + +HASH=SHA-384 +SECRET=BC8D610533E7FD81F3F6AC2F93876BE259E88C6F234ABD0880762D12CD7D2134F252BECC395CC48B88EB645D722514C7 +INFO=29A5EA0DC26206268095791A2C0B1819079C88F85DD0259BC8EA74D6BF504FFC21C6CD5F92F74A02283DE4E33945393E64CA4B0F691885E4F2762E27 +EXPECT=6E3A1B6233D8E08A1CFE49C9F9E8605FA366F61080C5F1A750B22113168D36001DAAC6D7BB8C99D4 + +HASH=SHA-384 +SECRET=D6BE75028F7BD73620667EA50C4A674471854B677FF0B63026460C3000D11B5210029F2979B3EEAA613812983E7D7693 +INFO=5C2CE248C0A73A29A6E8E7B3FDBBAF0198D636E6D9D6A547685C27134D80411D122F96311434798CB19B3D446F52D7D1D74BF3EE3FD1FEA2A3B526CE +EXPECT=E67C995DA49F4ED0F6EFC09F839C795E8447E17790F9805AA8A93A4DB9A03970C280E9159A64FEC3 + +HASH=SHA-384 +SECRET=F7678CC0B7AEC5F4BDE487F30A5A88C988FD24C463B9E46B3B2AE4C765CA79C48ABE691CF93B6B435B2BDFF2A3D491F2 +INFO=B04C945BF149F2F6D17438958D1A725C3A8AB46CAA15A05E809524B9D1777EFB48E7D6BAAF5D3EFBF30B69B326935E59411207B913F38988E06ABE5D +EXPECT=65E303ADE8D5ED5559C40E6312B10EE4F2F4DDEE166127547FF1A14CC0318CDC61D1D0C3D6542AD9 + +HASH=SHA-384 +SECRET=D5D78EEBD12F82F398235CA72AF4277DB475A80DA843F36E1ED95A661E1E610A2C7DCC433E60029C6689980961F3590F +INFO=094C5D7C7457C51C877A0BEA03FBC44165C10635A4E64B8556C8ECF20914E621EF34224496489D76F67B2639608820ADA74137916BFB315BD50872ED +EXPECT=A16E9EC1BE1AE3B40AA906C8E18E9A7697CC34124B7B04957CE149BC39BDF27016F5839E21EA7976 + +HASH=SHA-384 +SECRET=58F1A4C16CB332631B217A8E1B5CCA843665064CC61C9E82AE4180D574DEF4E2A3AB9403036E3915D95044997F1BAB81 +INFO=C77A0BC9543841DC062C8ABB804978A3AF7192244AAC4F73A821750BA38D486D5A2B4F8D927F830772C4E5208E91C37F82B7C658D240E14E20D58CEE +EXPECT=B2D075292489BBD177F72E5E800618D04A30F9B6E0A8D1FCCB438AE6F646A33E0C47D3625AB87B6C + +HASH=SHA-384 +SECRET=AAB0E07E2845CE1664057AA15A1D50C35CE85591C5E0D8D3AA7E8C5A58B0BF56C270957F3728C9745A4BC696F87CA0F1 +INFO=3C115BFFC26D419182433BD43570FB3F6F2FFE37855A5546DBC542990FEF1E332C3A070743BA31E984CA18CC94E33F4F2C744F6B70234A7BA80D7E4A +EXPECT=001CDA059179ACD067BC9129017D24E8B99A2D6604E14714F720358BF7F43CBB6A4AAD4623267E72 + +HASH=SHA-384 +SECRET=0C5620F34AA7029F655A9EB9B051F13251D65BDF99D390B8F67898EB2216EC10BACB29358B895529DB64FBFC942FD0FF +INFO=6D8B8CDF7B699C0205C6FEB4AC1839D3C436CF962F8575EE67FF20D69103C4AA93BB369D360980181E38C44215065C99A066946733EDE23185183617 +EXPECT=2857C7B4221A02B6717A1C67B1EEB64DCDA8162284FAAE88466414B317E45457B5AAEF5B5089722F + +HASH=SHA-384 +SECRET=B57DC52354AFEE11EDB4C9052A528344348B2C6B6C39F32133ED3BB72035A4AB55D6648C1529EF7A9170FEC9EF26A81E +INFO=17E641909DEDFEE4968BB95D7F770E4557CA347A46614CB371423F0D91DF3B58B536ED54531FD2A2EB0B8B2A1634C23C88FAD9706C45DB4411A23B89 +EXPECT=5949ACF9635A77297928C1E155D43A4E4BCA61B1369A5EF50530888550BA270E26BE4A421CDF80B7 + +HASH=SHA-512 +SECRET=DD5DBD45593EE2AC139748E7645B450F223D2FF297B73FD71CBCEBE71D41653C950B88500DE5322D99EF18DFDD30428294C4B3094F4C954334E593BD982EC614 +INFO=B50B0C963C6B3034B8CF19CD3F5C4EBE4F4985AF0C03E575DB62E6FDF1ECFE4F28B95D7CE16DF85843246E1557CE95BB26CC9A21974BBD2EB69E8355 +EXPECT=E5993BF9BD2AA1C45746042E12598155 + +HASH=SHA-512 +SECRET=6024BDC82440473BAF798653BCB846F8503D73B6EDF5CEBC116374538B6256AC8A8AD5FA8C7FAD7B3F089933B9C7326D6B80572635C9F5F6B38643971D075B9F +INFO=1472A96BC81881767F6154B2BB79F4DA8578D447AC495D7EDE31454834BE3D643034B2E16034BA877A846E6E6E22B284B6D894395F33B4BEA5F1CD7B +EXPECT=ACBD761E976576B189696D26E745A680 + +HASH=SHA-512 +SECRET=6C7D94622A2D1C4394768A39CC340C6887E06C4A88D57AA7822F0F2B3FAC0192E851F7DD39CBEFE6CCD70992E27EDEA4729B215CA2DACB05373A411600233CCA +INFO=52D1EE8B4C0AEC771E236E86928B4E943CEC53401848B8A353FB2DC0C74D9CFF74E8086EF5542E3F210209FF614D1FD3177B5DF4DBF89978D1ABDBAA +EXPECT=F3048AEAE11B116A234659D40711267D + +HASH=SHA-512 +SECRET=E0630545EBDC440F373D194FC6C4629A62AEF028DB52A3FADCD32DA24C2FF79106D349AFD8500D6B4FFBFE2A9D59803FB90F25B60FD029C3B67C21DC070D852F +INFO=1821CB3B1CDE82BEB76E55CAC866E3BBF7EB541E0AA66C3DFBE509EA7870670745ACD5451D775464AED2D66E5CC4360C6B7B75B35A3820CEC217A086 +EXPECT=90FBFA27119450ACC8E6D74B03B05558 + +HASH=SHA-512 +SECRET=7B3088F0FE86A0C71CC02660E3AB04D3789500AB9551DD59F030847DDA0E14DDA8D6A2051379D0F591269C3DFF303CBFA08424F421913B3BF9C3C076012AD8FC +INFO=8524FD3E73EB9476513E31005D29DFE6927D877B74734EDD8C2B886FFD3F053000D28344EE9FD9340B448C29FB1725657B314DB93C639F98D756CD9D +EXPECT=5122A61ADD589993111739F4643EE406 + +HASH=SHA-512 +SECRET=F4EE35D1575D273CE42A66D6A6E521E87FAD64BF81C99F5773B60C0A9FE2D4D97C52E6E0C1775B4EF7E41E92A1BD32EABF3FBADB93F6A0B3E7324B7DA043D6C9 +INFO=92364F044E0D64A8FB4C53CB1B73A665AAF66FFC9DDF4152AE9DA35B470256B00B50234E26C3149F1C380DD93E75ACCACCD167E1D60A8A06D31BB2E8 +EXPECT=E2B4CB180AB6730BB0C16178B20548B6 + +HASH=SHA-512 +SECRET=DB3DB876166713A7052A9954F2D37EF35E446368CF84CE5C315B4F59AC00D0D9EB22B119D040BAB5F25F224A24D94901015A2223856203DAD2260164ECE61935 +INFO=77D5AFC143648A249B17AF10D688188A780542DB7F2E3D4265D16E4FC94CDAB158C5AFB9C70AF2D1668A008AAD4ADA64A9DBFA97B439002E4BD3DBF6 +EXPECT=B01C96BAF28CA5841CB6E4E0CAE30D59 + +HASH=SHA-512 +SECRET=7C977B74CDF87721A37C6F5E9D7C91D1E11744514D51A68D12D1837D26B79611E86A05A4685DBEE8EB0B30962B19B96F373F5ABE92FF0235A4AE7C35380794A5 +INFO=8DA372E4D534416D9C4FECF9D22DC576F889BC6F27453CA75458CCD8F88A8600BA03D4D19480D2EF899DC72DF0732FCEE8ED997FEA4F2D526BEC44F3 +EXPECT=B22DB6AC3A88AA1AA093C0FE55E2639F + +HASH=SHA-512 +SECRET=6E6ED01FF12D3251396BF56062B1B3C79B55B4373C0331B14AA593A3EE005B5F068F0EFC56026FC72D66F2744DD1F168F247912F9B26EBC59463B96BD9F1A1A1 +INFO=5ECA796BEF031B87521ED0904BF1D855589749B0183E993D99F741619B62644FA686A4C90F7F1E6ED5344EB75880724C09B751617C31FA5549828A25 +EXPECT=B03B235F5AF9719F35F215C2F94A76A5 + +HASH=SHA-512 +SECRET=F4CD4F279A128C74E5EB821472098204ED96ED61EAC9281BCD53FDE6890A2CBB1CDB97E0E343FC8588B932CD701AF88F0A7AF723D5C0850E3E01E47612FCEC83 +INFO=EF470DFCD57359F558354F845FC8CA3A1A67419A6D0F6DD698C78F9A57E820C3D8786F3C589F9693B8F3FB3E123A482386C1C0CFE26BC5322E90FD4B +EXPECT=FAA720299513B73DE2B54896D9A06BCC + +HASH=SHA-512 +SECRET=5BE2BF7F5E2527E15FE65CDE4507D98BA55457006867DE9E4F36645BCFF4CA38754F92898B1C5544718102593B8C26D45D1FCEAEA27D97EDE9DE8B9EBFE88093 +INFO=004B13C1F628CB7A00D9498937BF437B71FE196CC916C47D298FA296C6B86188073543BBC66B7535EB17B5CF43C37944B6CA1225298A9E563413E5BB +EXPECT=CEE0C11BE2D8110B808F738523E718447D785878BBB783FB081A055160590072 + +HASH=SHA-512 +SECRET=B0B5599C29CCE7644372B278A3275F3E0723739F42BC03FC9A4ACA09D9CECF9AFDC30393DD1CF7499236239608A258F5C48E66B663F6521049A482B63D468A33 +INFO=F00101F38E5D6098CFEA4C7C8490EB5505390000478A645E6621B1F711105BDB4820DC0C783BF980C062899B70875E17CC9116F2FA588A942405BBD6 +EXPECT=768796179CA511B841717887810F870FA3C12641C95ECDCEA8590D730EA43B8E + +HASH=SHA-512 +SECRET=52BEC703DEC94B80ED2F8449C752EE4B8B8B1B80E55B6B0E1E9DB1770DADFBB2631DF554D1BA41BBBD0E587369AC81B40BA6D941FB62DBA78A76B554EB03C643 +INFO=9F51256B1896925866F22053348EF6E8A52EC580B1F32BEB2574AFD23A5460C30E8C811D0E7A2887BD5CC0653EC8D68DCCA43F71A8DF1F0193205B75 +EXPECT=B19AC7D4EFDE7C62191EA76530D30DFA5510CC74BAFACAEA5CBE2CED467FA1A5 + +HASH=SHA-512 +SECRET=8C472849C12153D5A47360EED0438689D056C08496D285A179297A93DFF50070FD3C2C2D88F1C4A25B77C1A5EFB47BB8F881C89F24D464BC23C4F200291D6251 +INFO=F2D317F020B212066EF7C869C9C56699C1D4DFDB74CF679B97D718E701E442B117A6D1162BF825EF491FA628EB249A1CE28018B8A5BD0B1B296E4D92 +EXPECT=FF82B4D0FC9E17C0539FA2FE66F2E1A07B7B593A1342CD0B48162FDA68B7D80A + +HASH=SHA-512 +SECRET=104280C86C79879E96CF15DE96412492FFF5D4DBFC677F7D384C09A4BCEE160FA3C972969D12F9B1542D570BAAEBBD801F632E172A8A00477EDC06F938EAE198 +INFO=ADF1F167939087D71FE8D9DDD2C903C542775129DAB2EDC2446CB394A808BA49CF4710EA10CB72A4EFE8F1A32C03D14660F10B0AA9255BD0EE865C10 +EXPECT=5CED814230D7F07DA116D7930B4DB6B18B391BB869D15196677BD1D17F2F8C7C + +HASH=SHA-512 +SECRET=DA48986B8C84D0F6B2D6BA9F2C02A53ED8F173B238DD8F3020E15EAE425871CFF148F15BB0BA17C2AE00F44B2C14725A7B130505469BC0706B699E2D901AD16B +INFO=08528600237B6D049268B7BF3E2FCD9373A6B2F6732EC89437EF8E134FB947C3F37F254C7041D3F06F789953BACED415E9D1DC400FB0025BE180425B +EXPECT=50EB29E9CD5CA7730FA565870B23A40DB75B5E051B35850C98FC9613A251BDCB + +HASH=SHA-512 +SECRET=195E31B3DB4630A9E66CDE347716F50227F8A81C397A72E30D27AAC27F8B9F2F2B453E68FABC9D209D443D952263DB0C341C866D966EB4DB8F8ACF8EAFE7A227 +INFO=2B281526345351D797BE0A7DBC517BB9C9C220B5194CEC3847F6FAC4AB1030867D1851CB8D46561DB605506567DC2F39DDDBF471E4A7D51B23745592 +EXPECT=AEFF884DCBDC002A5F7A877A34F73B42ABAD2089D4E39B721EB370B3D87627F4 + +HASH=SHA-512 +SECRET=7A1F12A3FAD7E0D3E244FC7BD3F0917E47BC76C60285DED739DDF9462C160CDFCCA887866D6DAEFBF12E7410FB1B50AD6C8B21B6E56877F47E8B14A0AC9F936D +INFO=77097024C944E349F0CA2A579CF51353F50664DDB4BBBDBBE01DFDE80595DAA5D043D9DB9651FB821CC9ACD72FA91B2EE93E23EFB39409711F3915D0 +EXPECT=D2191B6AACC7668038D762C0CD5915BF68E490671EC4032C20297A64026FE042 + +HASH=SHA-512 +SECRET=7A41DFE8D0C9AC924A2ACCD615AD3C0BC0D7E124FED6B2B7E05B9F8E6ADE0678E98D45766F9697CD187BC10321195FA1BB84B55BF94BB112D73C6ABB857F40A1 +INFO=E47AA81AF8D1074C8F7FBCB589727EC225163D076D4E8CEFC827C78EBA7B42D5E70377D7033DFDF5EDD93F605DD9B25D75548518E405563D1D4BF313 +EXPECT=5DBF1D3DC128E67F2452ABA858B7ECFB87EFBE66B714541C0D4C009C2B92D7F9 + +HASH=SHA-512 +SECRET=B27BE323EE094400FC9DACAEEE0365E0C0C52811A6081551DD46DD86302C6396FCE80BB60E306C9785BEA1270356A1C2B4DB7634D5C04891E85417FB72CDFAB2 +INFO=6EEDEA4C7C2AD22289C4E66A96E7A7A1CAE7D340FAE412A6E77697C2081A27560A9F0CB0E412297F99103A233A7998650590C5A7E2861738BED7C9FD +EXPECT=D0656230B86E4DC3EA2BDB8D62B452262462EED61229D1E2B92758B57C54C434 + +HASH=SHA-512 +SECRET=9DD03864A31AA4156CA7A12000F541680CE0A5F4775EEF1088AC13368200B447A78D0BF14416A1D583C54B0F11200FF4A8983DD775CE9C0302D262483E300AE6 +INFO=037369F142D669FCA9E87E9F37AE8F2C8D506B753FDFE8A3B72F75CAC1C50FA1F8620883B8DCB8DCC67ADCC95E70AA624ADB9FE1B2CB396692B0D2E8 +EXPECT=96E8D1BC01DC95C0BF42C3C38FC54C090373CED4 + +HASH=SHA-512 +SECRET=6AC19B36AF7D0E5C65F58DDA2FF76C68567CD8AC16FF2463FC3C8654DE45A05E39C75D83758351753D2E143629AB9075738B037A1EF41F7EFD70F1E700F7F67B +INFO=4BA9F9E8E33B40F4390333F597AB565B27A841D5FAC930F67101E65973F071AC6BA3941C9D22F40CA44E91657A629B7F56980E0ECCAECB943B16EE27 +EXPECT=3E43B70633884480DDD93D6F20BA512B55590B68 + +HASH=SHA-512 +SECRET=2ECE7BC9EB5249F5179F2528A062D0DC30496604BB76F26E160D3633140FC6EDAC717EB5402D0FCE56B76B7CFB0AAF47B6AFC410FE06EFB049FA28953D7E4942 +INFO=1EE1EFE3AE248819C5B33DEB7869C3540CD8ABB7DD522C5F0AB71618159CD0D23DD805F14EE27E012240CFF85F57C72F88D5EF6E2196EEDE8CF7B786 +EXPECT=2DF4FA52D2858700085570901F5F857314E1E02D + +HASH=SHA-512 +SECRET=283E37FE181516DE2BFB14E6291EDB91DBDE4A7B1475352ACC47EFDF244A2BA2E639D9B028C02DFEBF51DD2D37C4DA64AA89E6A64916D58F1C80B25CC080A950 +INFO=578CFE1A70F52F7E456A22F1485BA23830E3DCB05700ED2812CADC181D448F1119FECD8FCB49667309CF0E316470590ED93BAF567F469DEF5DAFC3B1 +EXPECT=24719CB6F6B10E2EB586A0E167F5683DF2113771 + +HASH=SHA-512 +SECRET=4A66D41EBCB184C3148A0DEBD67AF5C8ECE3E6A1C13C413789796A99A1ED24ADA2F5107C91159306FE8F68C245499FBFD8F85009A100C8535D22DC71DF09F74F +INFO=40EAF429F7DEE6F5C91F2351BA51E53CF6F7F836398DBCC33381B4EA4046A5F2CD545C932E58027A1E724FCF8552CC79ABBCEDED385A524648C1DAE4 +EXPECT=8F1BDCB99AF0FC510AD4825EFDD750D3CAB7846F + +HASH=SHA-512 +SECRET=95A53B3F953AB90D4F85E7E8437325BE1A0235A89311FA1C7405C3C0BC61F14EF6E7CAD32165AEEA2AD718BEF144D66302E989E2F1A323E512780D28B6DA74AC +INFO=37495216C113EFD2CCAEF3583A87B067D65C165DBACEA9E04EE34411EAA6616FCE5348ABBD121186F29E071C467B60D9291CA2EB664EBC2A7EE50EAB +EXPECT=71A5B1EAB411AFBA65081D4D0471D532BF0EC65F + +HASH=SHA-512 +SECRET=FC3EF290A89B79E95DE83326B34242778FD2D542457365E2719D328FA5581401EBFE6E2655DA070AA3E26B363B595E1AF7BABD17075DBEF1775CF6157D3C716B +INFO=592E1984BDFB4BF18DE83A6B19CDB63F27B10985E7CA520B71EC392CE09E1D2DA14C632553574B876752B9D572ECF41BC5AFD057BE99D8019E19F7E8 +EXPECT=083CD3B0B564EE7C5E927F32D10190749715B21C + +HASH=SHA-512 +SECRET=388B8C9BB988E762EDE3CC072BD88BA7294785AFB0D6506C2357A5E23331A51E968F7BF50576EF9E64B69B4F48D6E509639CE9693E3F2094FA33B97963E1CC6E +INFO=5B8FE0C658C0FD7698234C477860531221A7F48617E4405D5C8E8D3550F105B78469A449CC2B855D4A5357C1C612234B2AE2B820F07487B094AC7C3F +EXPECT=735102B59B09D06D3E6C9494433CB03F5B8CA383 + +HASH=SHA-512 +SECRET=F1E39D9D0984641F24702F8B37FBF9A8FAFBD17FC23569E940C31384CDA58C0274B167B1AFC9FF44473D20D6A23C922502E31B3DAD13274B22024FF4EAED668E +INFO=C880707804A76450019632C32F037F97FF2CE7FB1541A9ADBC092D96122CDE19D5FE81CD12A60F491C5877B601E4ECBE0FBAEB67B446C4BB2A9ED60E +EXPECT=5440C3450AC332D0A8F5C724647962AC82F659E1 + +HASH=SHA-512 +SECRET=9E0A79B1D6C672D3235464CB2BE6A36D02C982387DEF7E2FE32A5D2BE7343FDC038AF48FB941972FACC8E33D6286E142852DC4CF2667A3C97DD557BC6FC66E98 +INFO=CD356D14E32BF958C17711D26A30412088A2E214E600E692ED4966212565EA891C807E1E0BDEC0A9DBC71F502F09975FCE910C7723DB4DF380E7FFB2 +EXPECT=F46693300BC3BF106D6A8566481FB12B45EE1F95 + +HASH=SHA-512 +SECRET=A9F4A2C5AF839867F5DB5A1E520AB3CCA72A166CA60DE512FD7FE7E64CF94F92CF1D8B636175F293E003275E021018C3F0EDE495997A505EC9A2AFEB0495BE57 +INFO=8E9DB3335779DB688BCFE096668D9C3BC64E193E3529C430E68D09D56C837DD6C0F94678F121A68EE1FEEA4735DA85A49D34A5290AA39F7B40DE435F +EXPECT=6DB880DAAC98B078EE389A2164252DED61322D661E2B49247EA921E544675D8F17AF2BF66DD40D81 + +HASH=SHA-512 +SECRET=244356BE9B327964732EB4A7C09B04B420712396EB57F72BC94924066C687E878E798E0A033A1EE1A4D8CDC2DA0443ECD77401D0460CD906EAAB02656C1EDC98 +INFO=D806E2DF8C85D3BAF5D67E9C97B746EE6BBB1BC10DCDF6C7A6075C311CF34752ACBE60E68F23C7F890B5EA7300A1AD32178254885246F0493987A6E8 +EXPECT=F0B5BC749EB300CA217CA82FDFFED89B1BF2C8AFC2B36EE2B48695E5085B893A6DAAD5474F74EF0F + +HASH=SHA-512 +SECRET=F5567A2DD9236A99200C4BD5390743E2560BAB4B196E3C732B01ABF900C7649CAB5B957DA6AE8FD025605147B36572C19F103670B16F6BB57C138754479AD45D +INFO=A8CCD4BD36FB0ED0765E9662F1028D600BD650E4C2CDDDF94B27EE881120AAF74B727B02F0036B46162062E39ED43FA85687A58D177AF6F566811889 +EXPECT=2E55B73D126DB0F92810266C92E4DC7A7F2D32CBED9EB4EDAB519E5CC9138C642FD4B229780C17BF + +HASH=SHA-512 +SECRET=46A65F2E432FE2AAB26DE24D1B9D39B44DA270230F17844D44E249565A125F87A070B4B2EEAC0B3A6C54ACFC49DDC6360F59FE0E330E0605C61E85C5C27FE756 +INFO=B06A23E05945F96A293DE59DC3DB5972CA1FA00B4647AC38F753790335D5DAEB2FFE09CF8924AC4E80B275EA4DBEC53B9E2AAF90DF0E6FD82AD69F7C +EXPECT=04BBC4F93FB5C3589690798BF793C10BB726F87A4A2DE93B8FDF6BE8015ABE156577119C5637AE71 + +HASH=SHA-512 +SECRET=8D371552164BCEE60771E876CE546C4B0277B978E0963E2312666FED5FAAF340A55E00644CB36474464A4C2775F480D88E2D3B41F31E0706209EB8E51595B92E +INFO=F570212DB2D3F314AFAE51F83875E4DA7DBC13073ECE83A6727E011DD0F748F569714B59F44930067B8962B83289B441BA65B0E2237AADA36800F955 +EXPECT=9565B54259FC5C61A7F7448E6BDFBE48191C2DD6CA61CE35EAF3717FFBFE1C467B3DE080FAEEB8B4 + +HASH=SHA-512 +SECRET=07F8E73D47DE5F0EE2CCF871C702A92A1FD15A4DE130611E46A4247A0497465B3FB5D785C01ED1CF061C73FE1F55DFE0111EC735D376BB39AC6CF83D7A2371C4 +INFO=C13AADC44D9C3A209B9081B19BE6556C9FE7B491E0B8D98B18AC82C6B4DC3E8EE23B82DB2BABC27F055979511895E296B6D9F7DDA35A0E265FB3C645 +EXPECT=9E222EBCD27C7CA72179121C6C60FB0DAAE910620CA7B01A8D0154D48DA9C7D7AA9A5667375FF518 + +HASH=SHA-512 +SECRET=5F00B6755ED8C9D3EA8CECDD8C17CA3AFEDD25871D1C50B302C1FC864D04147382313E6A701D9B6CC3DE791FA65A782BC0D74097361B12A5B45408F1172DFEA5 +INFO=5669569B911167E8F9C6B1A83FDE57B6DB4171AEB7657AA94D87D542BD9D4E89F69C89E0FB4B3D3502702327FBFE653AF60A7FE1AB600E2620D765A6 +EXPECT=D937822EF92073CFCDB5D8DB801A3875E45FE34D316F40EE57140E1153E4D28251D0A05A9F49EA66 + +HASH=SHA-512 +SECRET=BE755AB76FFD8F2EB3F246E036BCC06DF39E83A471F468C29EA8BCEFF47D28222637C1CACF2FDBD233545CC888474A7B2131CCC735225027C517C48420D10ACC +INFO=4E39D12BB306F5D1E1859484215048CE6FF0033B3199CF1732D0088C4187D49884FE30571243B2A643BC56D4986DDA958ED5C279BF7A9BE2E37567E3 +EXPECT=302E5F81107D186C054173BC705E11A648A5DCEB8435510C3CDC80C9984CB9C9C362840D44265E7E + +HASH=SHA-512 +SECRET=2C94C4873FAF4DE3E93152B49428C92C865DC58E1E336FFB9AA50523DB6311DB34D5A731164073D7958506501CDB4DCE05B845198E6FEFE63DB87837C2434850 +INFO=27FE559B6D92995338283A776159856285474B74302DEDCB3E7FE191490EAB7F580212CFEA6F6013388E3DB28443F454280572B90F0DC2207FDCC0EF +EXPECT=42885AC518C97BDA290B548B597B7F04B20BC34A0A6D9DFC89A446D9F23A1CCCC37608FEECA7A4C3 + +HASH=SHA-512 +SECRET=0FF2C279653A7B954AFB0096C2B16E591FA32EEF39EDD8141C6513D6DC6C0863AF0E94BFD57B17817CD1038F37639CF8D63871AEF46EE81947526BC5454C13F2 +INFO=16EE1DAEF6A0316AA0467646C521FA30165FE336B249600F1E565D287B97018033E2BAD45D76C6685D77339B27EBDD9CCE1B34C1E4619A97774D94E7 +EXPECT=BC0E3CB2B78BD9D6E2EC544672ADBE44398FDBA7EF332F1C4235C104CA32EC00FB47D47209E15197 + diff --git a/tst/com/amazon/corretto/crypto/provider/test/ConcatenationKdfTest.java b/tst/com/amazon/corretto/crypto/provider/test/ConcatenationKdfTest.java index 47046d38..c4b15f03 100644 --- a/tst/com/amazon/corretto/crypto/provider/test/ConcatenationKdfTest.java +++ b/tst/com/amazon/corretto/crypto/provider/test/ConcatenationKdfTest.java @@ -8,8 +8,8 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; import static org.junit.jupiter.api.Assumptions.assumeFalse; -import static org.junit.jupiter.api.Assumptions.assumeTrue; import com.amazon.corretto.crypto.provider.ConcatenationKdfSpec; import java.security.NoSuchAlgorithmException; @@ -35,7 +35,6 @@ public class ConcatenationKdfTest { @Test public void concatenationKdfsAreNotAvailableInFipsMode() { - assumeTrue(TestUtil.isFips()); Stream.of( "ConcatenationKdfWithSHA256", "ConcatenationKdfWithSHA384", @@ -43,10 +42,13 @@ public void concatenationKdfsAreNotAvailableInFipsMode() { "ConcatenationKdfWithHmacSHA256", "ConcatenationKdfWithHmacSHA512") .forEach( - alg -> - assertThrows( - NoSuchAlgorithmException.class, - () -> SecretKeyFactory.getInstance(alg, TestUtil.NATIVE_PROVIDER))); + alg -> { + try { + assertNotNull(SecretKeyFactory.getInstance(alg, TestUtil.NATIVE_PROVIDER)); + } catch (final NoSuchAlgorithmException e) { + assertTrue(TestUtil.isFips()); + } + }); } @Test @@ -58,9 +60,9 @@ public void secretLengthCannotBeZero() { @Test public void outputLengthCannotBeZeroOrNegative() { assertThrows( - IllegalArgumentException.class, () -> new ConcatenationKdfSpec(new byte[0], 0, "name")); + IllegalArgumentException.class, () -> new ConcatenationKdfSpec(new byte[10], 0, "name")); assertThrows( - IllegalArgumentException.class, () -> new ConcatenationKdfSpec(new byte[0], -1, "name")); + IllegalArgumentException.class, () -> new ConcatenationKdfSpec(new byte[10], -1, "name")); } // The rest of the tests are only available in non-FIPS mode. diff --git a/tst/com/amazon/corretto/crypto/provider/test/CounterKdfTest.java b/tst/com/amazon/corretto/crypto/provider/test/CounterKdfTest.java new file mode 100644 index 00000000..2d25a93b --- /dev/null +++ b/tst/com/amazon/corretto/crypto/provider/test/CounterKdfTest.java @@ -0,0 +1,120 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 +package com.amazon.corretto.crypto.provider.test; + +import static com.amazon.corretto.crypto.provider.test.TestUtil.bcDigest; +import static com.amazon.corretto.crypto.provider.test.TestUtil.getEntriesFromFile; +import static org.junit.jupiter.api.Assertions.assertArrayEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.jupiter.api.Assumptions.assumeFalse; + +import com.amazon.corretto.crypto.provider.CounterKdfSpec; +import java.security.NoSuchAlgorithmException; +import java.security.spec.InvalidKeySpecException; +import java.util.stream.Stream; +import javax.crypto.SecretKeyFactory; +import javax.crypto.spec.PBEKeySpec; +import org.bouncycastle.crypto.generators.KDFCounterBytesGenerator; +import org.bouncycastle.crypto.macs.HMac; +import org.bouncycastle.crypto.params.KDFCounterParameters; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.junit.jupiter.api.parallel.Execution; +import org.junit.jupiter.api.parallel.ExecutionMode; +import org.junit.jupiter.api.parallel.ResourceAccessMode; +import org.junit.jupiter.api.parallel.ResourceLock; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +@ExtendWith(TestResultLogger.class) +@Execution(ExecutionMode.CONCURRENT) +@ResourceLock(value = TestUtil.RESOURCE_GLOBAL, mode = ResourceAccessMode.READ) +public class CounterKdfTest { + @Test + public void concatenationKdfsAreNotAvailableInFipsMode() { + Stream.of("CounterKdfWithHmacSHA256", "CounterKdfWithHmacSHA384", "CounterKdfWithHmacSHA512") + .forEach( + alg -> { + try { + assertNotNull(SecretKeyFactory.getInstance(alg, TestUtil.NATIVE_PROVIDER)); + } catch (final NoSuchAlgorithmException e) { + assertTrue(TestUtil.isFips()); + } + }); + } + + @Test + public void secretLengthCannotBeZero() { + assertThrows(IllegalArgumentException.class, () -> new CounterKdfSpec(new byte[0], 1, "name")); + } + + @Test + public void outputLengthCannotBeZeroOrNegative() { + assertThrows(IllegalArgumentException.class, () -> new CounterKdfSpec(new byte[1], 0, "name")); + assertThrows(IllegalArgumentException.class, () -> new CounterKdfSpec(new byte[1], -1, "name")); + } + + // The rest of the tests are only available in non-FIPS mode. + @Test + public void concatenationKdfExpectsConcatenationKdfSpecAsKeySpec() throws Exception { + assumeFalse(TestUtil.isFips()); + final SecretKeyFactory skf = + SecretKeyFactory.getInstance("CounterKdfWithHmacSHA256", TestUtil.NATIVE_PROVIDER); + assertThrows( + InvalidKeySpecException.class, () -> skf.generateSecret(new PBEKeySpec(new char[4]))); + } + + @Test + public void counterKdfWithEmptyInfoIsFine() throws Exception { + assumeFalse(TestUtil.isFips()); + final SecretKeyFactory skf = + SecretKeyFactory.getInstance("CounterKdfWithHmacSHA256", TestUtil.NATIVE_PROVIDER); + final CounterKdfSpec spec = new CounterKdfSpec(new byte[1], 10, "name"); + assertEquals(0, spec.getInfo().length); + assertNotNull(skf.generateSecret(spec)); + } + + @ParameterizedTest(name = "{0}") + @MethodSource("counterKdfKatTests") + public void counterKdfKatTests(final RspTestEntry entry) throws Exception { + assumeFalse(TestUtil.isFips()); + final String digest = jceDigestName(entry.getInstance("HASH")); + assumeFalse("SHA1".equals(digest)); + final byte[] expected = entry.getInstanceFromHex("EXPECT"); + final byte[] secret = entry.getInstanceFromHex("SECRET"); + final byte[] info = entry.getInstanceFromHex("INFO"); + + final CounterKdfSpec spec = new CounterKdfSpec(secret, info, expected.length, "SECRET_KEY"); + final String alg = "CounterKdfWithHmac" + digest; + + final SecretKeyFactory skf = SecretKeyFactory.getInstance(alg, TestUtil.NATIVE_PROVIDER); + final byte[] actual = skf.generateSecret(spec).getEncoded(); + assertArrayEquals(expected, actual); + // Checking that ACCP produces the same output as Bouncy Castle: + assertArrayEquals(bcCounterKdf(digest, spec), actual); + } + + private static String jceDigestName(final String digest) { + if (digest.contains("-")) { + return "SHA" + digest.substring(4); + } + return digest; + } + + private static Stream counterKdfKatTests() throws Exception { + return getEntriesFromFile("kbkdf_counter.txt", false); + } + + private static byte[] bcCounterKdf(final String digest, final CounterKdfSpec spec) { + final byte[] result = new byte[spec.getOutputLen()]; + final KDFCounterParameters kdfParameters = + new KDFCounterParameters(spec.getSecret(), spec.getInfo(), 32); + final KDFCounterBytesGenerator kdf = new KDFCounterBytesGenerator(new HMac(bcDigest(digest))); + kdf.init(kdfParameters); + kdf.generateBytes(result, 0, result.length); + return result; + } +} From 35165a3524804a6d98bae36044841e5c50347592 Mon Sep 17 00:00:00 2001 From: Amir Vakili Date: Wed, 28 Aug 2024 18:31:12 +0000 Subject: [PATCH 2/2] Rename variables representing algorithm names --- .../provider/AmazonCorrettoCryptoProvider.java | 12 ++++++------ .../corretto/crypto/provider/CounterKdfSpi.java | 17 +++++++++-------- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/src/com/amazon/corretto/crypto/provider/AmazonCorrettoCryptoProvider.java b/src/com/amazon/corretto/crypto/provider/AmazonCorrettoCryptoProvider.java index c0fa0510..5e096d97 100644 --- a/src/com/amazon/corretto/crypto/provider/AmazonCorrettoCryptoProvider.java +++ b/src/com/amazon/corretto/crypto/provider/AmazonCorrettoCryptoProvider.java @@ -10,9 +10,9 @@ import static com.amazon.corretto.crypto.provider.ConcatenationKdfSpi.CKDF_WITH_SHA256; import static com.amazon.corretto.crypto.provider.ConcatenationKdfSpi.CKDF_WITH_SHA384; import static com.amazon.corretto.crypto.provider.ConcatenationKdfSpi.CKDF_WITH_SHA512; -import static com.amazon.corretto.crypto.provider.CounterKdfSpi.CNTRKDF_WITH_SHA256; -import static com.amazon.corretto.crypto.provider.CounterKdfSpi.CNTRKDF_WITH_SHA384; -import static com.amazon.corretto.crypto.provider.CounterKdfSpi.CNTRKDF_WITH_SHA512; +import static com.amazon.corretto.crypto.provider.CounterKdfSpi.CTR_KDF_WITH_HMAC_SHA256; +import static com.amazon.corretto.crypto.provider.CounterKdfSpi.CTR_KDF_WITH_HMAC_SHA384; +import static com.amazon.corretto.crypto.provider.CounterKdfSpi.CTR_KDF_WITH_HMAC_SHA512; import static com.amazon.corretto.crypto.provider.HkdfSecretKeyFactorySpi.HKDF_WITH_SHA1; import static com.amazon.corretto.crypto.provider.HkdfSecretKeyFactorySpi.HKDF_WITH_SHA256; import static com.amazon.corretto.crypto.provider.HkdfSecretKeyFactorySpi.HKDF_WITH_SHA384; @@ -113,9 +113,9 @@ private void buildServiceMap() { addService("SecretKeyFactory", CKDF_WITH_HMAC_SHA512, concatenationKdfSpi, false); final String counterKdfSpi = "CounterKdfSpi"; - addService("SecretKeyFactory", CNTRKDF_WITH_SHA256, counterKdfSpi, false); - addService("SecretKeyFactory", CNTRKDF_WITH_SHA384, counterKdfSpi, false); - addService("SecretKeyFactory", CNTRKDF_WITH_SHA512, counterKdfSpi, false); + addService("SecretKeyFactory", CTR_KDF_WITH_HMAC_SHA256, counterKdfSpi, false); + addService("SecretKeyFactory", CTR_KDF_WITH_HMAC_SHA384, counterKdfSpi, false); + addService("SecretKeyFactory", CTR_KDF_WITH_HMAC_SHA512, counterKdfSpi, false); } addService("KeyPairGenerator", "RSA", "RsaGen"); diff --git a/src/com/amazon/corretto/crypto/provider/CounterKdfSpi.java b/src/com/amazon/corretto/crypto/provider/CounterKdfSpi.java index 7748df1e..79dab28a 100644 --- a/src/com/amazon/corretto/crypto/provider/CounterKdfSpi.java +++ b/src/com/amazon/corretto/crypto/provider/CounterKdfSpi.java @@ -46,17 +46,18 @@ private static native void nKdf( static final Map INSTANCES = getInstances(); - private static final String CNTR_KDF = "CounterKdf"; - private static final String WITH_HMAC = "WithHmac"; - static final String CNTRKDF_WITH_SHA256 = CNTR_KDF + WITH_HMAC + "SHA256"; - static final String CNTRKDF_WITH_SHA384 = CNTR_KDF + WITH_HMAC + "SHA384"; - static final String CNTRKDF_WITH_SHA512 = CNTR_KDF + WITH_HMAC + "SHA512"; + static final String CTR_KDF_WITH_HMAC_SHA256 = "CounterKdfWithHmacSHA256"; + static final String CTR_KDF_WITH_HMAC_SHA384 = "CounterKdfWithHmacSHA384"; + static final String CTR_KDF_WITH_HMAC_SHA512 = "CounterKdfWithHmacSHA512"; private static Map getInstances() { final Map kdfs = new HashMap<>(); - kdfs.put(getSpiFactoryForAlgName(CNTRKDF_WITH_SHA256), new CounterKdfSpi(Utils.SHA256_CODE)); - kdfs.put(getSpiFactoryForAlgName(CNTRKDF_WITH_SHA384), new CounterKdfSpi(Utils.SHA384_CODE)); - kdfs.put(getSpiFactoryForAlgName(CNTRKDF_WITH_SHA512), new CounterKdfSpi(Utils.SHA512_CODE)); + kdfs.put( + getSpiFactoryForAlgName(CTR_KDF_WITH_HMAC_SHA256), new CounterKdfSpi(Utils.SHA256_CODE)); + kdfs.put( + getSpiFactoryForAlgName(CTR_KDF_WITH_HMAC_SHA384), new CounterKdfSpi(Utils.SHA384_CODE)); + kdfs.put( + getSpiFactoryForAlgName(CTR_KDF_WITH_HMAC_SHA512), new CounterKdfSpi(Utils.SHA512_CODE)); return Collections.unmodifiableMap(kdfs); }