rbnacl-libsodium 1.0.7 → 1.0.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (132) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +4 -0
  3. data/lib/rbnacl/libsodium/version.rb +1 -1
  4. data/vendor/libsodium/ChangeLog +5 -0
  5. data/vendor/libsodium/README.markdown +4 -1
  6. data/vendor/libsodium/autogen.sh +0 -5
  7. data/vendor/libsodium/autom4te.cache/output.1 +14 -14
  8. data/vendor/libsodium/autom4te.cache/output.5 +14 -14
  9. data/vendor/libsodium/autom4te.cache/requests +868 -868
  10. data/vendor/libsodium/autom4te.cache/traces.1 +1 -1
  11. data/vendor/libsodium/builds/msvc/version.h +2 -2
  12. data/vendor/libsodium/builds/msvc/vs2010/libsodium/libsodium.vcxproj +10 -72
  13. data/vendor/libsodium/builds/msvc/vs2010/libsodium/libsodium.vcxproj.filters +36 -216
  14. data/vendor/libsodium/builds/msvc/vs2012/libsodium/libsodium.vcxproj +10 -72
  15. data/vendor/libsodium/builds/msvc/vs2012/libsodium/libsodium.vcxproj.filters +34 -214
  16. data/vendor/libsodium/builds/msvc/vs2013/libsodium/libsodium.vcxproj +10 -72
  17. data/vendor/libsodium/builds/msvc/vs2013/libsodium/libsodium.vcxproj.filters +34 -214
  18. data/vendor/libsodium/builds/msvc/vs2015/libsodium/libsodium.vcxproj +10 -72
  19. data/vendor/libsodium/builds/msvc/vs2015/libsodium/libsodium.vcxproj.filters +25 -205
  20. data/vendor/libsodium/configure +14 -14
  21. data/vendor/libsodium/configure.ac +5 -5
  22. data/vendor/libsodium/dist-build/msys2-win32.sh +3 -2
  23. data/vendor/libsodium/dist-build/msys2-win64.sh +3 -2
  24. data/vendor/libsodium/examples/sign.c +2 -2
  25. data/vendor/libsodium/examples/utils.h +3 -1
  26. data/vendor/libsodium/libsodium.vcxproj +7 -53
  27. data/vendor/libsodium/libsodium.vcxproj.filters +18 -152
  28. data/vendor/libsodium/msvc-scripts/process.bat +2 -2
  29. data/vendor/libsodium/src/libsodium/Makefile.am +6 -68
  30. data/vendor/libsodium/src/libsodium/Makefile.in +49 -724
  31. data/vendor/libsodium/src/libsodium/crypto_aead/aes256gcm/aesni/aead_aes256gcm_aesni.c +2 -2
  32. data/vendor/libsodium/src/libsodium/{crypto_sign/ed25519 → crypto_core/curve25519}/ref10/base.h +0 -0
  33. data/vendor/libsodium/src/libsodium/{crypto_sign/ed25519 → crypto_core/curve25519}/ref10/base2.h +0 -0
  34. data/vendor/libsodium/src/libsodium/crypto_core/curve25519/ref10/curve25519_ref10.c +2233 -0
  35. data/vendor/libsodium/src/libsodium/crypto_core/curve25519/ref10/curve25519_ref10.h +160 -0
  36. data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2b-ref.c +2 -2
  37. data/vendor/libsodium/src/libsodium/crypto_hash/sha256/cp/hash_sha256.c +1 -1
  38. data/vendor/libsodium/src/libsodium/crypto_hash/sha512/cp/hash_sha512.c +1 -1
  39. data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna32.h +1 -1
  40. data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna64.h +2 -2
  41. data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/sse2/poly1305_sse2.c +2 -2
  42. data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/donna_c64/curve25519_donna_c64.c +1 -1
  43. data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/ref10/x25519_ref10.c +255 -0
  44. data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/ref10/{curve25519_ref10.h → x25519_ref10.h} +0 -0
  45. data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/scalarmult_curve25519.c +1 -1
  46. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/keypair.c +1 -2
  47. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/obsolete.c +2 -4
  48. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/open.c +1 -2
  49. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/sign.c +1 -2
  50. data/vendor/libsodium/src/libsodium/crypto_stream/chacha20/ref/stream_chacha20_ref.c +1 -1
  51. data/vendor/libsodium/src/libsodium/crypto_stream/chacha20/vec/stream_chacha20_vec.c +16 -9
  52. data/vendor/libsodium/src/libsodium/include/sodium/export.h +2 -2
  53. data/vendor/libsodium/src/libsodium/include/sodium/utils.h +6 -4
  54. data/vendor/libsodium/src/libsodium/randombytes/salsa20/randombytes_salsa20_random.c +12 -8
  55. data/vendor/libsodium/src/libsodium/sodium/core.c +9 -0
  56. data/vendor/libsodium/src/libsodium/sodium/runtime.c +32 -10
  57. data/vendor/libsodium/src/libsodium/sodium/utils.c +8 -8
  58. data/vendor/libsodium/test/default/auth.c +1 -1
  59. data/vendor/libsodium/test/default/box.c +16 -4
  60. data/vendor/libsodium/test/default/box2.c +7 -0
  61. data/vendor/libsodium/test/default/box7.c +18 -10
  62. data/vendor/libsodium/test/default/box8.c +1 -1
  63. data/vendor/libsodium/test/default/box_easy2.c +13 -0
  64. data/vendor/libsodium/test/default/onetimeauth.c +1 -0
  65. data/vendor/libsodium/test/default/pwhash_scrypt_ll.c +2 -2
  66. data/vendor/libsodium/test/default/verify1.c +1 -1
  67. metadata +9 -71
  68. data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/ref10/curve25519_ref10.c +0 -73
  69. data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/ref10/fe.h +0 -44
  70. data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/ref10/fe_0_curve25519_ref10.c +0 -23
  71. data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/ref10/fe_1_curve25519_ref10.c +0 -23
  72. data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/ref10/fe_add_curve25519_ref10.c +0 -61
  73. data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/ref10/fe_copy_curve25519_ref10.c +0 -33
  74. data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/ref10/fe_cswap_curve25519_ref10.c +0 -77
  75. data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/ref10/fe_frombytes_curve25519_ref10.c +0 -74
  76. data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/ref10/fe_invert_curve25519_ref10.c +0 -18
  77. data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/ref10/fe_mul121666_curve25519_ref10.c +0 -74
  78. data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/ref10/fe_mul_curve25519_ref10.c +0 -257
  79. data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/ref10/fe_sq_curve25519_ref10.c +0 -153
  80. data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/ref10/fe_sub_curve25519_ref10.c +0 -61
  81. data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/ref10/fe_tobytes_curve25519_ref10.c +0 -123
  82. data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/ref10/montgomery.h +0 -140
  83. data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/ref10/pow225521.h +0 -160
  84. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/d.h +0 -1
  85. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/d2.h +0 -1
  86. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/fe.h +0 -56
  87. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/fe_0.c +0 -19
  88. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/fe_1.c +0 -19
  89. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/fe_add.c +0 -57
  90. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/fe_cmov.c +0 -63
  91. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/fe_copy.c +0 -29
  92. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/fe_frombytes.c +0 -73
  93. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/fe_invert.c +0 -14
  94. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/fe_isnegative.c +0 -16
  95. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/fe_isnonzero.c +0 -19
  96. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/fe_mul.c +0 -253
  97. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/fe_neg.c +0 -45
  98. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/fe_pow22523.c +0 -13
  99. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/fe_sq.c +0 -149
  100. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/fe_sq2.c +0 -160
  101. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/fe_sub.c +0 -57
  102. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/fe_tobytes.c +0 -119
  103. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge.h +0 -97
  104. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_add.c +0 -11
  105. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_add.h +0 -97
  106. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_double_scalarmult.c +0 -138
  107. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_frombytes.c +0 -50
  108. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_madd.c +0 -11
  109. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_madd.h +0 -88
  110. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_msub.c +0 -11
  111. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_msub.h +0 -88
  112. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_p1p1_to_p2.c +0 -12
  113. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_p1p1_to_p3.c +0 -13
  114. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_p2_0.c +0 -8
  115. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_p2_dbl.c +0 -11
  116. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_p2_dbl.h +0 -73
  117. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_p3_0.c +0 -9
  118. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_p3_dbl.c +0 -12
  119. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_p3_to_cached.c +0 -17
  120. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_p3_to_p2.c +0 -12
  121. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_p3_tobytes.c +0 -14
  122. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_precomp_0.c +0 -8
  123. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_scalarmult_base.c +0 -111
  124. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_sub.c +0 -11
  125. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_sub.h +0 -97
  126. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_tobytes.c +0 -14
  127. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/pow22523.h +0 -160
  128. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/pow225521.h +0 -160
  129. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/sc.h +0 -15
  130. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/sc_muladd.c +0 -368
  131. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/sc_reduce.c +0 -275
  132. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/sqrtm1.h +0 -1
