Skip to content

Commit 2deeb83

Browse files
authored
Merge pull request #639 from RavenProject/x16rv2_build
X16RV2 Update
2 parents ed857ac + 74e40cf commit 2deeb83

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

111 files changed

+78360
-579
lines changed

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N)
22
AC_PREREQ([2.60])
33
define(_CLIENT_VERSION_MAJOR, 2)
4-
define(_CLIENT_VERSION_MINOR, 4)
4+
define(_CLIENT_VERSION_MINOR, 5)
55
define(_CLIENT_VERSION_REVISION, 0)
66
define(_CLIENT_VERSION_BUILD, 0)
77
define(_CLIENT_VERSION_IS_RELEASE, true)

src/Makefile.am

Lines changed: 49 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Copyright (c) 2013-2016 The Bitcoin Core developers
2-
# Copyright (c) 2017 The Raven Core developers
2+
# Copyright (c) 2017-2019 The Raven Core developers
33
# Distributed under the MIT software license, see the accompanying
44
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
55

@@ -82,12 +82,57 @@ endif
8282
RAVEN_CORE_H = \
8383
addrdb.h \
8484
addressindex.h \
85+
algo/sph_groestl.h \
86+
algo/sph_types.h \
87+
algo/sph_blake.h \
88+
algo/sph_bmw.h \
89+
algo/sph_jh.h \
90+
algo/sph_keccak.h \
91+
algo/sph_skein.h \
92+
algo/sph_luffa.h \
93+
algo/sph_cubehash.h \
94+
algo/sph_simd.h \
95+
algo/sph_echo.h \
96+
algo/sph_shavite.h \
97+
algo/sph_sha2.h \
98+
algo/sph_haval.h \
99+
algo/sph_tiger.h \
100+
algo/lyra2.h \
101+
algo/sponge.h \
102+
algo/gost_streebog.h \
103+
algo/hash_algos.h \
104+
algo/groestl.c \
105+
algo/blake.c \
106+
algo/bmw.c \
107+
algo/cubehash.c \
108+
algo/echo.c \
109+
algo/jh.c \
110+
algo/keccak.c \
111+
algo/luffa.c \
112+
algo/shavite.c \
113+
algo/simd.c \
114+
algo/skein.c \
115+
algo/hamsi.c \
116+
algo/whirlpool.c \
117+
algo/shabal.c \
118+
algo/fugue.c \
119+
algo/sha2.c \
120+
algo/extra.c \
121+
algo/extra.h \
122+
algo/sph_sha2big.c \
123+
algo/haval.c \
124+
algo/tiger.cpp \
125+
algo/lyra2.cpp \
126+
algo/sponge.cpp \
127+
algo/sph_sha2.c \
128+
algo/gost_streebog.c \
85129
spentindex.h \
86130
timestampindex.h \
87131
addrman.h \
88132
assets/assets.h \
89133
assets/assetdb.h \
90134
assets/assettypes.h \
135+
assets/restricteddb.h \
91136
base58.h \
92137
bloom.h \
93138
blockencodings.h \
@@ -281,49 +326,12 @@ crypto_libraven_crypto_a_SOURCES = \
281326
crypto/hmac_sha512.h \
282327
crypto/ripemd160.cpp \
283328
crypto/aes_helper.c \
284-
crypto/blake.c \
285-
crypto/bmw.c \
286-
crypto/cubehash.c \
287-
crypto/echo.c \
288-
crypto/groestl.c \
289-
crypto/jh.c \
290-
crypto/keccak.c \
291-
crypto/luffa.c \
292-
crypto/shavite.c \
293-
crypto/simd.c \
294-
crypto/skein.c \
295-
crypto/sph_hamsi.c \
296-
crypto/sph_hamsi_helper.c \
297-
crypto/sph_fugue.c \
298-
crypto/sph_shabal.c \
299-
crypto/sph_whirlpool.c \
300-
crypto/sph_sha2.c \
301-
crypto/sph_sha512.c \
302-
crypto/ripemd160.h \
303329
crypto/sha1.cpp \
304330
crypto/sha1.h \
305331
crypto/sha256.cpp \
306332
crypto/sha256.h \
307333
crypto/sha512.h \
308-
crypto/sph_blake.h \
309-
crypto/sph_bmw.h \
310-
crypto/sph_cubehash.h \
311-
crypto/sph_echo.h \
312-
crypto/sph_groestl.h \
313-
crypto/sph_jh.h \
314-
crypto/sph_keccak.h \
315-
crypto/sph_luffa.h \
316-
crypto/sph_shavite.h \
317-
crypto/sph_simd.h \
318-
crypto/sph_skein.h \
319-
crypto/sph_hamsi.h \
320-
crypto/sph_fugue.h \
321-
crypto/sph_shabal.h \
322-
crypto/sph_whirlpool.h \
323-
crypto/sph_sha2.h \
324-
crypto/sph_types.h \
325-
crypto/sha512.cpp \
326-
crypto/sha512.h
334+
crypto/sha512.cpp
327335

328336
if USE_ASM
329337
crypto_libraven_crypto_a_SOURCES += crypto/sha256_sse4.cpp
@@ -364,7 +372,8 @@ libraven_consensus_a_SOURCES = \
364372
uint256.h \
365373
utilstrencodings.cpp \
366374
utilstrencodings.h \
367-
version.h
375+
version.h \
376+
$(RAVEN_CORE_H)
368377

