diff options
author | cerevra <cerevra@yandex-team.ru> | 2022-02-10 16:45:58 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:58 +0300 |
commit | bf41dd01f6c920583e9faae7cd55ed25e547e052 (patch) | |
tree | ec7c8c285ffa648a5c5efeff453787a15ab811ac /library/cpp/digest/argonish | |
parent | e2c3e3004f7cd68441cefcfa4aaccd3d8051c846 (diff) | |
download | ydb-bf41dd01f6c920583e9faae7cd55ed25e547e052.tar.gz |
Restoring authorship annotation for <cerevra@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/digest/argonish')
38 files changed, 163 insertions, 163 deletions
diff --git a/library/cpp/digest/argonish/README.md b/library/cpp/digest/argonish/README.md index 7b3ae79cca..9fbacd2504 100644 --- a/library/cpp/digest/argonish/README.md +++ b/library/cpp/digest/argonish/README.md @@ -50,7 +50,7 @@ How to use ---------- ``` -#include <library/cpp/digest/argonish/argon2.h> +#include <library/cpp/digest/argonish/argon2.h> ... uint32_t tcost = 1; /* one pass */ uint32_t mcost = 32; /* in KB */ @@ -59,7 +59,7 @@ NArgonish::TArgon2Factory afactory; THolder<NArgonish::IArgon2Base> argon2 = afactory.Create(NArgonish::EArgon2Type::Argon2d, tcost, mcost, threads); argon2->Hash(input, insize, salt, saltsize, out, outlen); ... -#include <library/cpp/digest/argonish/blake2b.h> +#include <library/cpp/digest/argonish/blake2b.h> ... NArgonish::TBlake2BFactory bfactory; uint32_t outlen = 32; diff --git a/library/cpp/digest/argonish/benchmark/mbench.cpp b/library/cpp/digest/argonish/benchmark/mbench.cpp index 178c1169c9..adff57302a 100644 --- a/library/cpp/digest/argonish/benchmark/mbench.cpp +++ b/library/cpp/digest/argonish/benchmark/mbench.cpp @@ -1,5 +1,5 @@ #include <library/cpp/testing/benchmark/bench.h> -#include <library/cpp/digest/argonish/argon2.h> +#include <library/cpp/digest/argonish/argon2.h> Y_CPU_BENCHMARK(Argon2d_2048_REF, iface) { NArgonish::TArgon2Factory factory; diff --git a/library/cpp/digest/argonish/benchmark/ya.make b/library/cpp/digest/argonish/benchmark/ya.make index 5aad1b238f..48f6f826f3 100644 --- a/library/cpp/digest/argonish/benchmark/ya.make +++ b/library/cpp/digest/argonish/benchmark/ya.make @@ -3,7 +3,7 @@ OWNER(e-sidorov) Y_BENCHMARK() PEERDIR( - library/cpp/digest/argonish + library/cpp/digest/argonish ) SRCS( diff --git a/library/cpp/digest/argonish/factory/factory.cpp b/library/cpp/digest/argonish/factory/factory.cpp index c1f5f5ce79..2008f068c2 100644 --- a/library/cpp/digest/argonish/factory/factory.cpp +++ b/library/cpp/digest/argonish/factory/factory.cpp @@ -2,14 +2,14 @@ // Created by Evgeny Sidorov on 12/04/17. // -#include <library/cpp/digest/argonish/blake2b.h> -#include <library/cpp/digest/argonish/argon2.h> -#include <library/cpp/digest/argonish/internal/proxies/ref/proxy_ref.h> +#include <library/cpp/digest/argonish/blake2b.h> +#include <library/cpp/digest/argonish/argon2.h> +#include <library/cpp/digest/argonish/internal/proxies/ref/proxy_ref.h> #if !defined(_arm64_) -#include <library/cpp/digest/argonish/internal/proxies/sse2/proxy_sse2.h> -#include <library/cpp/digest/argonish/internal/proxies/ssse3/proxy_ssse3.h> -#include <library/cpp/digest/argonish/internal/proxies/sse41/proxy_sse41.h> -#include <library/cpp/digest/argonish/internal/proxies/avx2/proxy_avx2.h> +#include <library/cpp/digest/argonish/internal/proxies/sse2/proxy_sse2.h> +#include <library/cpp/digest/argonish/internal/proxies/ssse3/proxy_ssse3.h> +#include <library/cpp/digest/argonish/internal/proxies/sse41/proxy_sse41.h> +#include <library/cpp/digest/argonish/internal/proxies/avx2/proxy_avx2.h> #endif #include <util/system/cpu_id.h> diff --git a/library/cpp/digest/argonish/internal/argon2/argon2_avx2.h b/library/cpp/digest/argonish/internal/argon2/argon2_avx2.h index 8bf5367817..a1697e649b 100644 --- a/library/cpp/digest/argonish/internal/argon2/argon2_avx2.h +++ b/library/cpp/digest/argonish/internal/argon2/argon2_avx2.h @@ -2,7 +2,7 @@ #include <immintrin.h> #include "argon2_base.h" -#include <library/cpp/digest/argonish/internal/blamka/blamka_avx2.h> +#include <library/cpp/digest/argonish/internal/blamka/blamka_avx2.h> namespace NArgonish { template <ui32 mcost, ui32 threads> diff --git a/library/cpp/digest/argonish/internal/argon2/argon2_base.h b/library/cpp/digest/argonish/internal/argon2/argon2_base.h index 2385cc947c..9b7baf491f 100644 --- a/library/cpp/digest/argonish/internal/argon2/argon2_base.h +++ b/library/cpp/digest/argonish/internal/argon2/argon2_base.h @@ -1,13 +1,13 @@ #pragma once #include <util/generic/yexception.h> -#include <library/cpp/digest/argonish/argon2.h> -#include <library/cpp/digest/argonish/internal/blake2b/blake2b.h> +#include <library/cpp/digest/argonish/argon2.h> +#include <library/cpp/digest/argonish/internal/blake2b/blake2b.h> #include <library/cpp/threading/poor_man_openmp/thread_helper.h> namespace NArgonish { const ui32 ARGON2_PREHASH_DIGEST_LENGTH = 64; - const ui32 ARGON2_SECRET_MAX_LENGTH = 64; + const ui32 ARGON2_SECRET_MAX_LENGTH = 64; const ui32 ARGON2_PREHASH_SEED_LENGTH = 72; const ui32 ARGON2_BLOCK_SIZE = 1024; const ui32 ARGON2_QWORDS_IN_BLOCK = ARGON2_BLOCK_SIZE / 8; diff --git a/library/cpp/digest/argonish/internal/argon2/argon2_ref.h b/library/cpp/digest/argonish/internal/argon2/argon2_ref.h index 8e5e3fa971..e57700c19b 100644 --- a/library/cpp/digest/argonish/internal/argon2/argon2_ref.h +++ b/library/cpp/digest/argonish/internal/argon2/argon2_ref.h @@ -1,7 +1,7 @@ #pragma once #include "argon2_base.h" -#include <library/cpp/digest/argonish/internal/rotations/rotations_ref.h> +#include <library/cpp/digest/argonish/internal/rotations/rotations_ref.h> namespace NArgonish { static inline ui64 FBlaMka(ui64 x, ui64 y) { diff --git a/library/cpp/digest/argonish/internal/argon2/argon2_sse2.h b/library/cpp/digest/argonish/internal/argon2/argon2_sse2.h index 1d2230a657..26a5f7023c 100644 --- a/library/cpp/digest/argonish/internal/argon2/argon2_sse2.h +++ b/library/cpp/digest/argonish/internal/argon2/argon2_sse2.h @@ -2,7 +2,7 @@ #include <emmintrin.h> #include "argon2_base.h" -#include <library/cpp/digest/argonish/internal/blamka/blamka_sse2.h> +#include <library/cpp/digest/argonish/internal/blamka/blamka_sse2.h> namespace NArgonish { template <ui32 mcost, ui32 threads> diff --git a/library/cpp/digest/argonish/internal/argon2/argon2_sse41.h b/library/cpp/digest/argonish/internal/argon2/argon2_sse41.h index 1ad35048ea..50069d7a62 100644 --- a/library/cpp/digest/argonish/internal/argon2/argon2_sse41.h +++ b/library/cpp/digest/argonish/internal/argon2/argon2_sse41.h @@ -2,7 +2,7 @@ #include <smmintrin.h> #include "argon2_base.h" -#include <library/cpp/digest/argonish/internal/blamka/blamka_ssse3.h> +#include <library/cpp/digest/argonish/internal/blamka/blamka_ssse3.h> namespace NArgonish { template <ui32 mcost, ui32 threads> diff --git a/library/cpp/digest/argonish/internal/argon2/argon2_ssse3.h b/library/cpp/digest/argonish/internal/argon2/argon2_ssse3.h index a25a416834..78e0aad805 100644 --- a/library/cpp/digest/argonish/internal/argon2/argon2_ssse3.h +++ b/library/cpp/digest/argonish/internal/argon2/argon2_ssse3.h @@ -3,7 +3,7 @@ #include <emmintrin.h> #include <tmmintrin.h> #include "argon2_base.h" -#include <library/cpp/digest/argonish/internal/blamka/blamka_ssse3.h> +#include <library/cpp/digest/argonish/internal/blamka/blamka_ssse3.h> namespace NArgonish { template <ui32 mcost, ui32 threads> diff --git a/library/cpp/digest/argonish/internal/argon2/ya.make b/library/cpp/digest/argonish/internal/argon2/ya.make index 85459865ba..592e014951 100644 --- a/library/cpp/digest/argonish/internal/argon2/ya.make +++ b/library/cpp/digest/argonish/internal/argon2/ya.make @@ -3,8 +3,8 @@ LIBRARY() OWNER(e-sidorov) PEERDIR( - library/cpp/digest/argonish/internal/blamka - library/cpp/digest/argonish/internal/blake2b + library/cpp/digest/argonish/internal/blamka + library/cpp/digest/argonish/internal/blake2b ) END() diff --git a/library/cpp/digest/argonish/internal/blake2b/blake2b.h b/library/cpp/digest/argonish/internal/blake2b/blake2b.h index 3dcfc3fc48..961172210e 100644 --- a/library/cpp/digest/argonish/internal/blake2b/blake2b.h +++ b/library/cpp/digest/argonish/internal/blake2b/blake2b.h @@ -2,7 +2,7 @@ #include <util/generic/yexception.h> #include <util/system/compiler.h> -#include <library/cpp/digest/argonish/blake2b.h> +#include <library/cpp/digest/argonish/blake2b.h> namespace NArgonish { const ui32 BLAKE2B_BLOCKBYTES = 128; diff --git a/library/cpp/digest/argonish/internal/blake2b/blake2b_avx2.h b/library/cpp/digest/argonish/internal/blake2b/blake2b_avx2.h index 359ca90ebb..d232be4b8d 100644 --- a/library/cpp/digest/argonish/internal/blake2b/blake2b_avx2.h +++ b/library/cpp/digest/argonish/internal/blake2b/blake2b_avx2.h @@ -2,7 +2,7 @@ #include <immintrin.h> #include "blake2b.h" -#include <library/cpp/digest/argonish/internal/rotations/rotations_avx2.h> +#include <library/cpp/digest/argonish/internal/rotations/rotations_avx2.h> namespace NArgonish { template <> diff --git a/library/cpp/digest/argonish/internal/blake2b/blake2b_ref.h b/library/cpp/digest/argonish/internal/blake2b/blake2b_ref.h index ef98ed8fc8..665e62fbbd 100644 --- a/library/cpp/digest/argonish/internal/blake2b/blake2b_ref.h +++ b/library/cpp/digest/argonish/internal/blake2b/blake2b_ref.h @@ -1,7 +1,7 @@ #pragma once #include "blake2b.h" -#include <library/cpp/digest/argonish/internal/rotations/rotations_ref.h> +#include <library/cpp/digest/argonish/internal/rotations/rotations_ref.h> namespace NArgonish { static const ui8 Sigma[12][16] = { diff --git a/library/cpp/digest/argonish/internal/blake2b/blake2b_sse2.h b/library/cpp/digest/argonish/internal/blake2b/blake2b_sse2.h index e85a78044c..31e8616fcc 100644 --- a/library/cpp/digest/argonish/internal/blake2b/blake2b_sse2.h +++ b/library/cpp/digest/argonish/internal/blake2b/blake2b_sse2.h @@ -2,7 +2,7 @@ #include <emmintrin.h> #include "blake2b.h" -#include <library/cpp/digest/argonish/internal/rotations/rotations_sse2.h> +#include <library/cpp/digest/argonish/internal/rotations/rotations_sse2.h> namespace NArgonish { template <> diff --git a/library/cpp/digest/argonish/internal/blake2b/blake2b_sse41.h b/library/cpp/digest/argonish/internal/blake2b/blake2b_sse41.h index 1a033bcceb..1aa0b6d126 100644 --- a/library/cpp/digest/argonish/internal/blake2b/blake2b_sse41.h +++ b/library/cpp/digest/argonish/internal/blake2b/blake2b_sse41.h @@ -3,7 +3,7 @@ #include <smmintrin.h> #include "blake2b.h" #include "load_sse41.h" -#include <library/cpp/digest/argonish/internal/rotations/rotations_ssse3.h> +#include <library/cpp/digest/argonish/internal/rotations/rotations_ssse3.h> namespace NArgonish { template <> diff --git a/library/cpp/digest/argonish/internal/blake2b/blake2b_ssse3.h b/library/cpp/digest/argonish/internal/blake2b/blake2b_ssse3.h index 4cca5a5e7f..f37b589f3c 100644 --- a/library/cpp/digest/argonish/internal/blake2b/blake2b_ssse3.h +++ b/library/cpp/digest/argonish/internal/blake2b/blake2b_ssse3.h @@ -3,7 +3,7 @@ #include <emmintrin.h> #include <tmmintrin.h> #include "blake2b.h" -#include <library/cpp/digest/argonish/internal/rotations/rotations_ssse3.h> +#include <library/cpp/digest/argonish/internal/rotations/rotations_ssse3.h> namespace NArgonish { template <> diff --git a/library/cpp/digest/argonish/internal/blake2b/ya.make b/library/cpp/digest/argonish/internal/blake2b/ya.make index 0aa6806b31..9f679c01ca 100644 --- a/library/cpp/digest/argonish/internal/blake2b/ya.make +++ b/library/cpp/digest/argonish/internal/blake2b/ya.make @@ -3,7 +3,7 @@ LIBRARY() OWNER(e-sidorov) PEERDIR( - library/cpp/digest/argonish/internal/rotations + library/cpp/digest/argonish/internal/rotations ) END() diff --git a/library/cpp/digest/argonish/internal/blamka/blamka_avx2.h b/library/cpp/digest/argonish/internal/blamka/blamka_avx2.h index 02c506d6ff..57246a1c55 100644 --- a/library/cpp/digest/argonish/internal/blamka/blamka_avx2.h +++ b/library/cpp/digest/argonish/internal/blamka/blamka_avx2.h @@ -1,7 +1,7 @@ #pragma once #include <immintrin.h> -#include <library/cpp/digest/argonish/internal/rotations/rotations_avx2.h> +#include <library/cpp/digest/argonish/internal/rotations/rotations_avx2.h> namespace NArgonish { static inline void BlamkaG1AVX2( diff --git a/library/cpp/digest/argonish/internal/blamka/blamka_sse2.h b/library/cpp/digest/argonish/internal/blamka/blamka_sse2.h index 1b55651b34..a35342c29a 100644 --- a/library/cpp/digest/argonish/internal/blamka/blamka_sse2.h +++ b/library/cpp/digest/argonish/internal/blamka/blamka_sse2.h @@ -1,6 +1,6 @@ #pragma once -#include <library/cpp/digest/argonish/internal/rotations/rotations_sse2.h> +#include <library/cpp/digest/argonish/internal/rotations/rotations_sse2.h> namespace NArgonish { static inline void BlamkaG1SSE2( diff --git a/library/cpp/digest/argonish/internal/blamka/blamka_ssse3.h b/library/cpp/digest/argonish/internal/blamka/blamka_ssse3.h index 46e8500cd6..81a27353a4 100644 --- a/library/cpp/digest/argonish/internal/blamka/blamka_ssse3.h +++ b/library/cpp/digest/argonish/internal/blamka/blamka_ssse3.h @@ -1,6 +1,6 @@ #pragma once -#include <library/cpp/digest/argonish/internal/rotations/rotations_ssse3.h> +#include <library/cpp/digest/argonish/internal/rotations/rotations_ssse3.h> namespace NArgonish { static inline void BlamkaG1SSSE3( diff --git a/library/cpp/digest/argonish/internal/blamka/ya.make b/library/cpp/digest/argonish/internal/blamka/ya.make index 0aa6806b31..9f679c01ca 100644 --- a/library/cpp/digest/argonish/internal/blamka/ya.make +++ b/library/cpp/digest/argonish/internal/blamka/ya.make @@ -3,7 +3,7 @@ LIBRARY() OWNER(e-sidorov) PEERDIR( - library/cpp/digest/argonish/internal/rotations + library/cpp/digest/argonish/internal/rotations ) END() diff --git a/library/cpp/digest/argonish/internal/proxies/avx2/proxy_avx2.cpp b/library/cpp/digest/argonish/internal/proxies/avx2/proxy_avx2.cpp index c1cf004f58..9602959df4 100644 --- a/library/cpp/digest/argonish/internal/proxies/avx2/proxy_avx2.cpp +++ b/library/cpp/digest/argonish/internal/proxies/avx2/proxy_avx2.cpp @@ -3,10 +3,10 @@ // #include "proxy_avx2.h" -#include <library/cpp/digest/argonish/internal/argon2/argon2_base.h> -#include <library/cpp/digest/argonish/internal/argon2/argon2_avx2.h> -#include <library/cpp/digest/argonish/internal/blake2b/blake2b.h> -#include <library/cpp/digest/argonish/internal/blake2b/blake2b_avx2.h> +#include <library/cpp/digest/argonish/internal/argon2/argon2_base.h> +#include <library/cpp/digest/argonish/internal/argon2/argon2_avx2.h> +#include <library/cpp/digest/argonish/internal/blake2b/blake2b.h> +#include <library/cpp/digest/argonish/internal/blake2b/blake2b_avx2.h> #define ZEROUPPER _mm256_zeroupper(); diff --git a/library/cpp/digest/argonish/internal/proxies/avx2/proxy_avx2.h b/library/cpp/digest/argonish/internal/proxies/avx2/proxy_avx2.h index eec0094563..9d082255d5 100644 --- a/library/cpp/digest/argonish/internal/proxies/avx2/proxy_avx2.h +++ b/library/cpp/digest/argonish/internal/proxies/avx2/proxy_avx2.h @@ -1,9 +1,9 @@ #pragma once #include <util/generic/yexception.h> -#include <library/cpp/digest/argonish/argon2.h> -#include <library/cpp/digest/argonish/blake2b.h> -#include <library/cpp/digest/argonish/internal/proxies/macro/proxy_macros.h> +#include <library/cpp/digest/argonish/argon2.h> +#include <library/cpp/digest/argonish/blake2b.h> +#include <library/cpp/digest/argonish/internal/proxies/macro/proxy_macros.h> namespace NArgonish { ARGON2_PROXY_CLASS_DECL(AVX2) diff --git a/library/cpp/digest/argonish/internal/proxies/macro/proxy_macros.h b/library/cpp/digest/argonish/internal/proxies/macro/proxy_macros.h index 5ed5f53b4f..acc2284e60 100644 --- a/library/cpp/digest/argonish/internal/proxies/macro/proxy_macros.h +++ b/library/cpp/digest/argonish/internal/proxies/macro/proxy_macros.h @@ -45,12 +45,12 @@ ythrow yexception() << "key is null or keylen equals 0 or key is too long"; \ \ ARGON2_INSTANCE_DECL(IS, 1, 1) \ - ARGON2_INSTANCE_DECL(IS, 8, 1) \ + ARGON2_INSTANCE_DECL(IS, 8, 1) \ ARGON2_INSTANCE_DECL(IS, 16, 1) \ ARGON2_INSTANCE_DECL(IS, 32, 1) \ ARGON2_INSTANCE_DECL(IS, 64, 1) \ - ARGON2_INSTANCE_DECL(IS, 128, 1) \ - ARGON2_INSTANCE_DECL(IS, 256, 1) \ + ARGON2_INSTANCE_DECL(IS, 128, 1) \ + ARGON2_INSTANCE_DECL(IS, 256, 1) \ ARGON2_INSTANCE_DECL(IS, 512, 1) \ ARGON2_INSTANCE_DECL(IS, 1024, 1) \ ARGON2_INSTANCE_DECL(IS, 2048, 1) \ diff --git a/library/cpp/digest/argonish/internal/proxies/ref/proxy_ref.cpp b/library/cpp/digest/argonish/internal/proxies/ref/proxy_ref.cpp index 0bc51866fd..9cff2e41ff 100644 --- a/library/cpp/digest/argonish/internal/proxies/ref/proxy_ref.cpp +++ b/library/cpp/digest/argonish/internal/proxies/ref/proxy_ref.cpp @@ -3,10 +3,10 @@ // #include "proxy_ref.h" -#include <library/cpp/digest/argonish/internal/argon2/argon2_base.h> -#include <library/cpp/digest/argonish/internal/argon2/argon2_ref.h> -#include <library/cpp/digest/argonish/internal/blake2b/blake2b.h> -#include <library/cpp/digest/argonish/internal/blake2b/blake2b_ref.h> +#include <library/cpp/digest/argonish/internal/argon2/argon2_base.h> +#include <library/cpp/digest/argonish/internal/argon2/argon2_ref.h> +#include <library/cpp/digest/argonish/internal/blake2b/blake2b.h> +#include <library/cpp/digest/argonish/internal/blake2b/blake2b_ref.h> #include <stdexcept> diff --git a/library/cpp/digest/argonish/internal/proxies/ref/proxy_ref.h b/library/cpp/digest/argonish/internal/proxies/ref/proxy_ref.h index 821abc50cd..9123c4f201 100644 --- a/library/cpp/digest/argonish/internal/proxies/ref/proxy_ref.h +++ b/library/cpp/digest/argonish/internal/proxies/ref/proxy_ref.h @@ -1,9 +1,9 @@ #pragma once #include <util/generic/yexception.h> -#include <library/cpp/digest/argonish/argon2.h> -#include <library/cpp/digest/argonish/blake2b.h> -#include <library/cpp/digest/argonish/internal/proxies/macro/proxy_macros.h> +#include <library/cpp/digest/argonish/argon2.h> +#include <library/cpp/digest/argonish/blake2b.h> +#include <library/cpp/digest/argonish/internal/proxies/macro/proxy_macros.h> namespace NArgonish { ARGON2_PROXY_CLASS_DECL(REF) diff --git a/library/cpp/digest/argonish/internal/proxies/ref/ya.make b/library/cpp/digest/argonish/internal/proxies/ref/ya.make index 7a15f44611..b38ff92194 100644 --- a/library/cpp/digest/argonish/internal/proxies/ref/ya.make +++ b/library/cpp/digest/argonish/internal/proxies/ref/ya.make @@ -5,9 +5,9 @@ LIBRARY() NO_UTIL() PEERDIR( - library/cpp/digest/argonish/internal/proxies/macro - library/cpp/digest/argonish/internal/argon2 - library/cpp/digest/argonish/internal/blake2b + library/cpp/digest/argonish/internal/proxies/macro + library/cpp/digest/argonish/internal/argon2 + library/cpp/digest/argonish/internal/blake2b ) SRCS( diff --git a/library/cpp/digest/argonish/internal/proxies/sse2/proxy_sse2.cpp b/library/cpp/digest/argonish/internal/proxies/sse2/proxy_sse2.cpp index 3e63c9ad62..16e5c18df6 100644 --- a/library/cpp/digest/argonish/internal/proxies/sse2/proxy_sse2.cpp +++ b/library/cpp/digest/argonish/internal/proxies/sse2/proxy_sse2.cpp @@ -3,10 +3,10 @@ // #include "proxy_sse2.h" -#include <library/cpp/digest/argonish/internal/argon2/argon2_base.h> -#include <library/cpp/digest/argonish/internal/argon2/argon2_sse2.h> -#include <library/cpp/digest/argonish/internal/blake2b/blake2b.h> -#include <library/cpp/digest/argonish/internal/blake2b/blake2b_sse2.h> +#include <library/cpp/digest/argonish/internal/argon2/argon2_base.h> +#include <library/cpp/digest/argonish/internal/argon2/argon2_sse2.h> +#include <library/cpp/digest/argonish/internal/blake2b/blake2b.h> +#include <library/cpp/digest/argonish/internal/blake2b/blake2b_sse2.h> #define ZEROUPPER ; diff --git a/library/cpp/digest/argonish/internal/proxies/sse2/proxy_sse2.h b/library/cpp/digest/argonish/internal/proxies/sse2/proxy_sse2.h index a2b74cd9a7..3173078647 100644 --- a/library/cpp/digest/argonish/internal/proxies/sse2/proxy_sse2.h +++ b/library/cpp/digest/argonish/internal/proxies/sse2/proxy_sse2.h @@ -1,9 +1,9 @@ #pragma once #include <util/generic/yexception.h> -#include <library/cpp/digest/argonish/argon2.h> -#include <library/cpp/digest/argonish/blake2b.h> -#include <library/cpp/digest/argonish/internal/proxies/macro/proxy_macros.h> +#include <library/cpp/digest/argonish/argon2.h> +#include <library/cpp/digest/argonish/blake2b.h> +#include <library/cpp/digest/argonish/internal/proxies/macro/proxy_macros.h> namespace NArgonish { ARGON2_PROXY_CLASS_DECL(SSE2) diff --git a/library/cpp/digest/argonish/internal/proxies/sse41/proxy_sse41.cpp b/library/cpp/digest/argonish/internal/proxies/sse41/proxy_sse41.cpp index b633ad8cbf..9aa1beb42b 100644 --- a/library/cpp/digest/argonish/internal/proxies/sse41/proxy_sse41.cpp +++ b/library/cpp/digest/argonish/internal/proxies/sse41/proxy_sse41.cpp @@ -3,10 +3,10 @@ // #include "proxy_sse41.h" -#include <library/cpp/digest/argonish/internal/argon2/argon2_base.h> -#include <library/cpp/digest/argonish/internal/argon2/argon2_sse41.h> -#include <library/cpp/digest/argonish/internal/blake2b/blake2b.h> -#include <library/cpp/digest/argonish/internal/blake2b/blake2b_sse41.h> +#include <library/cpp/digest/argonish/internal/argon2/argon2_base.h> +#include <library/cpp/digest/argonish/internal/argon2/argon2_sse41.h> +#include <library/cpp/digest/argonish/internal/blake2b/blake2b.h> +#include <library/cpp/digest/argonish/internal/blake2b/blake2b_sse41.h> #define ZEROUPPER ; diff --git a/library/cpp/digest/argonish/internal/proxies/sse41/proxy_sse41.h b/library/cpp/digest/argonish/internal/proxies/sse41/proxy_sse41.h index 2a4b6614aa..8e7f61404b 100644 --- a/library/cpp/digest/argonish/internal/proxies/sse41/proxy_sse41.h +++ b/library/cpp/digest/argonish/internal/proxies/sse41/proxy_sse41.h @@ -1,9 +1,9 @@ #pragma once #include <util/generic/yexception.h> -#include <library/cpp/digest/argonish/argon2.h> -#include <library/cpp/digest/argonish/blake2b.h> -#include <library/cpp/digest/argonish/internal/proxies/macro/proxy_macros.h> +#include <library/cpp/digest/argonish/argon2.h> +#include <library/cpp/digest/argonish/blake2b.h> +#include <library/cpp/digest/argonish/internal/proxies/macro/proxy_macros.h> namespace NArgonish { ARGON2_PROXY_CLASS_DECL(SSE41) diff --git a/library/cpp/digest/argonish/internal/proxies/ssse3/proxy_ssse3.cpp b/library/cpp/digest/argonish/internal/proxies/ssse3/proxy_ssse3.cpp index d77b55737c..71b5b5fa27 100644 --- a/library/cpp/digest/argonish/internal/proxies/ssse3/proxy_ssse3.cpp +++ b/library/cpp/digest/argonish/internal/proxies/ssse3/proxy_ssse3.cpp @@ -3,10 +3,10 @@ // #include "proxy_ssse3.h" -#include <library/cpp/digest/argonish/internal/argon2/argon2_base.h> -#include <library/cpp/digest/argonish/internal/argon2/argon2_ssse3.h> -#include <library/cpp/digest/argonish/internal/blake2b/blake2b.h> -#include <library/cpp/digest/argonish/internal/blake2b/blake2b_ssse3.h> +#include <library/cpp/digest/argonish/internal/argon2/argon2_base.h> +#include <library/cpp/digest/argonish/internal/argon2/argon2_ssse3.h> +#include <library/cpp/digest/argonish/internal/blake2b/blake2b.h> +#include <library/cpp/digest/argonish/internal/blake2b/blake2b_ssse3.h> #define ZEROUPPER ; diff --git a/library/cpp/digest/argonish/internal/proxies/ssse3/proxy_ssse3.h b/library/cpp/digest/argonish/internal/proxies/ssse3/proxy_ssse3.h index 994133e88e..a025f99714 100644 --- a/library/cpp/digest/argonish/internal/proxies/ssse3/proxy_ssse3.h +++ b/library/cpp/digest/argonish/internal/proxies/ssse3/proxy_ssse3.h @@ -1,9 +1,9 @@ #pragma once #include <util/generic/yexception.h> -#include <library/cpp/digest/argonish/argon2.h> -#include <library/cpp/digest/argonish/blake2b.h> -#include <library/cpp/digest/argonish/internal/proxies/macro/proxy_macros.h> +#include <library/cpp/digest/argonish/argon2.h> +#include <library/cpp/digest/argonish/blake2b.h> +#include <library/cpp/digest/argonish/internal/proxies/macro/proxy_macros.h> namespace NArgonish { ARGON2_PROXY_CLASS_DECL(SSSE3) diff --git a/library/cpp/digest/argonish/ut/ut.cpp b/library/cpp/digest/argonish/ut/ut.cpp index 12ef530a18..e7d8b795b9 100644 --- a/library/cpp/digest/argonish/ut/ut.cpp +++ b/library/cpp/digest/argonish/ut/ut.cpp @@ -1,5 +1,5 @@ -#include <library/cpp/digest/argonish/argon2.h> -#include <library/cpp/digest/argonish/blake2b.h> +#include <library/cpp/digest/argonish/argon2.h> +#include <library/cpp/digest/argonish/blake2b.h> #include <library/cpp/testing/unittest/registar.h> Y_UNIT_TEST_SUITE(ArgonishTest) { @@ -134,7 +134,7 @@ Y_UNIT_TEST_SUITE(ArgonishTest) { const ui32 mcost = 16; const ui32 tcost = 1; TArrayHolder<ui8> memory(new ui8[mcost * 1024]); - const ui8 TResult[165] = { + const ui8 TResult[165] = { 0xe6, 0xff, 0x7b, 0xa1, 0xfa, 0x93, 0x0a, 0x51, 0x24, 0xf3, 0xbc, 0xc4, 0x98, 0xe2, 0x32, 0x08, 0x22, 0x7d, 0x4d, 0xf9, 0xe7, 0x2c, 0xd2, 0xd8, @@ -163,13 +163,13 @@ Y_UNIT_TEST_SUITE(ArgonishTest) { for (int i = (int)NArgonish::EInstructionSet::REF; i <= (int)maxInstructionSet; ++i) { auto argon2d = factory.Create((NArgonish::EInstructionSet)i, NArgonish::EArgon2Type::Argon2d, tcost, mcost, 1, FrSecret, sizeof(FrSecret)); - ui8 hashResult[sizeof(TResult)]; + ui8 hashResult[sizeof(TResult)]; argon2d->HashWithCustomMemory(memory.Get(), mcost * 1024, FrPassword, sizeof(FrPassword), FrSalt, sizeof(FrSalt), hashResult, sizeof(hashResult)); - UNIT_ASSERT(memcmp(hashResult, TResult, sizeof(hashResult)) == 0); + UNIT_ASSERT(memcmp(hashResult, TResult, sizeof(hashResult)) == 0); UNIT_ASSERT(argon2d->VerifyWithCustomMemory(memory.Get(), mcost * 1024, FrPassword, sizeof(FrPassword), - FrSalt, sizeof(FrSalt), TResult, sizeof(TResult))); + FrSalt, sizeof(FrSalt), TResult, sizeof(TResult))); } } catch (...) { UNIT_FAIL("Argon2 fraction len test fail"); @@ -195,7 +195,7 @@ Y_UNIT_TEST_SUITE(ArgonishTest) { } Y_UNIT_TEST(Argon2d) { - const ui8 TResult[32] = { + const ui8 TResult[32] = { 0x7b, 0xa5, 0xa1, 0x7a, 0x72, 0xf7, 0xe5, 0x99, 0x77, 0xf7, 0xf2, 0x3d, 0x10, 0xe6, 0x21, 0x89, 0x8c, 0x63, 0xce, 0xbe, 0xed, 0xda, 0xbd, 0x15, @@ -212,17 +212,17 @@ Y_UNIT_TEST_SUITE(ArgonishTest) { argon2d->Hash(GenKatPassword, sizeof(GenKatPassword), GenKatSalt, sizeof(GenKatSalt), result, sizeof(result), GenKatAAD, sizeof(GenKatAAD)); - UNIT_ASSERT(memcmp(result, TResult, sizeof(result)) == 0); + UNIT_ASSERT(memcmp(result, TResult, sizeof(result)) == 0); UNIT_ASSERT(argon2d->Verify(GenKatPassword, sizeof(GenKatPassword), GenKatSalt, sizeof(GenKatSalt), - TResult, sizeof(TResult), + TResult, sizeof(TResult), GenKatAAD, sizeof(GenKatAAD))); } } Y_UNIT_TEST(Argon2i) { - const ui8 TResult[32] = { + const ui8 TResult[32] = { 0x87, 0x4d, 0x23, 0xfb, 0x9f, 0x55, 0xe2, 0xff, 0x66, 0xbc, 0x19, 0x03, 0x46, 0xe7, 0x01, 0x19, 0x7c, 0x9f, 0x25, 0xd1, 0x1d, 0xa4, 0x5a, 0xad, @@ -239,17 +239,17 @@ Y_UNIT_TEST_SUITE(ArgonishTest) { argon2i->Hash(GenKatPassword, sizeof(GenKatPassword), GenKatSalt, sizeof(GenKatSalt), result, sizeof(result), GenKatAAD, sizeof(GenKatAAD)); - UNIT_ASSERT(memcmp(result, TResult, sizeof(result)) == 0); + UNIT_ASSERT(memcmp(result, TResult, sizeof(result)) == 0); UNIT_ASSERT(argon2i->Verify(GenKatPassword, sizeof(GenKatPassword), GenKatSalt, sizeof(GenKatSalt), - TResult, sizeof(TResult), + TResult, sizeof(TResult), GenKatAAD, sizeof(GenKatAAD))); } } Y_UNIT_TEST(Argon2id) { - const ui8 TResult[32] = { + const ui8 TResult[32] = { 0x99, 0xdf, 0xcf, 0xc2, 0x89, 0x76, 0x93, 0x9d, 0xa2, 0x97, 0x09, 0x44, 0x34, 0xd8, 0x6f, 0xd0, 0x0c, 0x94, 0x9a, 0x0f, 0x31, 0x8c, 0x22, 0xf0, @@ -266,17 +266,17 @@ Y_UNIT_TEST_SUITE(ArgonishTest) { argon2id->Hash(GenKatPassword, sizeof(GenKatPassword), GenKatSalt, sizeof(GenKatSalt), result, sizeof(result), GenKatAAD, sizeof(GenKatAAD)); - UNIT_ASSERT(memcmp(result, TResult, sizeof(result)) == 0); + UNIT_ASSERT(memcmp(result, TResult, sizeof(result)) == 0); UNIT_ASSERT(argon2id->Verify(GenKatPassword, sizeof(GenKatPassword), GenKatSalt, sizeof(GenKatSalt), - TResult, sizeof(TResult), + TResult, sizeof(TResult), GenKatAAD, sizeof(GenKatAAD))); } } Y_UNIT_TEST(Argon2d_2p) { - const ui8 TResult[32] = { + const ui8 TResult[32] = { 0x59, 0xb0, 0x94, 0x62, 0xcf, 0xdc, 0xd2, 0xb4, 0x0a, 0xbd, 0x17, 0x81, 0x0a, 0x47, 0x4a, 0x8e, 0xc1, 0xab, 0xb7, 0xc1, 0x8d, 0x07, 0x53, 0x7c, @@ -293,17 +293,17 @@ Y_UNIT_TEST_SUITE(ArgonishTest) { argon2d->Hash(GenKatPassword, sizeof(GenKatPassword), GenKatSalt, sizeof(GenKatSalt), result, sizeof(result), GenKatAAD, sizeof(GenKatAAD)); - UNIT_ASSERT(memcmp(result, TResult, sizeof(result)) == 0); + UNIT_ASSERT(memcmp(result, TResult, sizeof(result)) == 0); UNIT_ASSERT(argon2d->Verify(GenKatPassword, sizeof(GenKatPassword), GenKatSalt, sizeof(GenKatSalt), - TResult, sizeof(TResult), + TResult, sizeof(TResult), GenKatAAD, sizeof(GenKatAAD))); } } Y_UNIT_TEST(Argon2i_2p) { - const ui8 TResult[32] = { + const ui8 TResult[32] = { 0xc1, 0x0f, 0x00, 0x5e, 0xf8, 0x78, 0xc8, 0x07, 0x0e, 0x2c, 0xc5, 0x2f, 0x57, 0x75, 0x25, 0xc9, 0x71, 0xc7, 0x30, 0xeb, 0x00, 0x64, 0x4a, 0x4e, @@ -320,17 +320,17 @@ Y_UNIT_TEST_SUITE(ArgonishTest) { argon2i->Hash(GenKatPassword, sizeof(GenKatPassword), GenKatSalt, sizeof(GenKatSalt), result, sizeof(result), GenKatAAD, sizeof(GenKatAAD)); - UNIT_ASSERT(memcmp(result, TResult, sizeof(result)) == 0); + UNIT_ASSERT(memcmp(result, TResult, sizeof(result)) == 0); UNIT_ASSERT(argon2i->Verify(GenKatPassword, sizeof(GenKatPassword), GenKatSalt, sizeof(GenKatSalt), - TResult, sizeof(TResult), + TResult, sizeof(TResult), GenKatAAD, sizeof(GenKatAAD))); } } Y_UNIT_TEST(Argon2id_2p) { - const ui8 TResult[32] = { + const ui8 TResult[32] = { 0x6c, 0x00, 0xb7, 0xa9, 0x00, 0xe5, 0x00, 0x4c, 0x24, 0x46, 0x9e, 0xc1, 0xe7, 0xc0, 0x1a, 0x99, 0xb2, 0xb8, 0xf7, 0x73, 0x75, 0xd4, 0xec, 0xa7, @@ -347,17 +347,17 @@ Y_UNIT_TEST_SUITE(ArgonishTest) { argon2id->Hash(GenKatPassword, sizeof(GenKatPassword), GenKatSalt, sizeof(GenKatSalt), result, sizeof(result), GenKatAAD, sizeof(GenKatAAD)); - UNIT_ASSERT(memcmp(result, TResult, sizeof(result)) == 0); + UNIT_ASSERT(memcmp(result, TResult, sizeof(result)) == 0); UNIT_ASSERT(argon2id->Verify(GenKatPassword, sizeof(GenKatPassword), GenKatSalt, sizeof(GenKatSalt), - TResult, sizeof(TResult), + TResult, sizeof(TResult), GenKatAAD, sizeof(GenKatAAD))); } } Y_UNIT_TEST(Argon2d_2p_2th) { - const ui8 TResult[32] = { + const ui8 TResult[32] = { 0x2b, 0x47, 0x35, 0x39, 0x4a, 0x40, 0x3c, 0xc9, 0x05, 0xfb, 0x51, 0x25, 0x96, 0x68, 0x64, 0x43, 0x02, 0x16, 0x38, 0xa6, 0xc1, 0x58, 0xfc, 0x8d, @@ -374,17 +374,17 @@ Y_UNIT_TEST_SUITE(ArgonishTest) { argon2d->Hash(GenKatPassword, sizeof(GenKatPassword), GenKatSalt, sizeof(GenKatSalt), result, sizeof(result), GenKatAAD, sizeof(GenKatAAD)); - UNIT_ASSERT(memcmp(result, TResult, sizeof(result)) == 0); + UNIT_ASSERT(memcmp(result, TResult, sizeof(result)) == 0); UNIT_ASSERT(argon2d->Verify(GenKatPassword, sizeof(GenKatPassword), GenKatSalt, sizeof(GenKatSalt), - TResult, sizeof(TResult), + TResult, sizeof(TResult), GenKatAAD, sizeof(GenKatAAD))); } } Y_UNIT_TEST(Argon2id_2p_4th) { - const ui8 TResult[32] = { + const ui8 TResult[32] = { 0x4f, 0x93, 0xb5, 0xad, 0x78, 0xa4, 0xa9, 0x49, 0xfb, 0xe3, 0x55, 0x96, 0xd5, 0xa0, 0xc2, 0xab, 0x6f, 0x52, 0x2d, 0x2d, 0x29, 0xbc, 0x98, 0x49, @@ -401,17 +401,17 @@ Y_UNIT_TEST_SUITE(ArgonishTest) { argon2id->Hash(GenKatPassword, sizeof(GenKatPassword), GenKatSalt, sizeof(GenKatSalt), result, sizeof(result), GenKatAAD, sizeof(GenKatAAD)); - UNIT_ASSERT(memcmp(result, TResult, sizeof(result)) == 0); + UNIT_ASSERT(memcmp(result, TResult, sizeof(result)) == 0); UNIT_ASSERT(argon2id->Verify(GenKatPassword, sizeof(GenKatPassword), GenKatSalt, sizeof(GenKatSalt), - TResult, sizeof(TResult), + TResult, sizeof(TResult), GenKatAAD, sizeof(GenKatAAD))); } } Y_UNIT_TEST(Argon2d_2p_4th) { - const ui8 TResult[32] = { + const ui8 TResult[32] = { 0x8f, 0xa2, 0x7c, 0xed, 0x28, 0x38, 0x79, 0x0f, 0xba, 0x5c, 0x11, 0x85, 0x1c, 0xdf, 0x90, 0x88, 0xb2, 0x18, 0x44, 0xd7, 0xf0, 0x4c, 0x97, 0xb2, @@ -428,17 +428,17 @@ Y_UNIT_TEST_SUITE(ArgonishTest) { argon2d->Hash(GenKatPassword, sizeof(GenKatPassword), GenKatSalt, sizeof(GenKatSalt), result, sizeof(result), GenKatAAD, sizeof(GenKatAAD)); - UNIT_ASSERT(memcmp(result, TResult, sizeof(result)) == 0); + UNIT_ASSERT(memcmp(result, TResult, sizeof(result)) == 0); UNIT_ASSERT(argon2d->Verify(GenKatPassword, sizeof(GenKatPassword), GenKatSalt, sizeof(GenKatSalt), - TResult, sizeof(TResult), + TResult, sizeof(TResult), GenKatAAD, sizeof(GenKatAAD))); } } Y_UNIT_TEST(Argon2i_2p_4th) { - const ui8 TResult[32] = { + const ui8 TResult[32] = { 0x61, 0x1c, 0x99, 0x3c, 0xb0, 0xb7, 0x23, 0x16, 0xbd, 0xa2, 0x6c, 0x4c, 0x2f, 0xe8, 0x2d, 0x39, 0x9c, 0x8f, 0x1c, 0xfd, 0x45, 0xd9, 0x58, 0xa9, @@ -455,17 +455,17 @@ Y_UNIT_TEST_SUITE(ArgonishTest) { argon2i->Hash(GenKatPassword, sizeof(GenKatPassword), GenKatSalt, sizeof(GenKatSalt), result, sizeof(result), GenKatAAD, sizeof(GenKatAAD)); - UNIT_ASSERT(memcmp(result, TResult, sizeof(result)) == 0); + UNIT_ASSERT(memcmp(result, TResult, sizeof(result)) == 0); UNIT_ASSERT(argon2i->Verify(GenKatPassword, sizeof(GenKatPassword), GenKatSalt, sizeof(GenKatSalt), - TResult, sizeof(TResult), + TResult, sizeof(TResult), GenKatAAD, sizeof(GenKatAAD))); } } Y_UNIT_TEST(Argon2d_128) { - const ui8 TResult[128] = { + const ui8 TResult[128] = { 0x4e, 0xc4, 0x6c, 0x4e, 0x8c, 0x32, 0x89, 0x65, 0xf9, 0x82, 0x2b, 0x00, 0x95, 0x00, 0x50, 0x0a, 0x72, 0x0d, 0xc5, 0x12, 0x8d, 0x6b, 0xbd, 0x84, @@ -494,17 +494,17 @@ Y_UNIT_TEST_SUITE(ArgonishTest) { argon2d->Hash(GenKatPassword, sizeof(GenKatPassword), GenKatSalt, sizeof(GenKatSalt), result, sizeof(result), GenKatAAD, sizeof(GenKatAAD)); - UNIT_ASSERT(memcmp(result, TResult, sizeof(result)) == 0); + UNIT_ASSERT(memcmp(result, TResult, sizeof(result)) == 0); UNIT_ASSERT(argon2d->Verify(GenKatPassword, sizeof(GenKatPassword), GenKatSalt, sizeof(GenKatSalt), - TResult, sizeof(TResult), + TResult, sizeof(TResult), GenKatAAD, sizeof(GenKatAAD))); } } Y_UNIT_TEST(Blake2B_16_ABC) { - const ui8 TResult[16] = { + const ui8 TResult[16] = { 0xcf, 0x4a, 0xb7, 0x91, 0xc6, 0x2b, 0x8d, 0x2b, 0x21, 0x09, 0xc9, 0x02, 0x75, 0x28, 0x78, 0x16}; const ui8 data[] = {'a', 'b', 'c'}; @@ -512,18 +512,18 @@ Y_UNIT_TEST_SUITE(ArgonishTest) { NArgonish::TBlake2BFactory factory; NArgonish::EInstructionSet maxInstructionSet = factory.GetInstructionSet(); for (int i = (int)NArgonish::EInstructionSet::REF; i <= (int)maxInstructionSet; ++i) { - auto blake2b = factory.Create((NArgonish::EInstructionSet)i, sizeof(TResult)); + auto blake2b = factory.Create((NArgonish::EInstructionSet)i, sizeof(TResult)); ui8 hashResult[16] = {0}; blake2b->Update(data, sizeof(data)); blake2b->Final(hashResult, sizeof(hashResult)); - UNIT_ASSERT(memcmp(hashResult, TResult, sizeof(TResult)) == 0); + UNIT_ASSERT(memcmp(hashResult, TResult, sizeof(TResult)) == 0); } } Y_UNIT_TEST(Blake2B_64_ABC) { - const ui8 TResult[64] = { + const ui8 TResult[64] = { 0xba, 0x80, 0xa5, 0x3f, 0x98, 0x1c, 0x4d, 0x0d, 0x6a, 0x27, 0x97, 0xb6, 0x9f, 0x12, 0xf6, 0xe9, 0x4c, 0x21, 0x2f, 0x14, 0x68, 0x5a, 0xc4, 0xb7, @@ -537,13 +537,13 @@ Y_UNIT_TEST_SUITE(ArgonishTest) { NArgonish::TBlake2BFactory factory; NArgonish::EInstructionSet maxInstructionSet = factory.GetInstructionSet(); for (int i = (int)NArgonish::EInstructionSet::REF; i <= (int)maxInstructionSet; ++i) { - auto blake2b = factory.Create((NArgonish::EInstructionSet)i, sizeof(TResult)); + auto blake2b = factory.Create((NArgonish::EInstructionSet)i, sizeof(TResult)); ui8 hashResult[64] = {0}; blake2b->Update(data, sizeof(data)); blake2b->Final(hashResult, sizeof(hashResult)); - UNIT_ASSERT(memcmp(hashResult, TResult, sizeof(TResult)) == 0); + UNIT_ASSERT(memcmp(hashResult, TResult, sizeof(TResult)) == 0); } } } diff --git a/library/cpp/digest/argonish/ut/ya.make b/library/cpp/digest/argonish/ut/ya.make index 3440908799..965f23a5df 100644 --- a/library/cpp/digest/argonish/ut/ya.make +++ b/library/cpp/digest/argonish/ut/ya.make @@ -1,9 +1,9 @@ -UNITTEST_FOR(library/cpp/digest/argonish) +UNITTEST_FOR(library/cpp/digest/argonish) OWNER(e-sidorov) PEERDIR( - library/cpp/digest/argonish + library/cpp/digest/argonish ) SRCS( diff --git a/library/cpp/digest/argonish/ut_fat/ut.cpp b/library/cpp/digest/argonish/ut_fat/ut.cpp index 41fa001685..535b6d588a 100644 --- a/library/cpp/digest/argonish/ut_fat/ut.cpp +++ b/library/cpp/digest/argonish/ut_fat/ut.cpp @@ -1,5 +1,5 @@ -#include <library/cpp/digest/argonish/argon2.h> -#include <library/cpp/digest/argonish/blake2b.h> +#include <library/cpp/digest/argonish/argon2.h> +#include <library/cpp/digest/argonish/blake2b.h> #include <library/cpp/testing/unittest/registar.h> Y_UNIT_TEST_SUITE(ArgonishTest) { @@ -100,7 +100,7 @@ Y_UNIT_TEST_SUITE(ArgonishTest) { } Y_UNIT_TEST(Argon2d) { - const ui8 TResult[32] = { + const ui8 TResult[32] = { 0x7b, 0xa5, 0xa1, 0x7a, 0x72, 0xf7, 0xe5, 0x99, 0x77, 0xf7, 0xf2, 0x3d, 0x10, 0xe6, 0x21, 0x89, 0x8c, 0x63, 0xce, 0xbe, 0xed, 0xda, 0xbd, 0x15, @@ -116,17 +116,17 @@ Y_UNIT_TEST_SUITE(ArgonishTest) { argon2d->Hash(GenKatPassword, sizeof(GenKatPassword), GenKatSalt, sizeof(GenKatSalt), result, sizeof(result), GenKatAAD, sizeof(GenKatAAD)); - UNIT_ASSERT(memcmp(result, TResult, sizeof(result)) == 0); + UNIT_ASSERT(memcmp(result, TResult, sizeof(result)) == 0); UNIT_ASSERT(argon2d->Verify(GenKatPassword, sizeof(GenKatPassword), GenKatSalt, sizeof(GenKatSalt), - TResult, sizeof(TResult), + TResult, sizeof(TResult), GenKatAAD, sizeof(GenKatAAD))); } } Y_UNIT_TEST(Argon2i) { - const ui8 TResult[32] = { + const ui8 TResult[32] = { 0x87, 0x4d, 0x23, 0xfb, 0x9f, 0x55, 0xe2, 0xff, 0x66, 0xbc, 0x19, 0x03, 0x46, 0xe7, 0x01, 0x19, 0x7c, 0x9f, 0x25, 0xd1, 0x1d, 0xa4, 0x5a, 0xad, @@ -142,17 +142,17 @@ Y_UNIT_TEST_SUITE(ArgonishTest) { argon2i->Hash(GenKatPassword, sizeof(GenKatPassword), GenKatSalt, sizeof(GenKatSalt), result, sizeof(result), GenKatAAD, sizeof(GenKatAAD)); - UNIT_ASSERT(memcmp(result, TResult, sizeof(result)) == 0); + UNIT_ASSERT(memcmp(result, TResult, sizeof(result)) == 0); UNIT_ASSERT(argon2i->Verify(GenKatPassword, sizeof(GenKatPassword), GenKatSalt, sizeof(GenKatSalt), - TResult, sizeof(TResult), + TResult, sizeof(TResult), GenKatAAD, sizeof(GenKatAAD))); } } Y_UNIT_TEST(Argon2id) { - const ui8 TResult[32] = { + const ui8 TResult[32] = { 0x99, 0xdf, 0xcf, 0xc2, 0x89, 0x76, 0x93, 0x9d, 0xa2, 0x97, 0x09, 0x44, 0x34, 0xd8, 0x6f, 0xd0, 0x0c, 0x94, 0x9a, 0x0f, 0x31, 0x8c, 0x22, 0xf0, @@ -168,17 +168,17 @@ Y_UNIT_TEST_SUITE(ArgonishTest) { argon2id->Hash(GenKatPassword, sizeof(GenKatPassword), GenKatSalt, sizeof(GenKatSalt), result, sizeof(result), GenKatAAD, sizeof(GenKatAAD)); - UNIT_ASSERT(memcmp(result, TResult, sizeof(result)) == 0); + UNIT_ASSERT(memcmp(result, TResult, sizeof(result)) == 0); UNIT_ASSERT(argon2id->Verify(GenKatPassword, sizeof(GenKatPassword), GenKatSalt, sizeof(GenKatSalt), - TResult, sizeof(TResult), + TResult, sizeof(TResult), GenKatAAD, sizeof(GenKatAAD))); } } Y_UNIT_TEST(Argon2d_2p) { - const ui8 TResult[32] = { + const ui8 TResult[32] = { 0x59, 0xb0, 0x94, 0x62, 0xcf, 0xdc, 0xd2, 0xb4, 0x0a, 0xbd, 0x17, 0x81, 0x0a, 0x47, 0x4a, 0x8e, 0xc1, 0xab, 0xb7, 0xc1, 0x8d, 0x07, 0x53, 0x7c, @@ -194,17 +194,17 @@ Y_UNIT_TEST_SUITE(ArgonishTest) { argon2d->Hash(GenKatPassword, sizeof(GenKatPassword), GenKatSalt, sizeof(GenKatSalt), result, sizeof(result), GenKatAAD, sizeof(GenKatAAD)); - UNIT_ASSERT(memcmp(result, TResult, sizeof(result)) == 0); + UNIT_ASSERT(memcmp(result, TResult, sizeof(result)) == 0); UNIT_ASSERT(argon2d->Verify(GenKatPassword, sizeof(GenKatPassword), GenKatSalt, sizeof(GenKatSalt), - TResult, sizeof(TResult), + TResult, sizeof(TResult), GenKatAAD, sizeof(GenKatAAD))); } } Y_UNIT_TEST(Argon2i_2p) { - const ui8 TResult[32] = { + const ui8 TResult[32] = { 0xc1, 0x0f, 0x00, 0x5e, 0xf8, 0x78, 0xc8, 0x07, 0x0e, 0x2c, 0xc5, 0x2f, 0x57, 0x75, 0x25, 0xc9, 0x71, 0xc7, 0x30, 0xeb, 0x00, 0x64, 0x4a, 0x4e, @@ -220,17 +220,17 @@ Y_UNIT_TEST_SUITE(ArgonishTest) { argon2i->Hash(GenKatPassword, sizeof(GenKatPassword), GenKatSalt, sizeof(GenKatSalt), result, sizeof(result), GenKatAAD, sizeof(GenKatAAD)); - UNIT_ASSERT(memcmp(result, TResult, sizeof(result)) == 0); + UNIT_ASSERT(memcmp(result, TResult, sizeof(result)) == 0); UNIT_ASSERT(argon2i->Verify(GenKatPassword, sizeof(GenKatPassword), GenKatSalt, sizeof(GenKatSalt), - TResult, sizeof(TResult), + TResult, sizeof(TResult), GenKatAAD, sizeof(GenKatAAD))); } } Y_UNIT_TEST(Argon2id_2p) { - const ui8 TResult[32] = { + const ui8 TResult[32] = { 0x6c, 0x00, 0xb7, 0xa9, 0x00, 0xe5, 0x00, 0x4c, 0x24, 0x46, 0x9e, 0xc1, 0xe7, 0xc0, 0x1a, 0x99, 0xb2, 0xb8, 0xf7, 0x73, 0x75, 0xd4, 0xec, 0xa7, @@ -246,17 +246,17 @@ Y_UNIT_TEST_SUITE(ArgonishTest) { argon2id->Hash(GenKatPassword, sizeof(GenKatPassword), GenKatSalt, sizeof(GenKatSalt), result, sizeof(result), GenKatAAD, sizeof(GenKatAAD)); - UNIT_ASSERT(memcmp(result, TResult, sizeof(result)) == 0); + UNIT_ASSERT(memcmp(result, TResult, sizeof(result)) == 0); UNIT_ASSERT(argon2id->Verify(GenKatPassword, sizeof(GenKatPassword), GenKatSalt, sizeof(GenKatSalt), - TResult, sizeof(TResult), + TResult, sizeof(TResult), GenKatAAD, sizeof(GenKatAAD))); } } Y_UNIT_TEST(Argon2d_2p_2th) { - const ui8 TResult[32] = { + const ui8 TResult[32] = { 0x2b, 0x47, 0x35, 0x39, 0x4a, 0x40, 0x3c, 0xc9, 0x05, 0xfb, 0x51, 0x25, 0x96, 0x68, 0x64, 0x43, 0x02, 0x16, 0x38, 0xa6, 0xc1, 0x58, 0xfc, 0x8d, @@ -272,17 +272,17 @@ Y_UNIT_TEST_SUITE(ArgonishTest) { argon2d->Hash(GenKatPassword, sizeof(GenKatPassword), GenKatSalt, sizeof(GenKatSalt), result, sizeof(result), GenKatAAD, sizeof(GenKatAAD)); - UNIT_ASSERT(memcmp(result, TResult, sizeof(result)) == 0); + UNIT_ASSERT(memcmp(result, TResult, sizeof(result)) == 0); UNIT_ASSERT(argon2d->Verify(GenKatPassword, sizeof(GenKatPassword), GenKatSalt, sizeof(GenKatSalt), - TResult, sizeof(TResult), + TResult, sizeof(TResult), GenKatAAD, sizeof(GenKatAAD))); } } Y_UNIT_TEST(Argon2id_2p_4th) { - const ui8 TResult[32] = { + const ui8 TResult[32] = { 0x4f, 0x93, 0xb5, 0xad, 0x78, 0xa4, 0xa9, 0x49, 0xfb, 0xe3, 0x55, 0x96, 0xd5, 0xa0, 0xc2, 0xab, 0x6f, 0x52, 0x2d, 0x2d, 0x29, 0xbc, 0x98, 0x49, @@ -298,17 +298,17 @@ Y_UNIT_TEST_SUITE(ArgonishTest) { argon2id->Hash(GenKatPassword, sizeof(GenKatPassword), GenKatSalt, sizeof(GenKatSalt), result, sizeof(result), GenKatAAD, sizeof(GenKatAAD)); - UNIT_ASSERT(memcmp(result, TResult, sizeof(result)) == 0); + UNIT_ASSERT(memcmp(result, TResult, sizeof(result)) == 0); UNIT_ASSERT(argon2id->Verify(GenKatPassword, sizeof(GenKatPassword), GenKatSalt, sizeof(GenKatSalt), - TResult, sizeof(TResult), + TResult, sizeof(TResult), GenKatAAD, sizeof(GenKatAAD))); } } Y_UNIT_TEST(Argon2d_2p_4th) { - const ui8 TResult[32] = { + const ui8 TResult[32] = { 0x8f, 0xa2, 0x7c, 0xed, 0x28, 0x38, 0x79, 0x0f, 0xba, 0x5c, 0x11, 0x85, 0x1c, 0xdf, 0x90, 0x88, 0xb2, 0x18, 0x44, 0xd7, 0xf0, 0x4c, 0x97, 0xb2, @@ -324,17 +324,17 @@ Y_UNIT_TEST_SUITE(ArgonishTest) { argon2d->Hash(GenKatPassword, sizeof(GenKatPassword), GenKatSalt, sizeof(GenKatSalt), result, sizeof(result), GenKatAAD, sizeof(GenKatAAD)); - UNIT_ASSERT(memcmp(result, TResult, sizeof(result)) == 0); + UNIT_ASSERT(memcmp(result, TResult, sizeof(result)) == 0); UNIT_ASSERT(argon2d->Verify(GenKatPassword, sizeof(GenKatPassword), GenKatSalt, sizeof(GenKatSalt), - TResult, sizeof(TResult), + TResult, sizeof(TResult), GenKatAAD, sizeof(GenKatAAD))); } } Y_UNIT_TEST(Argon2i_2p_4th) { - const ui8 TResult[32] = { + const ui8 TResult[32] = { 0x61, 0x1c, 0x99, 0x3c, 0xb0, 0xb7, 0x23, 0x16, 0xbd, 0xa2, 0x6c, 0x4c, 0x2f, 0xe8, 0x2d, 0x39, 0x9c, 0x8f, 0x1c, 0xfd, 0x45, 0xd9, 0x58, 0xa9, @@ -350,17 +350,17 @@ Y_UNIT_TEST_SUITE(ArgonishTest) { argon2i->Hash(GenKatPassword, sizeof(GenKatPassword), GenKatSalt, sizeof(GenKatSalt), result, sizeof(result), GenKatAAD, sizeof(GenKatAAD)); - UNIT_ASSERT(memcmp(result, TResult, sizeof(result)) == 0); + UNIT_ASSERT(memcmp(result, TResult, sizeof(result)) == 0); UNIT_ASSERT(argon2i->Verify(GenKatPassword, sizeof(GenKatPassword), GenKatSalt, sizeof(GenKatSalt), - TResult, sizeof(TResult), + TResult, sizeof(TResult), GenKatAAD, sizeof(GenKatAAD))); } } Y_UNIT_TEST(Argon2d_128) { - const ui8 TResult[128] = { + const ui8 TResult[128] = { 0x4e, 0xc4, 0x6c, 0x4e, 0x8c, 0x32, 0x89, 0x65, 0xf9, 0x82, 0x2b, 0x00, 0x95, 0x00, 0x50, 0x0a, 0x72, 0x0d, 0xc5, 0x12, 0x8d, 0x6b, 0xbd, 0x84, @@ -388,35 +388,35 @@ Y_UNIT_TEST_SUITE(ArgonishTest) { argon2d->Hash(GenKatPassword, sizeof(GenKatPassword), GenKatSalt, sizeof(GenKatSalt), result, sizeof(result), GenKatAAD, sizeof(GenKatAAD)); - UNIT_ASSERT(memcmp(result, TResult, sizeof(result)) == 0); + UNIT_ASSERT(memcmp(result, TResult, sizeof(result)) == 0); UNIT_ASSERT(argon2d->Verify(GenKatPassword, sizeof(GenKatPassword), GenKatSalt, sizeof(GenKatSalt), - TResult, sizeof(TResult), + TResult, sizeof(TResult), GenKatAAD, sizeof(GenKatAAD))); } } Y_UNIT_TEST(Blake2B_16_ABC) { - const ui8 TResult[16] = { + const ui8 TResult[16] = { 0xcf, 0x4a, 0xb7, 0x91, 0xc6, 0x2b, 0x8d, 0x2b, 0x21, 0x09, 0xc9, 0x02, 0x75, 0x28, 0x78, 0x16}; const ui8 data[] = {'a', 'b', 'c'}; NArgonish::TBlake2BFactory factory; for (int i = (int)NArgonish::EInstructionSet::REF; i <= (int)MaxArch; ++i) { - auto blake2b = factory.Create((NArgonish::EInstructionSet)i, sizeof(TResult)); + auto blake2b = factory.Create((NArgonish::EInstructionSet)i, sizeof(TResult)); ui8 hashResult[16] = {0}; blake2b->Update(data, sizeof(data)); blake2b->Final(hashResult, sizeof(hashResult)); - UNIT_ASSERT(memcmp(hashResult, TResult, sizeof(TResult)) == 0); + UNIT_ASSERT(memcmp(hashResult, TResult, sizeof(TResult)) == 0); } } Y_UNIT_TEST(Blake2B_64_ABC) { - const ui8 TResult[64] = { + const ui8 TResult[64] = { 0xba, 0x80, 0xa5, 0x3f, 0x98, 0x1c, 0x4d, 0x0d, 0x6a, 0x27, 0x97, 0xb6, 0x9f, 0x12, 0xf6, 0xe9, 0x4c, 0x21, 0x2f, 0x14, 0x68, 0x5a, 0xc4, 0xb7, @@ -429,13 +429,13 @@ Y_UNIT_TEST_SUITE(ArgonishTest) { NArgonish::TBlake2BFactory factory; for (int i = (int)NArgonish::EInstructionSet::REF; i <= (int)(int)MaxArch; ++i) { - auto blake2b = factory.Create((NArgonish::EInstructionSet)i, sizeof(TResult)); + auto blake2b = factory.Create((NArgonish::EInstructionSet)i, sizeof(TResult)); ui8 hashResult[64] = {0}; blake2b->Update(data, sizeof(data)); blake2b->Final(hashResult, sizeof(hashResult)); - UNIT_ASSERT(memcmp(hashResult, TResult, sizeof(TResult)) == 0); + UNIT_ASSERT(memcmp(hashResult, TResult, sizeof(TResult)) == 0); } } } diff --git a/library/cpp/digest/argonish/ut_fat/ya.make b/library/cpp/digest/argonish/ut_fat/ya.make index 94ebda9225..2d79d1b50d 100644 --- a/library/cpp/digest/argonish/ut_fat/ya.make +++ b/library/cpp/digest/argonish/ut_fat/ya.make @@ -1,9 +1,9 @@ -UNITTEST_FOR(library/cpp/digest/argonish) +UNITTEST_FOR(library/cpp/digest/argonish) OWNER(e-sidorov) PEERDIR( - library/cpp/digest/argonish + library/cpp/digest/argonish ) SRCS( |