@@ -7,20 +7,24 @@ static unsigned char alicepk[crypto_box_PUBLICKEYBYTES];
7
7
  static unsigned char bobsk[crypto_box_SECRETKEYBYTES];
8
8
  static unsigned char bobpk[crypto_box_PUBLICKEYBYTES];
9
9
  static unsigned char n[crypto_box_NONCEBYTES];
10
- static unsigned char m[10000];
11
- static unsigned char c[10000];
12
- static unsigned char m2[10000];
13
10
 
14
11
  int main(void)
15
12
  {
16
- size_t mlen;
17
- size_t i;
18
- int ret;
13
+ unsigned char *m;
14
+ unsigned char *c;
15
+ unsigned char *m2;
16
+ size_t mlen;
17
+ size_t mlen_max = 1000;
18
+ size_t i;
19
+ int ret;
19
20
 
20
- for (mlen = 0; mlen < 1000 && mlen + crypto_box_ZEROBYTES < sizeof m;
21
- ++mlen) {
22
- crypto_box_keypair(alicepk, alicesk);
23
- crypto_box_keypair(bobpk, bobsk);
21
+ m = (unsigned char *) sodium_malloc(mlen_max);
22
+ c = (unsigned char *) sodium_malloc(mlen_max);
23
+ m2 = (unsigned char *) sodium_malloc(mlen_max);
24
+ memset(m, 0, crypto_box_ZEROBYTES);
25
+ crypto_box_keypair(alicepk, alicesk);
26
+ crypto_box_keypair(bobpk, bobsk);
27
+ for (mlen = 0; mlen + crypto_box_ZEROBYTES <= mlen_max; mlen++) {
24
28
  randombytes_buf(n, crypto_box_NONCEBYTES);
25
29
  randombytes_buf(m + crypto_box_ZEROBYTES, mlen);
26
30
  ret = crypto_box(c, m, mlen + crypto_box_ZEROBYTES, n, bobpk, alicesk);
@@ -37,5 +41,9 @@ int main(void)
37
41
  printf("ciphertext fails verification\n");
38
42
  }
39
43
  }
44
+ sodium_free(m);
45
+ sodium_free(c);
46
+ sodium_free(m2);
47
+
40
48
  return 0;
41
49
  }
