Skip to content

Commit

Permalink
Crypto Removal of old x11 files and source repoint
Browse files Browse the repository at this point in the history
Crypto Removal of old x11 files and source repoint
  • Loading branch information
absolute-team committed Dec 13, 2018
1 parent ee7cf49 commit f30a919
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 94 deletions.
31 changes: 4 additions & 27 deletions src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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)
Expand Down
67 changes: 0 additions & 67 deletions src/hash.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<typename T1>
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<const void*>(&pbegin[0])), (pend - pbegin) * sizeof(pbegin[0]));
sph_blake512_close(&ctx_blake, static_cast<void*>(&hash[0]));

sph_bmw512_init(&ctx_bmw);
sph_bmw512 (&ctx_bmw, static_cast<const void*>(&hash[0]), 64);
sph_bmw512_close(&ctx_bmw, static_cast<void*>(&hash[1]));

sph_groestl512_init(&ctx_groestl);
sph_groestl512 (&ctx_groestl, static_cast<const void*>(&hash[1]), 64);
sph_groestl512_close(&ctx_groestl, static_cast<void*>(&hash[2]));

sph_skein512_init(&ctx_skein);
sph_skein512 (&ctx_skein, static_cast<const void*>(&hash[2]), 64);
sph_skein512_close(&ctx_skein, static_cast<void*>(&hash[3]));

sph_jh512_init(&ctx_jh);
sph_jh512 (&ctx_jh, static_cast<const void*>(&hash[3]), 64);
sph_jh512_close(&ctx_jh, static_cast<void*>(&hash[4]));

sph_keccak512_init(&ctx_keccak);
sph_keccak512 (&ctx_keccak, static_cast<const void*>(&hash[4]), 64);
sph_keccak512_close(&ctx_keccak, static_cast<void*>(&hash[5]));

sph_luffa512_init(&ctx_luffa);
sph_luffa512 (&ctx_luffa, static_cast<void*>(&hash[5]), 64);
sph_luffa512_close(&ctx_luffa, static_cast<void*>(&hash[6]));

sph_cubehash512_init(&ctx_cubehash);
sph_cubehash512 (&ctx_cubehash, static_cast<const void*>(&hash[6]), 64);
sph_cubehash512_close(&ctx_cubehash, static_cast<void*>(&hash[7]));

sph_shavite512_init(&ctx_shavite);
sph_shavite512(&ctx_shavite, static_cast<const void*>(&hash[7]), 64);
sph_shavite512_close(&ctx_shavite, static_cast<void*>(&hash[8]));

sph_simd512_init(&ctx_simd);
sph_simd512 (&ctx_simd, static_cast<const void*>(&hash[8]), 64);
sph_simd512_close(&ctx_simd, static_cast<void*>(&hash[9]));

sph_echo512_init(&ctx_echo);
sph_echo512 (&ctx_echo, static_cast<const void*>(&hash[9]), 64);
sph_echo512_close(&ctx_echo, static_cast<void*>(&hash[10]));

return hash[10].trim256();
}

#endif // BITCOIN_HASH_H

0 comments on commit f30a919

Please sign in to comment.