369378
# common: shared between ravend, and raven-qt and non-server tools
370379
libraven_common_a_CPPFLAGS = $(AM_CPPFLAGS) $(RAVEN_INCLUDES)

src/algo/Lyra2RE.c

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
/*-
2+
* Copyright 2009 Colin Percival, 2011 ArtForz, 2013 Neisklar, 2014 James Lovejoy
3+
* All rights reserved.
4+
*
5+
* Redistribution and use in source and binary forms, with or without
6+
* modification, are permitted provided that the following conditions
7+
* are met:
8+
* 1. Redistributions of source code must retain the above copyright
9+
* notice, this list of conditions and the following disclaimer.
10+
* 2. Redistributions in binary form must reproduce the above copyright
11+
* notice, this list of conditions and the following disclaimer in the
12+
* documentation and/or other materials provided with the distribution.
13+
*
14+
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15+
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16+
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17+
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18+
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19+
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20+
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21+
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22+
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23+
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24+
* SUCH DAMAGE.
25+
*
26+
* This file was originally written by Colin Percival as part of the Tarsnap
27+
* online backup system.
28+
*/
29+
30+
#include "Lyra2RE.h"
31+
#include <stdlib.h>
32+
#include <stdint.h>
33+
#include <string.h>
34+
#include <stdio.h>
35+
#include "sph_blake.h"
36+
#include "sph_groestl.h"
37+
#include "sph_cubehash.h"
38+
#include "sph_bmw.h"
39+
#include "sph_keccak.h"
40+
#include "sph_skein.h"
41+
#include "Lyra2.h"
42+
43+
void lyra2re_hash(const char* input, char* output)
44+
{
45+
sph_blake256_context ctx_blake;
46+
sph_groestl256_context ctx_groestl;
47+
sph_keccak256_context ctx_keccak;
48+
sph_skein256_context ctx_skein;
49+
50+
uint32_t hashA[8], hashB[8];
51+
52+
sph_blake256_init(&ctx_blake);
53+
sph_blake256 (&ctx_blake, input, 80);
54+
sph_blake256_close (&ctx_blake, hashA);
55+
56+
sph_keccak256_init(&ctx_keccak);
57+
sph_keccak256 (&ctx_keccak,hashA, 32);
58+
sph_keccak256_close(&ctx_keccak, hashB);
59+
60+
LYRA2_old(hashA, 32, hashB, 32, hashB, 32, 1, 8, 8);
61+
62+
sph_skein256_init(&ctx_skein);
63+
sph_skein256 (&ctx_skein, hashA, 32);
64+
sph_skein256_close(&ctx_skein, hashB);
65+
66+
sph_groestl256_init(&ctx_groestl);
67+
sph_groestl256 (&ctx_groestl, hashB, 32);
68+
sph_groestl256_close(&ctx_groestl, hashA);
69+
70+
memcpy(output, hashA, 32);
71+
}
72+
73+
void lyra2re2_hash(const char* input, char* output)
74+
{
75+
sph_blake256_context ctx_blake;
76+
sph_cubehash256_context ctx_cubehash;
77+
sph_keccak256_context ctx_keccak;
78+
sph_skein256_context ctx_skein;
79+
sph_bmw256_context ctx_bmw;
80+
81+
uint32_t hashA[8], hashB[8];
82+
83+
sph_blake256_init(&ctx_blake);
84+
sph_blake256(&ctx_blake, input, 80);
85+
sph_blake256_close (&ctx_blake, hashA);
86+
87+
sph_keccak256_init(&ctx_keccak);
88+
sph_keccak256(&ctx_keccak, hashA, 32);
89+
sph_keccak256_close(&ctx_keccak, hashB);
90+
91+
sph_cubehash256_init(&ctx_cubehash);
92+
sph_cubehash256(&ctx_cubehash, hashB, 32);
93+
sph_cubehash256_close(&ctx_cubehash, hashA);
94+
95+
LYRA2(hashB, 32, hashA, 32, hashA, 32, 1, 4, 4);
96+
97+
sph_skein256_init(&ctx_skein);
98+
sph_skein256(&ctx_skein, hashB, 32);
99+
sph_skein256_close(&ctx_skein, hashA);
100+
101+
sph_cubehash256_init(&ctx_cubehash);
102+
sph_cubehash256(&ctx_cubehash, hashA, 32);
103+
sph_cubehash256_close(&ctx_cubehash, hashB);
104+
105+
sph_bmw256_init(&ctx_bmw);
106+
sph_bmw256(&ctx_bmw, hashB, 32);
107+
sph_bmw256_close(&ctx_bmw, hashA);
108+
109+
memcpy(output, hashA, 32);
110+
}

src/algo/Lyra2RE.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#ifndef LYRA2RE_H
2+
#define LYRA2RE_H
3+
4+
#ifdef __cplusplus
5+
extern "C" {
6+
#endif
7+
8+
void lyra2re_hash(const char* input, char* output);
9+
void lyra2re2_hash(const char* input, char* output);
10+
11+
#ifdef __cplusplus
12+
}
13+
#endif
14+
15+
#endif

0 commit comments

Comments
 (0)