@@ -14,7 +14,7 @@ int main(void)
14
14
  unsigned char *c;
15
15
  unsigned char *m2;
16
16
  size_t mlen;
17
- size_t mlen_max = 600;
17
+ size_t mlen_max = 1000;
18
18
  size_t i;
19
19
  int faults;
20
20
  int ret;
@@ -2,6 +2,11 @@
2
2
  #define TEST_NAME "box_easy2"
3
3
  #include "cmptest.h"
4
4
 
5
+ static const unsigned char small_order_p[crypto_box_PUBLICKEYBYTES]
6
+ = { 0xe0, 0xeb, 0x7a, 0x7c, 0x3b, 0x41, 0xb8, 0xae, 0x16, 0x56, 0xe3,
7
+ 0xfa, 0xf1, 0x9f, 0xc4, 0x6a, 0xda, 0x09, 0x8d, 0xeb, 0x9c, 0x32,
8
+ 0xb1, 0xfd, 0x86, 0x62, 0x05, 0x16, 0x5f, 0x49, 0xb8, 0x00 };
9
+
5
10
  int main(void)
6
11
  {
7
12
  unsigned char *alicepk;
@@ -68,6 +73,11 @@ int main(void)
68
73
  printf("crypto_box_open_easy() failed\n");
69
74
  }
70
75
 
76
+ ret = crypto_box_beforenm(k1, small_order_p, bobsk);
77
+ assert(ret == -1);
78
+ ret = crypto_box_beforenm(k2, small_order_p, alicesk);
79
+ assert(ret == -1);
80
+
71
81
  ret = crypto_box_beforenm(k1, alicepk, bobsk);
