rbnacl-libsodium 0.6.0 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGES.md +4 -0
- data/lib/rbnacl/libsodium/version.rb +1 -1
- data/vendor/libsodium/ChangeLog +15 -0
- data/vendor/libsodium/Makefile.am +2 -2
- data/vendor/libsodium/Makefile.in +6 -8
- data/vendor/libsodium/aclocal.m4 +0 -1
- data/vendor/libsodium/autom4te.cache/output.1 +47 -158
- data/vendor/libsodium/autom4te.cache/output.3 +17354 -0
- data/vendor/libsodium/autom4te.cache/requests +321 -92
- data/vendor/libsodium/autom4te.cache/traces.1 +371 -390
- data/vendor/libsodium/autom4te.cache/traces.3 +2832 -0
- data/vendor/libsodium/builds/msvc/properties/Debug.props +1 -1
- data/vendor/libsodium/builds/msvc/properties/DebugLIB.props +1 -0
- data/vendor/libsodium/builds/msvc/properties/DebugLTCG.props +1 -0
- data/vendor/libsodium/builds/msvc/resource.rc +0 -0
- data/vendor/libsodium/builds/msvc/version.h +2 -2
- data/vendor/libsodium/builds/msvc/vs2010/libsodium.import.props +1 -1
- data/vendor/libsodium/builds/msvc/vs2010/libsodium/libsodium.vcxproj +1 -1
- data/vendor/libsodium/builds/msvc/vs2010/libsodium/libsodium.vcxproj.filters +1 -1
- data/vendor/libsodium/builds/msvc/vs2010/test/test.vcxproj +0 -6
- data/vendor/libsodium/builds/msvc/vs2010/test/test.vcxproj.filters +0 -6
- data/vendor/libsodium/builds/msvc/vs2012/libsodium.import.props +1 -1
- data/vendor/libsodium/builds/msvc/vs2012/test/test.vcxproj +0 -6
- data/vendor/libsodium/builds/msvc/vs2012/test/test.vcxproj.filters +0 -6
- data/vendor/libsodium/builds/msvc/vs2013/libsodium.import.props +1 -1
- data/vendor/libsodium/builds/msvc/vs2013/libsodium/libsodium.vcxproj +1 -1
- data/vendor/libsodium/builds/msvc/vs2013/libsodium/libsodium.vcxproj.filters +1 -1
- data/vendor/libsodium/builds/msvc/vs2013/test/test.vcxproj +0 -6
- data/vendor/libsodium/builds/msvc/vs2013/test/test.vcxproj.filters +0 -6
- data/vendor/libsodium/configure +47 -158
- data/vendor/libsodium/configure.ac +18 -7
- data/vendor/libsodium/dist-build/Makefile.in +1 -5
- data/vendor/libsodium/dist-build/emscripten.sh +4 -3
- data/vendor/libsodium/msvc-scripts/Makefile.in +1 -5
- data/vendor/libsodium/msvc-scripts/process.bat +2 -2
- data/vendor/libsodium/packaging/nuget/package.config +1 -1
- data/vendor/libsodium/packaging/nuget/package.nuspec +27 -25
- data/vendor/libsodium/packaging/nuget/package.targets +21 -21
- data/vendor/libsodium/src/Makefile.in +1 -5
- data/vendor/libsodium/src/libsodium/Makefile.am +49 -45
- data/vendor/libsodium/src/libsodium/Makefile.in +488 -488
- data/vendor/libsodium/src/libsodium/crypto_sign/crypto_sign.c +15 -0
- data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/api.h +2 -0
- data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/open.c +63 -35
- data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/sign.c +61 -33
- data/vendor/libsodium/src/libsodium/crypto_stream/aes256estream/hongjun/aes-table-be.h +4 -5
- data/vendor/libsodium/src/libsodium/crypto_stream/aes256estream/hongjun/aes-table-le.h +4 -4
- data/vendor/libsodium/src/libsodium/crypto_stream/aes256estream/hongjun/aes-table.h +7 -1
- data/vendor/libsodium/src/libsodium/include/Makefile.in +1 -5
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_sign.h +10 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_sign_ed25519.h +13 -0
- data/vendor/libsodium/test/Makefile.in +1 -5
- data/vendor/libsodium/test/default/Makefile.am +6 -2
- data/vendor/libsodium/test/default/Makefile.in +26 -72
- data/vendor/libsodium/test/default/box_easy2.c +17 -2
- data/vendor/libsodium/test/default/box_easy2.exp +1 -0
- data/vendor/libsodium/test/default/secretbox_easy2.c +7 -0
- data/vendor/libsodium/test/default/sign.c +28 -0
- metadata +4 -2
@@ -59,3 +59,18 @@ crypto_sign_open(unsigned char *m, unsigned long long *mlen,
|
|
59
59
|
{
|
60
60
|
return crypto_sign_ed25519_open(m, mlen, sm, smlen, pk);
|
61
61
|
}
|
62
|
+
|
63
|
+
int
|
64
|
+
crypto_sign_detached(unsigned char *sig, unsigned long long *siglen,
|
65
|
+
const unsigned char *m, unsigned long long mlen,
|
66
|
+
const unsigned char *sk)
|
67
|
+
{
|
68
|
+
return crypto_sign_ed25519_detached(sig, siglen, m, mlen, sk);
|
69
|
+
}
|
70
|
+
|
71
|
+
int
|
72
|
+
crypto_sign_verify_detached(const unsigned char *sig, const unsigned char *m,
|
73
|
+
unsigned long long mlen, const unsigned char *pk)
|
74
|
+
{
|
75
|
+
return crypto_sign_ed25519_verify_detached(sig, m, mlen, pk);
|
76
|
+
}
|
@@ -2,7 +2,9 @@
|
|
2
2
|
#include "crypto_sign_ed25519.h"
|
3
3
|
|
4
4
|
#define crypto_sign crypto_sign_ed25519
|
5
|
+
#define crypto_sign_detached crypto_sign_ed25519_detached
|
5
6
|
#define crypto_sign_open crypto_sign_ed25519_open
|
7
|
+
#define crypto_sign_verify_detached crypto_sign_ed25519_verify_detached
|
6
8
|
#define crypto_sign_keypair crypto_sign_ed25519_keypair
|
7
9
|
#define crypto_sign_seed_keypair crypto_sign_ed25519_seed_keypair
|
8
10
|
#define crypto_sign_BYTES crypto_sign_ed25519_BYTES
|
@@ -1,4 +1,5 @@
|
|
1
1
|
|
2
|
+
#include <limits.h>
|
2
3
|
#include <string.h>
|
3
4
|
|
4
5
|
#include "api.h"
|
@@ -6,45 +7,72 @@
|
|
6
7
|
#include "crypto_verify_32.h"
|
7
8
|
#include "ge.h"
|
8
9
|
#include "sc.h"
|
10
|
+
#include "utils.h"
|
9
11
|
|
10
|
-
int
|
11
|
-
|
12
|
-
|
13
|
-
const unsigned char *pk
|
14
|
-
)
|
12
|
+
int
|
13
|
+
crypto_sign_verify_detached(const unsigned char *sig, const unsigned char *m,
|
14
|
+
unsigned long long mlen, const unsigned char *pk)
|
15
15
|
{
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
16
|
+
crypto_hash_sha512_state hs;
|
17
|
+
unsigned char h[64];
|
18
|
+
unsigned char rcheck[32];
|
19
|
+
unsigned int i;
|
20
|
+
unsigned char d = 0;
|
21
|
+
ge_p3 A;
|
22
|
+
ge_p2 R;
|
23
|
+
|
24
|
+
if (sig[63] & 224) {
|
25
|
+
return -1;
|
26
|
+
}
|
27
|
+
if (ge_frombytes_negate_vartime(&A, pk) != 0) {
|
28
|
+
return -1;
|
29
|
+
}
|
30
|
+
for (i = 0; i < 32; ++i) {
|
31
|
+
d |= pk[i];
|
32
|
+
}
|
33
|
+
if (d == 0) {
|
34
|
+
return -1;
|
35
|
+
}
|
36
|
+
crypto_hash_sha512_init(&hs);
|
37
|
+
crypto_hash_sha512_update(&hs, sig, 32);
|
38
|
+
crypto_hash_sha512_update(&hs, pk, 32);
|
39
|
+
crypto_hash_sha512_update(&hs, m, mlen);
|
40
|
+
crypto_hash_sha512_final(&hs, h);
|
41
|
+
sc_reduce(h);
|
42
|
+
|
43
|
+
ge_double_scalarmult_vartime(&R, h, &A, sig + 32);
|
44
|
+
ge_tobytes(rcheck, &R);
|
45
|
+
|
46
|
+
if (crypto_verify_32(rcheck, sig) != 0) {
|
47
|
+
return -1;
|
48
|
+
}
|
49
|
+
if (sig == rcheck) {
|
50
|
+
return -1;
|
51
|
+
}
|
52
|
+
if (sodium_memcmp(sig, rcheck, 32) != 0) {
|
53
|
+
return -1;
|
54
|
+
}
|
55
|
+
return 0;
|
56
|
+
}
|
57
|
+
|
58
|
+
int
|
59
|
+
crypto_sign_open(unsigned char *m, unsigned long long *mlen,
|
60
|
+
const unsigned char *sm, unsigned long long smlen,
|
61
|
+
const unsigned char *pk)
|
62
|
+
{
|
63
|
+
if (smlen < 64 || smlen > SIZE_MAX) {
|
64
|
+
goto badsig;
|
65
|
+
}
|
66
|
+
if (crypto_sign_verify_detached(sm, sm + 64, smlen - 64, pk) != 0) {
|
67
|
+
memset(m, 0, smlen - 64);
|
68
|
+
goto badsig;
|
69
|
+
}
|
42
70
|
*mlen = smlen - 64;
|
71
|
+
memmove(m, sm + 64, *mlen);
|
72
|
+
|
43
73
|
return 0;
|
44
|
-
}
|
45
74
|
|
46
75
|
badsig:
|
47
|
-
|
48
|
-
|
49
|
-
return -1;
|
76
|
+
*mlen = 0;
|
77
|
+
return -1;
|
50
78
|
}
|
@@ -6,38 +6,66 @@
|
|
6
6
|
#include "ge.h"
|
7
7
|
#include "sc.h"
|
8
8
|
|
9
|
-
int
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
)
|
9
|
+
int
|
10
|
+
crypto_sign_detached(unsigned char *sig, unsigned long long *siglen,
|
11
|
+
const unsigned char *m, unsigned long long mlen,
|
12
|
+
const unsigned char *sk)
|
14
13
|
{
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
14
|
+
crypto_hash_sha512_state hs;
|
15
|
+
unsigned char pk[32];
|
16
|
+
unsigned char az[64];
|
17
|
+
unsigned char nonce[64];
|
18
|
+
unsigned char hram[64];
|
19
|
+
ge_p3 R;
|
20
|
+
|
21
|
+
memmove(pk, sk + 32, 32);
|
22
|
+
|
23
|
+
crypto_hash_sha512(az, sk, 32);
|
24
|
+
az[0] &= 248;
|
25
|
+
az[31] &= 63;
|
26
|
+
az[31] |= 64;
|
27
|
+
|
28
|
+
crypto_hash_sha512_init(&hs);
|
29
|
+
crypto_hash_sha512_update(&hs, az + 32, 32);
|
30
|
+
crypto_hash_sha512_update(&hs, m, mlen);
|
31
|
+
crypto_hash_sha512_final(&hs, nonce);
|
32
|
+
|
33
|
+
memmove(sig + 32, pk, 32);
|
34
|
+
|
35
|
+
sc_reduce(nonce);
|
36
|
+
ge_scalarmult_base(&R, nonce);
|
37
|
+
ge_p3_tobytes(sig, &R);
|
38
|
+
|
39
|
+
crypto_hash_sha512_init(&hs);
|
40
|
+
crypto_hash_sha512_update(&hs, sig, 64);
|
41
|
+
crypto_hash_sha512_update(&hs, m, mlen);
|
42
|
+
crypto_hash_sha512_final(&hs, hram);
|
43
|
+
|
44
|
+
sc_reduce(hram);
|
45
|
+
sc_muladd(sig + 32, hram, az, nonce);
|
46
|
+
|
47
|
+
if (siglen != NULL) {
|
48
|
+
*siglen = 64U;
|
49
|
+
}
|
50
|
+
return 0;
|
51
|
+
}
|
52
|
+
|
53
|
+
int
|
54
|
+
crypto_sign(unsigned char *sm, unsigned long long *smlen,
|
55
|
+
const unsigned char *m, unsigned long long mlen,
|
56
|
+
const unsigned char *sk)
|
57
|
+
{
|
58
|
+
unsigned long long siglen;
|
59
|
+
|
60
|
+
if (crypto_sign_detached(sm, &siglen, m, mlen, sk) != 0 ||
|
61
|
+
siglen > crypto_sign_ed25519_BYTES) {
|
62
|
+
*smlen = 0;
|
63
|
+
memset(sm, 0, mlen + crypto_sign_ed25519_BYTES);
|
64
|
+
return -1;
|
65
|
+
}
|
66
|
+
memmove(sm + siglen, m, mlen);
|
67
|
+
if (smlen != NULL) {
|
68
|
+
*smlen = mlen + siglen;
|
69
|
+
}
|
70
|
+
return 0;
|
43
71
|
}
|
@@ -2,7 +2,7 @@
|
|
2
2
|
#ifndef __AES_TABLE_BE_H__
|
3
3
|
#define __AES_TABLE_BE_H__
|
4
4
|
|
5
|
-
static unsigned int T0[256] = {
|
5
|
+
ALIGN(64) static unsigned int T0[256] = {
|
6
6
|
0xc66363a5, 0xf87c7c84, 0xee777799, 0xf67b7b8d,
|
7
7
|
0xfff2f20d, 0xd66b6bbd, 0xde6f6fb1, 0x91c5c554,
|
8
8
|
0x60303050, 0x02010103, 0xce6767a9, 0x562b2b7d,
|
@@ -69,8 +69,7 @@ static unsigned int T0[256] = {
|
|
69
69
|
0x7bb0b0cb, 0xa85454fc, 0x6dbbbbd6, 0x2c16163a
|
70
70
|
};
|
71
71
|
|
72
|
-
|
73
|
-
static unsigned int T1[256] = {
|
72
|
+
ALIGN(64) static unsigned int T1[256] = {
|
74
73
|
0xa5c66363, 0x84f87c7c, 0x99ee7777, 0x8df67b7b,
|
75
74
|
0x0dfff2f2, 0xbdd66b6b, 0xb1de6f6f, 0x5491c5c5,
|
76
75
|
0x50603030, 0x03020101, 0xa9ce6767, 0x7d562b2b,
|
@@ -137,7 +136,7 @@ static unsigned int T1[256] = {
|
|
137
136
|
0xcb7bb0b0, 0xfca85454, 0xd66dbbbb, 0x3a2c1616
|
138
137
|
};
|
139
138
|
|
140
|
-
static unsigned int T2[256] = {
|
139
|
+
ALIGN(64) static unsigned int T2[256] = {
|
141
140
|
0x63a5c663, 0x7c84f87c, 0x7799ee77, 0x7b8df67b,
|
142
141
|
0xf20dfff2, 0x6bbdd66b, 0x6fb1de6f, 0xc55491c5,
|
143
142
|
0x30506030, 0x01030201, 0x67a9ce67, 0x2b7d562b,
|
@@ -204,7 +203,7 @@ static unsigned int T2[256] = {
|
|
204
203
|
0xb0cb7bb0, 0x54fca854, 0xbbd66dbb, 0x163a2c16
|
205
204
|
};
|
206
205
|
|
207
|
-
static unsigned int T3[256] = {
|
206
|
+
ALIGN(64) static unsigned int T3[256] = {
|
208
207
|
0x6363a5c6, 0x7c7c84f8, 0x777799ee, 0x7b7b8df6,
|
209
208
|
0xf2f20dff, 0x6b6bbdd6, 0x6f6fb1de, 0xc5c55491,
|
210
209
|
0x30305060, 0x01010302, 0x6767a9ce, 0x2b2b7d56,
|
@@ -2,7 +2,7 @@
|
|
2
2
|
#ifndef __AES_TABLE_LE_H__
|
3
3
|
#define __AES_TABLE_LE_H__
|
4
4
|
|
5
|
-
static unsigned int T0[256] = {
|
5
|
+
ALIGN(64) static unsigned int T0[256] = {
|
6
6
|
0xa56363c6, 0x847c7cf8, 0x997777ee, 0x8d7b7bf6,
|
7
7
|
0x0df2f2ff, 0xbd6b6bd6, 0xb16f6fde, 0x54c5c591,
|
8
8
|
0x50303060, 0x03010102, 0xa96767ce, 0x7d2b2b56,
|
@@ -70,7 +70,7 @@ static unsigned int T0[256] = {
|
|
70
70
|
};
|
71
71
|
|
72
72
|
|
73
|
-
static unsigned int T1[256] = {
|
73
|
+
ALIGN(64) static unsigned int T1[256] = {
|
74
74
|
0x6363c6a5, 0x7c7cf884, 0x7777ee99, 0x7b7bf68d,
|
75
75
|
0xf2f2ff0d, 0x6b6bd6bd, 0x6f6fdeb1, 0xc5c59154,
|
76
76
|
0x30306050, 0x01010203, 0x6767cea9, 0x2b2b567d,
|
@@ -137,7 +137,7 @@ static unsigned int T1[256] = {
|
|
137
137
|
0xb0b07bcb, 0x5454a8fc, 0xbbbb6dd6, 0x16162c3a
|
138
138
|
};
|
139
139
|
|
140
|
-
static unsigned int T2[256] = {
|
140
|
+
ALIGN(64) static unsigned int T2[256] = {
|
141
141
|
0x63c6a563, 0x7cf8847c, 0x77ee9977, 0x7bf68d7b,
|
142
142
|
0xf2ff0df2, 0x6bd6bd6b, 0x6fdeb16f, 0xc59154c5,
|
143
143
|
0x30605030, 0x01020301, 0x67cea967, 0x2b567d2b,
|
@@ -204,7 +204,7 @@ static unsigned int T2[256] = {
|
|
204
204
|
0xb07bcbb0, 0x54a8fc54, 0xbb6dd6bb, 0x162c3a16
|
205
205
|
};
|
206
206
|
|
207
|
-
static unsigned int T3[256] = {
|
207
|
+
ALIGN(64) static unsigned int T3[256] = {
|
208
208
|
0xc6a56363, 0xf8847c7c, 0xee997777, 0xf68d7b7b,
|
209
209
|
0xff0df2f2, 0xd6bd6b6b, 0xdeb16f6f, 0x9154c5c5,
|
210
210
|
0x60503030, 0x02030101, 0xcea96767, 0x567d2b2b,
|
@@ -2,6 +2,12 @@
|
|
2
2
|
#ifndef __AES_TABLE_H__
|
3
3
|
#define __AES_TABLE_H__
|
4
4
|
|
5
|
+
#if defined(_MSC_VER)
|
6
|
+
# define ALIGN(x) __declspec(align(x))
|
7
|
+
#else
|
8
|
+
# define ALIGN(x) __attribute__((aligned(x)))
|
9
|
+
#endif
|
10
|
+
|
5
11
|
#ifdef NATIVE_LITTLE_ENDIAN
|
6
12
|
# include "aes-table-le.h"
|
7
13
|
#elif defined(NATIVE_BIG_ENDIAN)
|
@@ -20,7 +26,7 @@ static const unsigned char Rcon[31] =
|
|
20
26
|
};
|
21
27
|
|
22
28
|
|
23
|
-
static const unsigned char Sbox[256] = {
|
29
|
+
ALIGN(64) static const unsigned char Sbox[256] = {
|
24
30
|
0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5,
|
25
31
|
0x30, 0x01, 0x67, 0x2b, 0xfe, 0xd7, 0xab, 0x76,
|
26
32
|
0xca, 0x82, 0xc9, 0x7d, 0xfa, 0x59, 0x47, 0xf0,
|
@@ -87,7 +87,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_compile_flag.m4 \
|
|
87
87
|
$(top_srcdir)/m4/ld-output-def.m4 $(top_srcdir)/m4/libtool.m4 \
|
88
88
|
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
|
89
89
|
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
|
90
|
-
$(top_srcdir)/
|
90
|
+
$(top_srcdir)/configure.ac
|
91
91
|
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
92
92
|
$(ACLOCAL_M4)
|
93
93
|
mkinstalldirs = $(install_sh) -d
|
@@ -195,7 +195,6 @@ FGREP = @FGREP@
|
|
195
195
|
GREP = @GREP@
|
196
196
|
HAVE_AMD64_ASM_V = @HAVE_AMD64_ASM_V@
|
197
197
|
HAVE_CPUID_V = @HAVE_CPUID_V@
|
198
|
-
HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@
|
199
198
|
HAVE_TI_MODE_V = @HAVE_TI_MODE_V@
|
200
199
|
INSTALL = @INSTALL@
|
201
200
|
INSTALL_DATA = @INSTALL_DATA@
|
@@ -231,9 +230,6 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
|
231
230
|
PACKAGE_URL = @PACKAGE_URL@
|
232
231
|
PACKAGE_VERSION = @PACKAGE_VERSION@
|
233
232
|
PATH_SEPARATOR = @PATH_SEPARATOR@
|
234
|
-
PKG_CONFIG = @PKG_CONFIG@
|
235
|
-
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
|
236
|
-
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
|
237
233
|
RANLIB = @RANLIB@
|
238
234
|
SAFECODE_HOME = @SAFECODE_HOME@
|
239
235
|
SED = @SED@
|
@@ -57,6 +57,16 @@ int crypto_sign_open(unsigned char *m, unsigned long long *mlen,
|
|
57
57
|
const unsigned char *sm, unsigned long long smlen,
|
58
58
|
const unsigned char *pk);
|
59
59
|
|
60
|
+
SODIUM_EXPORT
|
61
|
+
int crypto_sign_detached(unsigned char *sig, unsigned long long *siglen,
|
62
|
+
const unsigned char *m, unsigned long long mlen,
|
63
|
+
const unsigned char *sk);
|
64
|
+
|
65
|
+
SODIUM_EXPORT
|
66
|
+
int crypto_sign_verify_detached(const unsigned char *sig,
|
67
|
+
const unsigned char *m,
|
68
|
+
unsigned long long mlen,
|
69
|
+
const unsigned char *pk);
|
60
70
|
#ifdef __cplusplus
|
61
71
|
}
|
62
72
|
#endif
|
@@ -37,6 +37,19 @@ int crypto_sign_ed25519_open(unsigned char *m, unsigned long long *mlen,
|
|
37
37
|
const unsigned char *sm, unsigned long long smlen,
|
38
38
|
const unsigned char *pk);
|
39
39
|
|
40
|
+
SODIUM_EXPORT
|
41
|
+
int crypto_sign_ed25519_detached(unsigned char *sig,
|
42
|
+
unsigned long long *siglen,
|
43
|
+
const unsigned char *m,
|
44
|
+
unsigned long long mlen,
|
45
|
+
const unsigned char *sk);
|
46
|
+
|
47
|
+
SODIUM_EXPORT
|
48
|
+
int crypto_sign_ed25519_verify_detached(const unsigned char *sig,
|
49
|
+
const unsigned char *m,
|
50
|
+
unsigned long long mlen,
|
51
|
+
const unsigned char *pk);
|
52
|
+
|
40
53
|
SODIUM_EXPORT
|
41
54
|
int crypto_sign_ed25519_keypair(unsigned char *pk, unsigned char *sk);
|
42
55
|
|
@@ -85,7 +85,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_compile_flag.m4 \
|
|
85
85
|
$(top_srcdir)/m4/ld-output-def.m4 $(top_srcdir)/m4/libtool.m4 \
|
86
86
|
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
|
87
87
|
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
|
88
|
-
$(top_srcdir)/
|
88
|
+
$(top_srcdir)/configure.ac
|
89
89
|
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
90
90
|
$(ACLOCAL_M4)
|
91
91
|
mkinstalldirs = $(install_sh) -d
|
@@ -206,7 +206,6 @@ FGREP = @FGREP@
|
|
206
206
|
GREP = @GREP@
|
207
207
|
HAVE_AMD64_ASM_V = @HAVE_AMD64_ASM_V@
|
208
208
|
HAVE_CPUID_V = @HAVE_CPUID_V@
|
209
|
-
HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@
|
210
209
|
HAVE_TI_MODE_V = @HAVE_TI_MODE_V@
|
211
210
|
INSTALL = @INSTALL@
|
212
211
|
INSTALL_DATA = @INSTALL_DATA@
|
@@ -242,9 +241,6 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
|
242
241
|
PACKAGE_URL = @PACKAGE_URL@
|
243
242
|
PACKAGE_VERSION = @PACKAGE_VERSION@
|
244
243
|
PATH_SEPARATOR = @PATH_SEPARATOR@
|
245
|
-
PKG_CONFIG = @PKG_CONFIG@
|
246
|
-
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
|
247
|
-
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
|
248
244
|
RANLIB = @RANLIB@
|
249
245
|
SAFECODE_HOME = @SAFECODE_HOME@
|
250
246
|
SED = @SED@
|
@@ -173,10 +173,14 @@ TESTS_TARGETS = \
|
|
173
173
|
stream2 \
|
174
174
|
stream3 \
|
175
175
|
stream4 \
|
176
|
-
stream5 \
|
177
|
-
stream6 \
|
178
176
|
verify1
|
179
177
|
|
178
|
+
if !MINIMAL
|
179
|
+
TESTS_TARGETS += \
|
180
|
+
stream5 \
|
181
|
+
stream6
|
182
|
+
endif
|
183
|
+
|
180
184
|
check_PROGRAMS = $(TESTS_TARGETS)
|
181
185
|
|
182
186
|
TESTS = $(TESTS_TARGETS)
|
@@ -77,8 +77,12 @@ PRE_UNINSTALL = :
|
|
77
77
|
POST_UNINSTALL = :
|
78
78
|
build_triplet = @build@
|
79
79
|
host_triplet = @host@
|
80
|
-
|
81
|
-
|
80
|
+
@MINIMAL_FALSE@am__append_1 = \
|
81
|
+
@MINIMAL_FALSE@ stream5 \
|
82
|
+
@MINIMAL_FALSE@ stream6
|
83
|
+
|
84
|
+
check_PROGRAMS = $(am__EXEEXT_2)
|
85
|
+
TESTS = $(am__EXEEXT_2)
|
82
86
|
subdir = test/default
|
83
87
|
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
|
84
88
|
$(top_srcdir)/depcomp $(top_srcdir)/test-driver
|
@@ -88,13 +92,14 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_compile_flag.m4 \
|
|
88
92
|
$(top_srcdir)/m4/ld-output-def.m4 $(top_srcdir)/m4/libtool.m4 \
|
89
93
|
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
|
90
94
|
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
|
91
|
-
$(top_srcdir)/
|
95
|
+
$(top_srcdir)/configure.ac
|
92
96
|
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
93
97
|
$(ACLOCAL_M4)
|
94
98
|
mkinstalldirs = $(install_sh) -d
|
95
99
|
CONFIG_CLEAN_FILES =
|
96
100
|
CONFIG_CLEAN_VPATH_FILES =
|
97
|
-
am__EXEEXT_1 =
|
101
|
+
@MINIMAL_FALSE@am__EXEEXT_1 = stream5$(EXEEXT) stream6$(EXEEXT)
|
102
|
+
am__EXEEXT_2 = aead_chacha20poly1305$(EXEEXT) auth$(EXEEXT) \
|
98
103
|
auth2$(EXEEXT) auth3$(EXEEXT) auth5$(EXEEXT) auth6$(EXEEXT) \
|
99
104
|
auth7$(EXEEXT) box$(EXEEXT) box2$(EXEEXT) box7$(EXEEXT) \
|
100
105
|
box8$(EXEEXT) box_easy$(EXEEXT) box_easy2$(EXEEXT) \
|
@@ -112,7 +117,7 @@ am__EXEEXT_1 = aead_chacha20poly1305$(EXEEXT) auth$(EXEEXT) \
|
|
112
117
|
shorthash$(EXEEXT) sign$(EXEEXT) sodium_core$(EXEEXT) \
|
113
118
|
sodium_utils$(EXEEXT) sodium_version$(EXEEXT) stream$(EXEEXT) \
|
114
119
|
stream2$(EXEEXT) stream3$(EXEEXT) stream4$(EXEEXT) \
|
115
|
-
|
120
|
+
verify1$(EXEEXT) $(am__EXEEXT_1)
|
116
121
|
aead_chacha20poly1305_SOURCES = aead_chacha20poly1305.c
|
117
122
|
aead_chacha20poly1305_OBJECTS = aead_chacha20poly1305.$(OBJEXT)
|
118
123
|
aead_chacha20poly1305_DEPENDENCIES = $(TESTS_LDADD)
|
@@ -598,7 +603,6 @@ FGREP = @FGREP@
|
|
598
603
|
GREP = @GREP@
|
599
604
|
HAVE_AMD64_ASM_V = @HAVE_AMD64_ASM_V@
|
600
605
|
HAVE_CPUID_V = @HAVE_CPUID_V@
|
601
|
-
HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@
|
602
606
|
HAVE_TI_MODE_V = @HAVE_TI_MODE_V@
|
603
607
|
INSTALL = @INSTALL@
|
604
608
|
INSTALL_DATA = @INSTALL_DATA@
|
@@ -634,9 +638,6 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
|
634
638
|
PACKAGE_URL = @PACKAGE_URL@
|
635
639
|
PACKAGE_VERSION = @PACKAGE_VERSION@
|
636
640
|
PATH_SEPARATOR = @PATH_SEPARATOR@
|
637
|
-
PKG_CONFIG = @PKG_CONFIG@
|
638
|
-
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
|
639
|
-
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
|
640
641
|
RANLIB = @RANLIB@
|
641
642
|
SAFECODE_HOME = @SAFECODE_HOME@
|
642
643
|
SED = @SED@
|
@@ -821,62 +822,15 @@ AM_CPPFLAGS = \
|
|
821
822
|
-I$(top_builddir)/src/libsodium/include/sodium \
|
822
823
|
-I$(top_srcdir)/test/quirks
|
823
824
|
|
824
|
-
TESTS_TARGETS = \
|
825
|
-
|
826
|
-
|
827
|
-
|
828
|
-
|
829
|
-
|
830
|
-
|
831
|
-
|
832
|
-
|
833
|
-
box2 \
|
834
|
-
box7 \
|
835
|
-
box8 \
|
836
|
-
box_easy \
|
837
|
-
box_easy2 \
|
838
|
-
box_seed \
|
839
|
-
chacha20 \
|
840
|
-
core1 \
|
841
|
-
core2 \
|
842
|
-
core3 \
|
843
|
-
core4 \
|
844
|
-
core5 \
|
845
|
-
core6 \
|
846
|
-
generichash \
|
847
|
-
generichash2 \
|
848
|
-
generichash3 \
|
849
|
-
hash \
|
850
|
-
hash3 \
|
851
|
-
onetimeauth \
|
852
|
-
onetimeauth2 \
|
853
|
-
onetimeauth7 \
|
854
|
-
pwhash \
|
855
|
-
pwhash_scrypt_ll \
|
856
|
-
randombytes \
|
857
|
-
scalarmult \
|
858
|
-
scalarmult2 \
|
859
|
-
scalarmult5 \
|
860
|
-
scalarmult6 \
|
861
|
-
secretbox \
|
862
|
-
secretbox2 \
|
863
|
-
secretbox7 \
|
864
|
-
secretbox8 \
|
865
|
-
secretbox_easy \
|
866
|
-
secretbox_easy2 \
|
867
|
-
shorthash \
|
868
|
-
sign \
|
869
|
-
sodium_core \
|
870
|
-
sodium_utils \
|
871
|
-
sodium_version \
|
872
|
-
stream \
|
873
|
-
stream2 \
|
874
|
-
stream3 \
|
875
|
-
stream4 \
|
876
|
-
stream5 \
|
877
|
-
stream6 \
|
878
|
-
verify1
|
879
|
-
|
825
|
+
TESTS_TARGETS = aead_chacha20poly1305 auth auth2 auth3 auth5 auth6 \
|
826
|
+
auth7 box box2 box7 box8 box_easy box_easy2 box_seed chacha20 \
|
827
|
+
core1 core2 core3 core4 core5 core6 generichash generichash2 \
|
828
|
+
generichash3 hash hash3 onetimeauth onetimeauth2 onetimeauth7 \
|
829
|
+
pwhash pwhash_scrypt_ll randombytes scalarmult scalarmult2 \
|
830
|
+
scalarmult5 scalarmult6 secretbox secretbox2 secretbox7 \
|
831
|
+
secretbox8 secretbox_easy secretbox_easy2 shorthash sign \
|
832
|
+
sodium_core sodium_utils sodium_version stream stream2 stream3 \
|
833
|
+
stream4 verify1 $(am__append_1)
|
880
834
|
TESTS_LDADD = \
|
881
835
|
${top_builddir}/src/libsodium/libsodium.la
|
882
836
|
|
@@ -1889,6 +1843,13 @@ stream4.log: stream4$(EXEEXT)
|
|
1889
1843
|
--log-file $$b.log --trs-file $$b.trs \
|
1890
1844
|
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
|
1891
1845
|
"$$tst" $(AM_TESTS_FD_REDIRECT)
|
1846
|
+
verify1.log: verify1$(EXEEXT)
|
1847
|
+
@p='verify1$(EXEEXT)'; \
|
1848
|
+
b='verify1'; \
|
1849
|
+
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
|
1850
|
+
--log-file $$b.log --trs-file $$b.trs \
|
1851
|
+
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
|
1852
|
+
"$$tst" $(AM_TESTS_FD_REDIRECT)
|
1892
1853
|
stream5.log: stream5$(EXEEXT)
|
1893
1854
|
@p='stream5$(EXEEXT)'; \
|
1894
1855
|
b='stream5'; \
|
@@ -1903,13 +1864,6 @@ stream6.log: stream6$(EXEEXT)
|
|
1903
1864
|
--log-file $$b.log --trs-file $$b.trs \
|
1904
1865
|
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
|
1905
1866
|
"$$tst" $(AM_TESTS_FD_REDIRECT)
|
1906
|
-
verify1.log: verify1$(EXEEXT)
|
1907
|
-
@p='verify1$(EXEEXT)'; \
|
1908
|
-
b='verify1'; \
|
1909
|
-
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
|
1910
|
-
--log-file $$b.log --trs-file $$b.trs \
|
1911
|
-
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
|
1912
|
-
"$$tst" $(AM_TESTS_FD_REDIRECT)
|
1913
1867
|
.test.log:
|
1914
1868
|
@p='$<'; \
|
1915
1869
|
$(am__set_b); \
|