From f30a9198204debf3973a4dbb7ced0e602d11edd8 Mon Sep 17 00:00:00 2001 From: CryptoCentric Date: Thu, 13 Dec 2018 22:10:19 +0000 Subject: [PATCH] Crypto Removal of old x11 files and source repoint Crypto Removal of old x11 files and source repoint --- src/Makefile.am | 31 +++-------------------- src/hash.h | 67 ------------------------------------------------- 2 files changed, 4 insertions(+), 94 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index c9ba933bd4076..40253b1f846a3 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -300,7 +300,10 @@ crypto_libbitcoin_crypto_a_SOURCES = \ crypto/sha256.cpp \ crypto/sha256.h \ crypto/sha512.cpp \ - crypto/sha512.h \ + crypto/sha512.h + +# Lyra2RE +crypto_libbitcoin_crypto_a_SOURCES += \ crypto/Lyra2RE/Lyra2RE.c \ crypto/Lyra2RE/Lyra2RE.h \ crypto/Lyra2RE/Lyra2.c \ @@ -321,32 +324,6 @@ crypto_libbitcoin_crypto_a_SOURCES = \ crypto/Lyra2RE/cubehash.c \ crypto/Lyra2RE/bmw.c -# x11 -crypto_libbitcoin_crypto_a_SOURCES += \ - crypto/blake.c \ - crypto/bmw.c \ - crypto/cubehash.c \ - crypto/echo.c \ - crypto/groestl.c \ - crypto/jh.c \ - crypto/keccak.c \ - crypto/luffa.c \ - crypto/shavite.c \ - crypto/simd.c \ - crypto/skein.c \ - crypto/sph_blake.h \ - crypto/sph_bmw.h \ - crypto/sph_cubehash.h \ - crypto/sph_echo.h \ - crypto/sph_groestl.h \ - crypto/sph_jh.h \ - crypto/sph_keccak.h \ - crypto/sph_luffa.h \ - crypto/sph_shavite.h \ - crypto/sph_simd.h \ - crypto/sph_skein.h \ - crypto/sph_types.h - # consensus: shared between all executables that validate any consensus rules. libbitcoin_consensus_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) libbitcoin_consensus_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) diff --git a/src/hash.h b/src/hash.h index f493043491f09..12dc6351fa019 100644 --- a/src/hash.h +++ b/src/hash.h @@ -330,71 +330,4 @@ class CSipHasher uint64_t SipHashUint256(uint64_t k0, uint64_t k1, const uint256& val); uint64_t SipHashUint256Extra(uint64_t k0, uint64_t k1, const uint256& val, uint32_t extra); -/* ----------- Absolute Hash ------------------------------------------------ */ -template -inline uint256 HashX11(const T1 pbegin, const T1 pend) - -{ - sph_blake512_context ctx_blake; - sph_bmw512_context ctx_bmw; - sph_groestl512_context ctx_groestl; - sph_jh512_context ctx_jh; - sph_keccak512_context ctx_keccak; - sph_skein512_context ctx_skein; - sph_luffa512_context ctx_luffa; - sph_cubehash512_context ctx_cubehash; - sph_shavite512_context ctx_shavite; - sph_simd512_context ctx_simd; - sph_echo512_context ctx_echo; - static unsigned char pblank[1]; - - uint512 hash[11]; - - sph_blake512_init(&ctx_blake); - sph_blake512 (&ctx_blake, (pbegin == pend ? pblank : static_cast(&pbegin[0])), (pend - pbegin) * sizeof(pbegin[0])); - sph_blake512_close(&ctx_blake, static_cast(&hash[0])); - - sph_bmw512_init(&ctx_bmw); - sph_bmw512 (&ctx_bmw, static_cast(&hash[0]), 64); - sph_bmw512_close(&ctx_bmw, static_cast(&hash[1])); - - sph_groestl512_init(&ctx_groestl); - sph_groestl512 (&ctx_groestl, static_cast(&hash[1]), 64); - sph_groestl512_close(&ctx_groestl, static_cast(&hash[2])); - - sph_skein512_init(&ctx_skein); - sph_skein512 (&ctx_skein, static_cast(&hash[2]), 64); - sph_skein512_close(&ctx_skein, static_cast(&hash[3])); - - sph_jh512_init(&ctx_jh); - sph_jh512 (&ctx_jh, static_cast(&hash[3]), 64); - sph_jh512_close(&ctx_jh, static_cast(&hash[4])); - - sph_keccak512_init(&ctx_keccak); - sph_keccak512 (&ctx_keccak, static_cast(&hash[4]), 64); - sph_keccak512_close(&ctx_keccak, static_cast(&hash[5])); - - sph_luffa512_init(&ctx_luffa); - sph_luffa512 (&ctx_luffa, static_cast(&hash[5]), 64); - sph_luffa512_close(&ctx_luffa, static_cast(&hash[6])); - - sph_cubehash512_init(&ctx_cubehash); - sph_cubehash512 (&ctx_cubehash, static_cast(&hash[6]), 64); - sph_cubehash512_close(&ctx_cubehash, static_cast(&hash[7])); - - sph_shavite512_init(&ctx_shavite); - sph_shavite512(&ctx_shavite, static_cast(&hash[7]), 64); - sph_shavite512_close(&ctx_shavite, static_cast(&hash[8])); - - sph_simd512_init(&ctx_simd); - sph_simd512 (&ctx_simd, static_cast(&hash[8]), 64); - sph_simd512_close(&ctx_simd, static_cast(&hash[9])); - - sph_echo512_init(&ctx_echo); - sph_echo512 (&ctx_echo, static_cast(&hash[9]), 64); - sph_echo512_close(&ctx_echo, static_cast(&hash[10])); - - return hash[10].trim256(); -} - #endif // BITCOIN_HASH_H