72
82
  assert(ret == 0);
73
83
  ret = crypto_box_beforenm(k2, bobpk, alicesk);
@@ -90,6 +100,9 @@ int main(void)
90
100
  printf("crypto_box_open_easy_afternm() with a huge ciphertext should have failed\n");
91
101
  }
92
102
  memset(m2, 0, m2_size);
103
+ ret = crypto_box_detached(c, mac, m, (unsigned long long) mlen,
104
+ nonce, small_order_p, bobsk);
105
+ assert(ret == -1);
93
106
  ret = crypto_box_detached(c, mac, m, (unsigned long long) mlen,
94
107
  nonce, alicepk, bobsk);
95
108
  assert(ret == 0);
@@ -38,6 +38,7 @@ int main(void)
38
38
  memset(a, 0, sizeof a);
39
39
  crypto_onetimeauth_init(&st, rs);
40
40
  crypto_onetimeauth_update(&st, c, 100);
41
+ crypto_onetimeauth_update(&st, c, 0);
41
42
  crypto_onetimeauth_update(&st, c + 100, 31);
42
43
  crypto_onetimeauth_final(&st, a);
43
44
  for (i = 0; i < 16; ++i) {
@@ -41,8 +41,8 @@ static void test_vector(const char *password, const char *salt, uint64_t N,
41
41
  return;
42
42
  }
43
43
 
44
- printf("scrypt('%s', '%s', %llu, %lu, %lu, %lu) =\n", password, salt,
45
- (unsigned long long)N, (unsigned long)r, (unsigned long)p,
44
+ printf("scrypt('%s', '%s', %lu, %lu, %lu, %lu) =\n", password, salt,
45
+ (unsigned long)N, (unsigned long)r, (unsigned long)p,
46
46
  (unsigned long)olen);
47
47
 
48
48
  for (i = 0; i < olen; ++i) {
@@ -21,7 +21,7 @@ int main(void)
21
21
  v32x = (unsigned char *) sodium_malloc(32);
22
22
  v64 = (unsigned char *) sodium_malloc(64);
23
23
  v64x = (unsigned char *) sodium_malloc(64);
24
- for (i = 0; i < 100000; i++) {
24
+ for (i = 0; i < 10000; i++) {
25
25
  randombytes_buf(v16, 16);
26
26
  randombytes_buf(v32, 32);
27
27
  randombytes_buf(v64, 64);
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rbnacl-libsodium
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.7
4
+ version: 1.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Artiom Di
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-08 00:00:00.000000000 Z
11
+ date: 2015-12-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rbnacl
@@ -263,6 +263,10 @@ files:
263
263
  - vendor/libsodium/src/libsodium/crypto_box/curve25519xsalsa20poly1305/ref/before_curve25519xsalsa20poly1305.c
264
264
  - vendor/libsodium/src/libsodium/crypto_box/curve25519xsalsa20poly1305/ref/box_curve25519xsalsa20poly1305.c
265
265
  - vendor/libsodium/src/libsodium/crypto_box/curve25519xsalsa20poly1305/ref/keypair_curve25519xsalsa20poly1305.c
266
+ - vendor/libsodium/src/libsodium/crypto_core/curve25519/ref10/base.h
267
+ - vendor/libsodium/src/libsodium/crypto_core/curve25519/ref10/base2.h
268
+ - vendor/libsodium/src/libsodium/crypto_core/curve25519/ref10/curve25519_ref10.c
269
+ - vendor/libsodium/src/libsodium/crypto_core/curve25519/ref10/curve25519_ref10.h
266
270
  - vendor/libsodium/src/libsodium/crypto_core/hsalsa20/core_hsalsa20_api.c
267
271
  - vendor/libsodium/src/libsodium/crypto_core/hsalsa20/ref2/core_hsalsa20.c
268
272
  - vendor/libsodium/src/libsodium/crypto_core/salsa20/core_salsa20_api.c
@@ -309,23 +313,8 @@ files:
309
313
  - vendor/libsodium/src/libsodium/crypto_scalarmult/crypto_scalarmult.c
310
314
  - vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/donna_c64/curve25519_donna_c64.c
311
315
  - vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/donna_c64/curve25519_donna_c64.h
312
- - vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/ref10/curve25519_ref10.c
313
- - vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/ref10/curve25519_ref10.h
314
- - vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/ref10/fe.h
315
- - vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/ref10/fe_0_curve25519_ref10.c
316
- - vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/ref10/fe_1_curve25519_ref10.c
317
- - vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/ref10/fe_add_curve25519_ref10.c
318
- - vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/ref10/fe_copy_curve25519_ref10.c
319
- - vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/ref10/fe_cswap_curve25519_ref10.c
320
- - vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/ref10/fe_frombytes_curve25519_ref10.c
321
- - vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/ref10/fe_invert_curve25519_ref10.c
322
- - vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/ref10/fe_mul121666_curve25519_ref10.c
323
- - vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/ref10/fe_mul_curve25519_ref10.c
324
- - vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/ref10/fe_sq_curve25519_ref10.c
325
- - vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/ref10/fe_sub_curve25519_ref10.c
326
- - vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/ref10/fe_tobytes_curve25519_ref10.c
327
- - vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/ref10/montgomery.h
328
- - vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/ref10/pow225521.h
316
+ - vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/ref10/x25519_ref10.c
317
+ - vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/ref10/x25519_ref10.h
329
318
  - vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/sandy2x/consts.S
330
319
  - vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/sandy2x/consts_namespace.h
331
320
  - vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/sandy2x/curve25519_sandy2x.c
@@ -356,61 +345,10 @@ files:
356
345
  - vendor/libsodium/src/libsodium/crypto_shorthash/siphash24/shorthash_siphash24_api.c
357
346
  - vendor/libsodium/src/libsodium/crypto_sign/crypto_sign.c
358
347
  - vendor/libsodium/src/libsodium/crypto_sign/ed25519/description
359
- - vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/base.h
360
- - vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/base2.h
361
- - vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/d.h
362
- - vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/d2.h
363
- - vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/fe.h
364
- - vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/fe_0.c
365
- - vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/fe_1.c
366
- - vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/fe_add.c
367
- - vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/fe_cmov.c
368
- - vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/fe_copy.c
369
- - vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/fe_frombytes.c
370
- - vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/fe_invert.c
371
- - vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/fe_isnegative.c
372
- - vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/fe_isnonzero.c
373
- - vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/fe_mul.c
374
- - vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/fe_neg.c
375
- - vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/fe_pow22523.c
376
- - vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/fe_sq.c
377
- - vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/fe_sq2.c
378
- - vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/fe_sub.c
379
- - vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/fe_tobytes.c
380
- - vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge.h
381
- - vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_add.c
382
- - vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_add.h
383
- - vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_double_scalarmult.c
384
- - vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_frombytes.c
385
- - vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_madd.c
386
- - vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_madd.h
387
- - vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_msub.c
388
- - vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_msub.h
389
- - vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_p1p1_to_p2.c
390
- - vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_p1p1_to_p3.c
391
- - vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_p2_0.c
392
- - vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_p2_dbl.c
393
- - vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_p2_dbl.h
394
- - vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_p3_0.c
395
- - vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_p3_dbl.c
396
- - vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_p3_to_cached.c
397
- - vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_p3_to_p2.c
398
- - vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_p3_tobytes.c
399
- - vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_precomp_0.c
400
- - vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_scalarmult_base.c
401
- - vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_sub.c
402
- - vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_sub.h
403
- - vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_tobytes.c
404
348
  - vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/keypair.c
405
349
  - vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/obsolete.c
406
350
  - vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/open.c
407
- - vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/pow22523.h
408
- - vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/pow225521.h
409
- - vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/sc.h
410
- - vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/sc_muladd.c
411
- - vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/sc_reduce.c
412
351
  - vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/sign.c
413
- - vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/sqrtm1.h
414
352
  - vendor/libsodium/src/libsodium/crypto_sign/ed25519/sign_ed25519_api.c
415
353
  - vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/portable/afternm_aes128ctr.c
416
354
  - vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/portable/beforenm_aes128ctr.c
@@ -663,7 +601,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
663
601
  version: '0'
664
602
  requirements: []
665
603
  rubyforge_project:
666
- rubygems_version: 2.4.8
604
+ rubygems_version: 2.5.1
667
605
  signing_key:
668
606
  specification_version: 4
669
607
  summary: rbnacl with bundled libsodium
@@ -1,73 +0,0 @@
1
-
2
- #include <stddef.h>
3
-
4
- #ifndef HAVE_TI_MODE
5
-
6
- #include "utils.h"
7
- #include "curve25519_ref10.h"
8
- #include "../scalarmult_curve25519.h"
9
- #include "fe.h"
10
-
11
- static const unsigned char basepoint[32] = {9};
12
-
13
- static int
14
- crypto_scalarmult_curve25519_ref10(unsigned char *q,
15
- const unsigned char *n,
16
- const unsigned char *p)
17
- {
18
- unsigned char e[32];
19
- unsigned int i;
20
- fe x1;
21
- fe x2;
22
- fe z2;
23
- fe x3;
24
- fe z3;
25
- fe tmp0;
26
- fe tmp1;
27
- int pos;
28
- unsigned int swap;
29
- unsigned int b;
30
-
31
- for (i = 0;i < 32;++i) e[i] = n[i];
32
- e[0] &= 248;
33
- e[31] &= 127;
34
- e[31] |= 64;
35
- fe_frombytes(x1,p);
36
- fe_1(x2);
37
- fe_0(z2);
38
- fe_copy(x3,x1);
39
- fe_1(z3);
40
-
41
- swap = 0;
42
- for (pos = 254;pos >= 0;--pos) {
43
- b = e[pos / 8] >> (pos & 7);
44
- b &= 1;
45
- swap ^= b;
46
- fe_cswap(x2,x3,swap);
47
- fe_cswap(z2,z3,swap);
48
- swap = b;
49
- #include "montgomery.h"
50
- }
51
- fe_cswap(x2,x3,swap);
52
- fe_cswap(z2,z3,swap);
53
-
54
- fe_invert(z2,z2);
55
- fe_mul(x2,x2,z2);
56
- fe_tobytes(q,x2);
57
- return 0;
58
- }
59
-
60
- static int
61
- crypto_scalarmult_curve25519_ref10_base(unsigned char *q,
62
- const unsigned char *n)
63
- {
64
- return crypto_scalarmult_curve25519_ref10(q,n,basepoint);
65
- }
66
-
67
- struct crypto_scalarmult_curve25519_implementation
68
- crypto_scalarmult_curve25519_ref10_implementation = {
69
- SODIUM_C99(.mult = ) crypto_scalarmult_curve25519_ref10,
70
- SODIUM_C99(.mult_base = ) crypto_scalarmult_curve25519_ref10_base
71
- };
72
-
73
- #endif
@@ -1,44 +0,0 @@
1
- #ifndef FE_H
2
- #define FE_H
3
-
4
- #include "crypto_int32.h"
5
-
6
- typedef crypto_int32 fe[10];
7
-
8
- /*
9
- fe means field element.
10
- Here the field is \Z/(2^255-19).
11
- An element t, entries t[0]...t[9], represents the integer
12
- t[0]+2^26 t[1]+2^51 t[2]+2^77 t[3]+2^102 t[4]+...+2^230 t[9].
13
- Bounds on each t[i] vary depending on context.
14
- */
15
-
16
- #define fe_frombytes crypto_scalarmult_curve25519_ref10_fe_frombytes
17
- #define fe_tobytes crypto_scalarmult_curve25519_ref10_fe_tobytes
18
- #define fe_copy crypto_scalarmult_curve25519_ref10_fe_copy
19
- #define fe_0 crypto_scalarmult_curve25519_ref10_fe_0
20
- #define fe_1 crypto_scalarmult_curve25519_ref10_fe_1
21
- #define fe_cswap crypto_scalarmult_curve25519_ref10_fe_cswap
22
- #define fe_add crypto_scalarmult_curve25519_ref10_fe_add
23
- #define fe_sub crypto_scalarmult_curve25519_ref10_fe_sub
24
- #define fe_mul crypto_scalarmult_curve25519_ref10_fe_mul
25
- #define fe_sq crypto_scalarmult_curve25519_ref10_fe_sq
26
- #define fe_mul121666 crypto_scalarmult_curve25519_ref10_fe_mul121666
27
- #define fe_invert crypto_scalarmult_curve25519_ref10_fe_invert
28
-
29
- extern void fe_frombytes(fe,const unsigned char *);
30
- extern void fe_tobytes(unsigned char *,fe);
31
-
32
- extern void fe_copy(fe,fe);
33
- extern void fe_0(fe);
34
- extern void fe_1(fe);
35
- extern void fe_cswap(fe,fe,unsigned int);
36
-
37
- extern void fe_add(fe,fe,fe);
38
- extern void fe_sub(fe,fe,fe);
39
- extern void fe_mul(fe,fe,fe);
40
- extern void fe_sq(fe,fe);
41
- extern void fe_mul121666(fe,fe);
42
- extern void fe_invert(fe,fe);
43
-
44
- #endif
@@ -1,23 +0,0 @@
1
- #include "fe.h"
2
-
3
- #ifndef HAVE_TI_MODE
4
-
5
- /*
6
- h = 0
7
- */
8
-
9
- void fe_0(fe h)
10
- {
11
- h[0] = 0;
12
- h[1] = 0;
13
- h[2] = 0;
14
- h[3] = 0;
15
- h[4] = 0;
16
- h[5] = 0;
17
- h[6] = 0;
18
- h[7] = 0;
19
- h[8] = 0;
20
- h[9] = 0;
21
- }
22
-
23
- #endif
@@ -1,23 +0,0 @@
1
- #include "fe.h"
2
-
3
- #ifndef HAVE_TI_MODE
4
-
5
- /*
6
- h = 1
7
- */
8
-
9
- void fe_1(fe h)
10
- {
11
- h[0] = 1;
12
- h[1] = 0;
13
- h[2] = 0;
14
- h[3] = 0;
15
- h[4] = 0;
16
- h[5] = 0;
17
- h[6] = 0;
18
- h[7] = 0;
19
- h[8] = 0;
20
- h[9] = 0;
21
- }
22
-
23
- #endif
@@ -1,61 +0,0 @@
1
- #include "fe.h"
2
-
3
- #ifndef HAVE_TI_MODE
4
-
5
- /*
6
- h = f + g
7
- Can overlap h with f or g.
8
-
9
- Preconditions:
10
- |f| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc.
11
- |g| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc.
12
-
13
- Postconditions:
14
- |h| bounded by 1.1*2^26,1.1*2^25,1.1*2^26,1.1*2^25,etc.
15
- */
16
-
17
- void fe_add(fe h,fe f,fe g)
18
- {
19
- crypto_int32 f0 = f[0];
20
- crypto_int32 f1 = f[1];
21
- crypto_int32 f2 = f[2];
22
- crypto_int32 f3 = f[3];
23
- crypto_int32 f4 = f[4];
24
- crypto_int32 f5 = f[5];
25
- crypto_int32 f6 = f[6];
26
- crypto_int32 f7 = f[7];
27
- crypto_int32 f8 = f[8];
28
- crypto_int32 f9 = f[9];
29
- crypto_int32 g0 = g[0];
30
- crypto_int32 g1 = g[1];
31
- crypto_int32 g2 = g[2];
32
- crypto_int32 g3 = g[3];
33
- crypto_int32 g4 = g[4];
34
- crypto_int32 g5 = g[5];
35
- crypto_int32 g6 = g[6];
36
- crypto_int32 g7 = g[7];
37
- crypto_int32 g8 = g[8];
38
- crypto_int32 g9 = g[9];
39
- crypto_int32 h0 = f0 + g0;
40
- crypto_int32 h1 = f1 + g1;
41
- crypto_int32 h2 = f2 + g2;
42
- crypto_int32 h3 = f3 + g3;
43
- crypto_int32 h4 = f4 + g4;
44
- crypto_int32 h5 = f5 + g5;
45
- crypto_int32 h6 = f6 + g6;
46
- crypto_int32 h7 = f7 + g7;
47
- crypto_int32 h8 = f8 + g8;
48
- crypto_int32 h9 = f9 + g9;
49
- h[0] = h0;
50
- h[1] = h1;
51
- h[2] = h2;
52
- h[3] = h3;
53
- h[4] = h4;
54
- h[5] = h5;
55
- h[6] = h6;
56
- h[7] = h7;
57
- h[8] = h8;
58
- h[9] = h9;
59
- }
60
-
61
- #endif