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