modified: src/Makefile.am
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 1m1s

new file:   src/crypto/neoscrypt.c
	new file:   src/crypto/neoscrypt.h
	new file:   src/crypto/neoscrypt_asm.S
This commit is contained in:
SikkieNL 2024-12-17 19:37:26 +01:00
parent 9c8d74afc2
commit 2f1bf4962b
4 changed files with 20498 additions and 95 deletions

View File

@ -1,5 +1,6 @@
# Copyright (c) 2013-2016 The Bitcoin Core developers # Copyright (c) 2013-2016 The Bitcoin Core developers
# Copyright (c) 2014-2018 The Dash Core developers # Copyright (c) 2014-2018 The Dash Core developers
# Copyright (c) 2021-2024 The Neobytes Core developers
# Distributed under the MIT software license, see the accompanying # Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php. # file COPYING or http://www.opensource.org/licenses/mit-license.php.
@ -45,36 +46,36 @@ BITCOIN_INCLUDES += $(UNIVALUE_CFLAGS)
BLS_LIBS=-lchiabls -lgmp BLS_LIBS=-lchiabls -lgmp
LIBBITCOIN_SERVER=libdash_server.a LIBBITCOIN_SERVER=libneobytes_server.a
LIBBITCOIN_COMMON=libdash_common.a LIBBITCOIN_COMMON=libneobytes_common.a
LIBBITCOIN_CONSENSUS=libdash_consensus.a LIBBITCOIN_CONSENSUS=libneobytes_consensus.a
LIBBITCOIN_CLI=libdash_cli.a LIBBITCOIN_CLI=libneobytes_cli.a
LIBBITCOIN_UTIL=libdash_util.a LIBBITCOIN_UTIL=libneobytes_util.a
LIBBITCOIN_CRYPTO_BASE=crypto/libdash_crypto_base.a LIBBITCOIN_CRYPTO_BASE=crypto/libneobytes_crypto_base.a
LIBBITCOINQT=qt/libdashqt.a LIBBITCOINQT=qt/libneobytesqt.a
LIBSECP256K1=secp256k1/libsecp256k1.la LIBSECP256K1=secp256k1/libsecp256k1.la
if ENABLE_ZMQ if ENABLE_ZMQ
LIBBITCOIN_ZMQ=libdash_zmq.a LIBBITCOIN_ZMQ=libneobytes_zmq.a
endif endif
if BUILD_BITCOIN_LIBS if BUILD_BITCOIN_LIBS
LIBBITCOINCONSENSUS=libneobytesconsensus.la LIBBITCOINCONSENSUS=libneobytesconsensus.la
endif endif
if ENABLE_WALLET if ENABLE_WALLET
LIBBITCOIN_WALLET=libdash_wallet.a LIBBITCOIN_WALLET=libneobytes_wallet.a
endif endif
LIBBITCOIN_CRYPTO= $(LIBBITCOIN_CRYPTO_BASE) LIBBITCOIN_CRYPTO= $(LIBBITCOIN_CRYPTO_BASE)
if ENABLE_SSE41 if ENABLE_SSE41
LIBBITCOIN_CRYPTO_SSE41 = crypto/libdash_crypto_sse41.a LIBBITCOIN_CRYPTO_SSE41 = crypto/libneobytes_crypto_sse41.a
LIBBITCOIN_CRYPTO += $(LIBBITCOIN_CRYPTO_SSE41) LIBBITCOIN_CRYPTO += $(LIBBITCOIN_CRYPTO_SSE41)
endif endif
if ENABLE_AVX2 if ENABLE_AVX2
LIBBITCOIN_CRYPTO_AVX2 = crypto/libdash_crypto_avx2.a LIBBITCOIN_CRYPTO_AVX2 = crypto/libneobytes_crypto_avx2.a
LIBBITCOIN_CRYPTO += $(LIBBITCOIN_CRYPTO_AVX2) LIBBITCOIN_CRYPTO += $(LIBBITCOIN_CRYPTO_AVX2)
endif endif
if ENABLE_SHANI if ENABLE_SHANI
LIBBITCOIN_CRYPTO_SHANI = crypto/libdash_crypto_shani.a LIBBITCOIN_CRYPTO_SHANI = crypto/libneobytes_crypto_shani.a
LIBBITCOIN_CRYPTO += $(LIBBITCOIN_CRYPTO_SHANI) LIBBITCOIN_CRYPTO += $(LIBBITCOIN_CRYPTO_SHANI)
endif endif
@ -101,15 +102,15 @@ TESTS =
BENCHMARKS = BENCHMARKS =
if BUILD_BITCOIND if BUILD_BITCOIND
bin_PROGRAMS += dashd bin_PROGRAMS += neobytesd
endif endif
if BUILD_BITCOIN_UTILS if BUILD_BITCOIN_UTILS
bin_PROGRAMS += dash-cli dash-tx bin_PROGRAMS += neobytes-cli neobytes-tx
endif endif
.PHONY: FORCE check-symbols check-security .PHONY: FORCE check-symbols check-security
# dash core # # neobytes core #
BITCOIN_CORE_H = \ BITCOIN_CORE_H = \
addrdb.h \ addrdb.h \
addressindex.h \ addressindex.h \
@ -266,12 +267,12 @@ obj/build.h: FORCE
@$(MKDIR_P) $(builddir)/obj @$(MKDIR_P) $(builddir)/obj
@$(top_srcdir)/share/genbuild.sh "$(abs_top_builddir)/src/obj/build.h" \ @$(top_srcdir)/share/genbuild.sh "$(abs_top_builddir)/src/obj/build.h" \
"$(abs_top_srcdir)" "$(abs_top_srcdir)"
libdash_util_a-clientversion.$(OBJEXT): obj/build.h libneobytes_util_a-clientversion.$(OBJEXT): obj/build.h
# server: shared between dashd and dash-qt # server: shared between neobytesd and neobytes-qt
libdash_server_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(MINIUPNPC_CPPFLAGS) $(EVENT_CFLAGS) $(EVENT_PTHREADS_CFLAGS) libneobytes_server_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(MINIUPNPC_CPPFLAGS) $(EVENT_CFLAGS) $(EVENT_PTHREADS_CFLAGS)
libdash_server_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) libneobytes_server_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
libdash_server_a_SOURCES = \ libneobytes_server_a_SOURCES = \
addrdb.cpp \ addrdb.cpp \
addrman.cpp \ addrman.cpp \
batchedlogger.cpp \ batchedlogger.cpp \
@ -354,20 +355,20 @@ libdash_server_a_SOURCES = \
$(BITCOIN_CORE_H) $(BITCOIN_CORE_H)
if ENABLE_ZMQ if ENABLE_ZMQ
libdash_zmq_a_CPPFLAGS = $(BITCOIN_INCLUDES) $(ZMQ_CFLAGS) libneobytes_zmq_a_CPPFLAGS = $(BITCOIN_INCLUDES) $(ZMQ_CFLAGS)
libdash_zmq_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) libneobytes_zmq_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
libdash_zmq_a_SOURCES = \ libneobytes_zmq_a_SOURCES = \
zmq/zmqabstractnotifier.cpp \ zmq/zmqabstractnotifier.cpp \
zmq/zmqnotificationinterface.cpp \ zmq/zmqnotificationinterface.cpp \
zmq/zmqpublishnotifier.cpp zmq/zmqpublishnotifier.cpp
endif endif
# wallet: shared between dashd and dash-qt, but only linked # wallet: shared between neobytesd and neobytes-qt, but only linked
# when wallet enabled # when wallet enabled
libdash_wallet_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) libneobytes_wallet_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES)
libdash_wallet_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) libneobytes_wallet_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
libdash_wallet_a_SOURCES = \ libneobytes_wallet_a_SOURCES = \
keepass.cpp \ keepass.cpp \
privatesend/privatesend-client.cpp \ privatesend/privatesend-client.cpp \
privatesend/privatesend-util.cpp \ privatesend/privatesend-util.cpp \
@ -380,9 +381,9 @@ libdash_wallet_a_SOURCES = \
$(BITCOIN_CORE_H) $(BITCOIN_CORE_H)
# crypto primitives library # crypto primitives library
crypto_libdash_crypto_base_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_CONFIG_INCLUDES) $(PIC_FLAGS) crypto_libneobytes_crypto_base_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_CONFIG_INCLUDES) $(PIC_FLAGS)
crypto_libdash_crypto_base_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) $(PIC_FLAGS) crypto_libneobytes_crypto_base_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) $(PIC_FLAGS)
crypto_libdash_crypto_base_a_SOURCES = \ crypto_libneobytes_crypto_base_a_SOURCES = \
crypto/aes.cpp \ crypto/aes.cpp \
crypto/aes.h \ crypto/aes.h \
crypto/chacha_poly_aead.h \ crypto/chacha_poly_aead.h \
@ -407,23 +408,23 @@ crypto_libdash_crypto_base_a_SOURCES = \
crypto/sha512.h crypto/sha512.h
if USE_ASM if USE_ASM
crypto_libdash_crypto_base_a_SOURCES += crypto/sha256_sse4.cpp crypto_libneobytes_crypto_base_a_SOURCES += crypto/sha256_sse4.cpp
endif endif
crypto_libdash_crypto_sse41_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) crypto_libneobytes_crypto_sse41_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
crypto_libdash_crypto_sse41_a_CPPFLAGS = $(AM_CPPFLAGS) crypto_libneobytes_crypto_sse41_a_CPPFLAGS = $(AM_CPPFLAGS)
crypto_libdash_crypto_sse41_a_CXXFLAGS += $(SSE41_CXXFLAGS) crypto_libneobytes_crypto_sse41_a_CXXFLAGS += $(SSE41_CXXFLAGS)
crypto_libdash_crypto_sse41_a_CPPFLAGS += -DENABLE_SSE41 crypto_libneobytes_crypto_sse41_a_CPPFLAGS += -DENABLE_SSE41
crypto_libdash_crypto_sse41_a_SOURCES = crypto/sha256_sse41.cpp crypto_libneobytes_crypto_sse41_a_SOURCES = crypto/sha256_sse41.cpp
crypto_libdash_crypto_avx2_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) crypto_libneobytes_crypto_avx2_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
crypto_libdash_crypto_avx2_a_CPPFLAGS = $(AM_CPPFLAGS) crypto_libneobytes_crypto_avx2_a_CPPFLAGS = $(AM_CPPFLAGS)
crypto_libdash_crypto_avx2_a_CXXFLAGS += $(AVX2_CXXFLAGS) crypto_libneobytes_crypto_avx2_a_CXXFLAGS += $(AVX2_CXXFLAGS)
crypto_libdash_crypto_avx2_a_CPPFLAGS += -DENABLE_AVX2 crypto_libneobytes_crypto_avx2_a_CPPFLAGS += -DENABLE_AVX2
crypto_libdash_crypto_avx2_a_SOURCES = crypto/sha256_avx2.cpp crypto_libneobytes_crypto_avx2_a_SOURCES = crypto/sha256_avx2.cpp
# x11 # x11
crypto_libdash_crypto_base_a_SOURCES += \ crypto_libneobytes_crypto_base_a_SOURCES += \
crypto/blake.c \ crypto/blake.c \
crypto/bmw.c \ crypto/bmw.c \
crypto/cubehash.c \ crypto/cubehash.c \
@ -435,6 +436,9 @@ crypto_libdash_crypto_base_a_SOURCES += \
crypto/shavite.c \ crypto/shavite.c \
crypto/simd.c \ crypto/simd.c \
crypto/skein.c \ crypto/skein.c \
crypto/neoscrypt.c \
crypto/neoscrypt.h \
crypto/sph_blake.h \ crypto/sph_blake.h \
crypto/sph_bmw.h \ crypto/sph_bmw.h \
crypto/sph_cubehash.h \ crypto/sph_cubehash.h \
@ -448,16 +452,16 @@ crypto_libdash_crypto_base_a_SOURCES += \
crypto/sph_skein.h \ crypto/sph_skein.h \
crypto/sph_types.h crypto/sph_types.h
crypto_libdash_crypto_shani_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) crypto_libneobytes_crypto_shani_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
crypto_libdash_crypto_shani_a_CPPFLAGS = $(AM_CPPFLAGS) crypto_libneobytes_crypto_shani_a_CPPFLAGS = $(AM_CPPFLAGS)
crypto_libdash_crypto_shani_a_CXXFLAGS += $(SHANI_CXXFLAGS) crypto_libneobytes_crypto_shani_a_CXXFLAGS += $(SHANI_CXXFLAGS)
crypto_libdash_crypto_shani_a_CPPFLAGS += -DENABLE_SHANI crypto_libneobytes_crypto_shani_a_CPPFLAGS += -DENABLE_SHANI
crypto_libdash_crypto_shani_a_SOURCES = crypto/sha256_shani.cpp crypto_libneobytes_crypto_shani_a_SOURCES = crypto/sha256_shani.cpp
# consensus: shared between all executables that validate any consensus rules. # consensus: shared between all executables that validate any consensus rules.
libdash_consensus_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) libneobytes_consensus_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES)
libdash_consensus_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) libneobytes_consensus_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
libdash_consensus_a_SOURCES = \ libneobytes_consensus_a_SOURCES = \
amount.h \ amount.h \
arith_uint256.cpp \ arith_uint256.cpp \
arith_uint256.h \ arith_uint256.h \
@ -476,7 +480,7 @@ libdash_consensus_a_SOURCES = \
primitives/transaction.h \ primitives/transaction.h \
pubkey.cpp \ pubkey.cpp \
pubkey.h \ pubkey.h \
script/dashconsensus.cpp \ script/neobytesconsensus.cpp \
script/interpreter.cpp \ script/interpreter.cpp \
script/interpreter.h \ script/interpreter.h \
script/script.cpp \ script/script.cpp \
@ -492,10 +496,10 @@ libdash_consensus_a_SOURCES = \
utilstrencodings.h \ utilstrencodings.h \
version.h version.h
# common: shared between dashd, and dash-qt and non-server tools # common: shared between neobytesd, and neobytes-qt and non-server tools
libdash_common_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) libneobytes_common_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES)
libdash_common_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) libneobytes_common_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
libdash_common_a_SOURCES = \ libneobytes_common_a_SOURCES = \
base58.cpp \ base58.cpp \
bip39.cpp \ bip39.cpp \
chainparams.cpp \ chainparams.cpp \
@ -520,9 +524,9 @@ libdash_common_a_SOURCES = \
# util: shared between all executables. # util: shared between all executables.
# This library *must* be included to make sure that the glibc # This library *must* be included to make sure that the glibc
# backward-compatibility objects and their sanity checks are linked. # backward-compatibility objects and their sanity checks are linked.
libdash_util_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) libneobytes_util_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES)
libdash_util_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) libneobytes_util_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
libdash_util_a_SOURCES = \ libneobytes_util_a_SOURCES = \
bls/bls_batchverifier.h \ bls/bls_batchverifier.h \
bls/bls_ies.cpp \ bls/bls_ies.cpp \
bls/bls_ies.h \ bls/bls_ies.h \
@ -548,31 +552,31 @@ libdash_util_a_SOURCES = \
$(BITCOIN_CORE_H) $(BITCOIN_CORE_H)
if GLIBC_BACK_COMPAT if GLIBC_BACK_COMPAT
libdash_util_a_SOURCES += compat/glibc_compat.cpp libneobytes_util_a_SOURCES += compat/glibc_compat.cpp
AM_LDFLAGS += -Wl,--wrap=log2f -Wl,--wrap=__divmoddi4 AM_LDFLAGS += -Wl,--wrap=log2f -Wl,--wrap=__divmoddi4
endif endif
# cli: shared between dash-cli and dash-qt # cli: shared between neobytes-cli and neobytes-qt
libdash_cli_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) libneobytes_cli_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES)
libdash_cli_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) libneobytes_cli_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
libdash_cli_a_SOURCES = \ libneobytes_cli_a_SOURCES = \
rpc/client.cpp \ rpc/client.cpp \
$(BITCOIN_CORE_H) $(BITCOIN_CORE_H)
nodist_libdash_util_a_SOURCES = $(srcdir)/obj/build.h nodist_libneobytes_util_a_SOURCES = $(srcdir)/obj/build.h
# #
# dashd binary # # neobytesd binary #
dashd_SOURCES = dashd.cpp neobytesd_SOURCES = neobytesd.cpp
dashd_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) neobytesd_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES)
dashd_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) neobytesd_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
dashd_LDFLAGS = $(LDFLAGS_WRAP_EXCEPTIONS) $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS) neobytesd_LDFLAGS = $(LDFLAGS_WRAP_EXCEPTIONS) $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS)
if TARGET_WINDOWS if TARGET_WINDOWS
dashd_SOURCES += dashd-res.rc neobytesd_SOURCES += neobytesd-res.rc
endif endif
dashd_LDADD = \ neobytesd_LDADD = \
$(LIBBITCOIN_SERVER) \ $(LIBBITCOIN_SERVER) \
$(LIBBITCOIN_COMMON) \ $(LIBBITCOIN_COMMON) \
$(LIBUNIVALUE) \ $(LIBUNIVALUE) \
@ -586,37 +590,37 @@ dashd_LDADD = \
$(LIBMEMENV) \ $(LIBMEMENV) \
$(LIBSECP256K1) $(LIBSECP256K1)
dashd_LDADD += $(BACKTRACE_LIB) $(BOOST_LIBS) $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS) $(MINIUPNPC_LIBS) $(EVENT_PTHREADS_LIBS) $(EVENT_LIBS) $(ZMQ_LIBS) $(BLS_LIBS) neobytesd_LDADD += $(BACKTRACE_LIB) $(BOOST_LIBS) $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS) $(MINIUPNPC_LIBS) $(EVENT_PTHREADS_LIBS) $(EVENT_LIBS) $(ZMQ_LIBS) $(BLS_LIBS)
# dash-cli binary # # neobytes-cli binary #
dash_cli_SOURCES = dash-cli.cpp neobytes_cli_SOURCES = neobytes-cli.cpp
dash_cli_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(EVENT_CFLAGS) neobytes_cli_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(EVENT_CFLAGS)
dash_cli_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) neobytes_cli_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
dash_cli_LDFLAGS = $(LDFLAGS_WRAP_EXCEPTIONS) $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS) neobytes_cli_LDFLAGS = $(LDFLAGS_WRAP_EXCEPTIONS) $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS)
if TARGET_WINDOWS if TARGET_WINDOWS
dash_cli_SOURCES += dash-cli-res.rc neobytes_cli_SOURCES += neobytes-cli-res.rc
endif endif
dash_cli_LDADD = \ neobytes_cli_LDADD = \
$(LIBBITCOIN_CLI) \ $(LIBBITCOIN_CLI) \
$(LIBUNIVALUE) \ $(LIBUNIVALUE) \
$(LIBBITCOIN_UTIL) \ $(LIBBITCOIN_UTIL) \
$(LIBBITCOIN_CRYPTO) $(LIBBITCOIN_CRYPTO)
dash_cli_LDADD += $(BACKTRACE_LIB) $(BOOST_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS) $(EVENT_LIBS) $(BLS_LIBS) neobytes_cli_LDADD += $(BACKTRACE_LIB) $(BOOST_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS) $(EVENT_LIBS) $(BLS_LIBS)
# #
# dash-tx binary # # neobytes-tx binary #
dash_tx_SOURCES = dash-tx.cpp neobytes_tx_SOURCES = neobytes-tx.cpp
dash_tx_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) neobytes_tx_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES)
dash_tx_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) neobytes_tx_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
dash_tx_LDFLAGS = $(LDFLAGS_WRAP_EXCEPTIONS) $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS) neobytes_tx_LDFLAGS = $(LDFLAGS_WRAP_EXCEPTIONS) $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS)
if TARGET_WINDOWS if TARGET_WINDOWS
dash_tx_SOURCES += dash-tx-res.rc neobytes_tx_SOURCES += neobytes-tx-res.rc
endif endif
dash_tx_LDADD = \ neobytes_tx_LDADD = \
$(LIBUNIVALUE) \ $(LIBUNIVALUE) \
$(LIBBITCOIN_COMMON) \ $(LIBBITCOIN_COMMON) \
$(LIBBITCOIN_UTIL) \ $(LIBBITCOIN_UTIL) \
@ -624,13 +628,13 @@ dash_tx_LDADD = \
$(LIBBITCOIN_CRYPTO) \ $(LIBBITCOIN_CRYPTO) \
$(LIBSECP256K1) $(LIBSECP256K1)
dash_tx_LDADD += $(BACKTRACE_LIB) $(BOOST_LIBS) $(CRYPTO_LIBS) $(BLS_LIBS) neobytes_tx_LDADD += $(BACKTRACE_LIB) $(BOOST_LIBS) $(CRYPTO_LIBS) $(BLS_LIBS)
# #
# dashconsensus library # # neobytesconsensus library #
if BUILD_BITCOIN_LIBS if BUILD_BITCOIN_LIBS
include_HEADERS = script/dashconsensus.h include_HEADERS = script/neobytesconsensus.h
libneobytesconsensus_la_SOURCES = support/cleanse.cpp $(crypto_libdash_crypto_base_a_SOURCES) $(libdash_consensus_a_SOURCES) libneobytesconsensus_la_SOURCES = support/cleanse.cpp $(crypto_libneobytes_crypto_base_a_SOURCES) $(libneobytes_consensus_a_SOURCES)
if GLIBC_BACK_COMPAT if GLIBC_BACK_COMPAT
libneobytesconsensus_la_SOURCES += compat/glibc_compat.cpp libneobytesconsensus_la_SOURCES += compat/glibc_compat.cpp
@ -673,12 +677,12 @@ EXTRA_DIST = $(CTAES_DIST)
EXTRA_DIST += $(IMMER_DIST) EXTRA_DIST += $(IMMER_DIST)
config/dash-config.h: config/stamp-h1 config/neobytes-config.h: config/stamp-h1
@$(MAKE) -C $(top_builddir) $(subdir)/$(@) @$(MAKE) -C $(top_builddir) $(subdir)/$(@)
config/stamp-h1: $(top_srcdir)/$(subdir)/config/dash-config.h.in $(top_builddir)/config.status config/stamp-h1: $(top_srcdir)/$(subdir)/config/neobytes-config.h.in $(top_builddir)/config.status
$(AM_V_at)$(MAKE) -C $(top_builddir) $(subdir)/$(@) $(AM_V_at)$(MAKE) -C $(top_builddir) $(subdir)/$(@)
$(top_srcdir)/$(subdir)/config/dash-config.h.in: $(am__configure_deps) $(top_srcdir)/$(subdir)/config/neobytes-config.h.in: $(am__configure_deps)
$(AM_V_at)$(MAKE) -C $(top_srcdir) $(subdir)/config/dash-config.h.in $(AM_V_at)$(MAKE) -C $(top_srcdir) $(subdir)/config/neobytes-config.h.in
clean-local: clean-local:

3263
src/crypto/neoscrypt.c Normal file

File diff suppressed because it is too large Load Diff

72
src/crypto/neoscrypt.h Normal file
View File

@ -0,0 +1,72 @@
#if (__cplusplus)
extern "C" {
#endif
void neoscrypt(const unsigned char *password, unsigned char *output,
unsigned int profile);
void neoscrypt_blake2s(const void *input, const unsigned int input_size,
const void *key, const unsigned char key_size,
void *output, const unsigned char output_size);
void neoscrypt_copy(void *dstp, const void *srcp, unsigned int len);
void neoscrypt_erase(void *dstp, unsigned int len);
void neoscrypt_xor(void *dstp, const void *srcp, unsigned int len);
#if defined(ASM) && defined(MINER_4WAY)
void neoscrypt_4way(const unsigned char *password, unsigned char *output,
unsigned char *scratchpad);
#ifdef SHA256
void scrypt_4way(const unsigned char *password, unsigned char *output,
unsigned char *scratchpad);
#endif
void neoscrypt_blake2s_4way(const unsigned char *input,
const unsigned char *key, unsigned char *output);
void neoscrypt_fastkdf_4way(const unsigned char *password,
const unsigned char *salt, unsigned char *output, unsigned char *scratchpad,
const unsigned int mode);
#endif
unsigned int cpu_vec_exts(void);
#if (__cplusplus)
}
#else
typedef unsigned long long ullong;
typedef signed long long llong;
typedef unsigned int uint;
typedef unsigned char uchar;
#ifndef MIN
#define MIN(a, b) ((a) < (b) ? a : b)
#endif
#ifndef MAX
#define MAX(a, b) ((a) > (b) ? a : b)
#endif
#define BLOCK_SIZE 64
#define DIGEST_SIZE 32
typedef uchar hash_digest[DIGEST_SIZE];
#define ROTL32(a,b) (((a) << (b)) | ((a) >> (32 - b)))
#define ROTR32(a,b) (((a) >> (b)) | ((a) << (32 - b)))
#define U8TO32_BE(p) \
(((uint)((p)[0]) << 24) | ((uint)((p)[1]) << 16) | \
((uint)((p)[2]) << 8) | ((uint)((p)[3])))
#define U32TO8_BE(p, v) \
(p)[0] = (uchar)((v) >> 24); (p)[1] = (uchar)((v) >> 16); \
(p)[2] = (uchar)((v) >> 8); (p)[3] = (uchar)((v) );
#define U64TO8_BE(p, v) \
U32TO8_BE((p), (uint)((v) >> 32)); \
U32TO8_BE((p) + 4, (uint)((v) ));
#endif

17064
src/crypto/neoscrypt_asm.S Normal file

File diff suppressed because it is too large Load Diff