rbnacl-libsodium 1.0.5 → 1.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (118) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +8 -0
  3. data/lib/rbnacl/libsodium/version.rb +1 -1
  4. data/vendor/libsodium/ChangeLog +25 -0
  5. data/vendor/libsodium/Makefile.in +1 -1
  6. data/vendor/libsodium/THANKS +1 -0
  7. data/vendor/libsodium/autom4te.cache/output.1 +16 -16
  8. data/vendor/libsodium/autom4te.cache/output.5 +16 -16
  9. data/vendor/libsodium/autom4te.cache/requests +894 -894
  10. data/vendor/libsodium/autom4te.cache/traces.1 +4 -4
  11. data/vendor/libsodium/autom4te.cache/traces.5 +2 -2
  12. data/vendor/libsodium/builds/msvc/version.h +3 -3
  13. data/vendor/libsodium/builds/msvc/vs2010/libsodium/libsodium.vcxproj +7 -3
  14. data/vendor/libsodium/builds/msvc/vs2010/libsodium/libsodium.vcxproj.filters +21 -9
  15. data/vendor/libsodium/builds/msvc/vs2012/libsodium/libsodium.vcxproj +8 -4
  16. data/vendor/libsodium/builds/msvc/vs2012/libsodium/libsodium.vcxproj.filters +21 -9
  17. data/vendor/libsodium/builds/msvc/vs2013/libsodium/libsodium.vcxproj +7 -3
  18. data/vendor/libsodium/builds/msvc/vs2013/libsodium/libsodium.vcxproj.filters +21 -9
  19. data/vendor/libsodium/builds/msvc/vs2015/libsodium/libsodium.vcxproj +7 -3
  20. data/vendor/libsodium/builds/msvc/vs2015/libsodium/libsodium.vcxproj.filters +21 -9
  21. data/vendor/libsodium/configure +16 -16
  22. data/vendor/libsodium/configure.ac +7 -7
  23. data/vendor/libsodium/dist-build/Makefile.in +1 -1
  24. data/vendor/libsodium/libsodium.sln +4 -2
  25. data/vendor/libsodium/libsodium.vcxproj +17 -13
  26. data/vendor/libsodium/libsodium.vcxproj.filters +22 -10
  27. data/vendor/libsodium/msvc-scripts/Makefile.in +1 -1
  28. data/vendor/libsodium/msvc-scripts/process.bat +3 -3
  29. data/vendor/libsodium/src/Makefile.in +1 -1
  30. data/vendor/libsodium/src/libsodium/Makefile.am +19 -7
  31. data/vendor/libsodium/src/libsodium/Makefile.in +85 -48
  32. data/vendor/libsodium/src/libsodium/crypto_aead/aes256gcm/aesni/aead_aes256gcm_aesni.c +11 -3
  33. data/vendor/libsodium/src/libsodium/crypto_aead/chacha20poly1305/sodium/aead_chacha20poly1305.c +1 -0
  34. data/vendor/libsodium/src/libsodium/crypto_box/curve25519xsalsa20poly1305/ref/keypair_curve25519xsalsa20poly1305.c +2 -0
  35. data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2-impl.h +4 -4
  36. data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2.h +20 -18
  37. data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2b-compress-ref.c +93 -0
  38. data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2b-compress-sse41.c +80 -0
  39. data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2b-compress-ssse3.c +89 -0
  40. data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2b-load-sse2.h +68 -0
  41. data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2b-load-sse41.h +402 -0
  42. data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2b-ref.c +58 -102
  43. data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2b-round.h +123 -0
  44. data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/generichash_blake2b.c +6 -0
  45. data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/donna/auth_poly1305_donna.c +15 -10
  46. data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna.h +14 -14
  47. data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna32.h +0 -2
  48. data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna64.h +0 -2
  49. data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/onetimeauth_poly1305.c +18 -16
  50. data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/onetimeauth_poly1305.h +23 -0
  51. data/vendor/libsodium/src/libsodium/crypto_pwhash/scryptsalsa208sha256/pbkdf2-sha256.c +2 -2
  52. data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/donna_c64/api.h +0 -3
  53. data/vendor/libsodium/src/libsodium/crypto_secretbox/crypto_secretbox_easy.c +6 -2
  54. data/vendor/libsodium/src/libsodium/crypto_stream/chacha20/ref/stream_chacha20_ref.c +5 -0
  55. data/vendor/libsodium/src/libsodium/include/Makefile.in +1 -1
  56. data/vendor/libsodium/src/libsodium/include/sodium/core.h +2 -1
  57. data/vendor/libsodium/src/libsodium/include/sodium/crypto_aead_aes256gcm.h +5 -2
  58. data/vendor/libsodium/src/libsodium/include/sodium/crypto_aead_chacha20poly1305.h +5 -2
  59. data/vendor/libsodium/src/libsodium/include/sodium/crypto_auth.h +3 -1
  60. data/vendor/libsodium/src/libsodium/include/sodium/crypto_auth_hmacsha256.h +2 -1
  61. data/vendor/libsodium/src/libsodium/include/sodium/crypto_auth_hmacsha512.h +2 -1
  62. data/vendor/libsodium/src/libsodium/include/sodium/crypto_auth_hmacsha512256.h +2 -1
  63. data/vendor/libsodium/src/libsodium/include/sodium/crypto_box.h +15 -7
  64. data/vendor/libsodium/src/libsodium/include/sodium/crypto_box_curve25519xsalsa20poly1305.h +4 -2
  65. data/vendor/libsodium/src/libsodium/include/sodium/crypto_generichash_blake2b.h +4 -0
  66. data/vendor/libsodium/src/libsodium/include/sodium/crypto_hash.h +2 -1
  67. data/vendor/libsodium/src/libsodium/include/sodium/crypto_onetimeauth.h +2 -1
  68. data/vendor/libsodium/src/libsodium/include/sodium/crypto_onetimeauth_poly1305.h +7 -30
  69. data/vendor/libsodium/src/libsodium/include/sodium/crypto_pwhash_scryptsalsa208sha256.h +8 -4
  70. data/vendor/libsodium/src/libsodium/include/sodium/crypto_secretbox.h +7 -3
  71. data/vendor/libsodium/src/libsodium/include/sodium/crypto_sign.h +5 -2
  72. data/vendor/libsodium/src/libsodium/include/sodium/crypto_sign_ed25519.h +6 -3
  73. data/vendor/libsodium/src/libsodium/include/sodium/crypto_sign_edwards25519sha512batch.h +14 -8
  74. data/vendor/libsodium/src/libsodium/include/sodium/crypto_verify_16.h +2 -1
  75. data/vendor/libsodium/src/libsodium/include/sodium/crypto_verify_32.h +2 -1
  76. data/vendor/libsodium/src/libsodium/include/sodium/crypto_verify_64.h +2 -1
  77. data/vendor/libsodium/src/libsodium/include/sodium/runtime.h +10 -3
  78. data/vendor/libsodium/src/libsodium/include/sodium/utils.h +8 -4
  79. data/vendor/libsodium/src/libsodium/randombytes/randombytes.c +7 -0
  80. data/vendor/libsodium/src/libsodium/randombytes/salsa20/randombytes_salsa20_random.c +4 -2
  81. data/vendor/libsodium/src/libsodium/randombytes/sysrandom/randombytes_sysrandom.c +12 -10
  82. data/vendor/libsodium/src/libsodium/sodium/core.c +4 -4
  83. data/vendor/libsodium/src/libsodium/sodium/runtime.c +27 -1
  84. data/vendor/libsodium/src/libsodium/sodium/utils.c +4 -2
  85. data/vendor/libsodium/test/Makefile.in +1 -1
  86. data/vendor/libsodium/test/default/Makefile.in +1 -1
  87. data/vendor/libsodium/test/default/aead_aes256gcm.c +14 -0
  88. data/vendor/libsodium/test/default/box_easy2.c +13 -7
  89. data/vendor/libsodium/test/default/chacha20.c +36 -12
  90. data/vendor/libsodium/test/default/ed25519_convert.c +6 -2
  91. data/vendor/libsodium/test/default/generichash3.exp +1 -1
  92. data/vendor/libsodium/test/default/secretbox_easy2.c +5 -3
  93. data/vendor/libsodium/test/default/sodium_core.c +2 -0
  94. data/vendor/libsodium/test/default/sodium_utils.c +10 -4
  95. data/vendor/libsodium/test/default/sodium_utils2.c +1 -0
  96. data/vendor/libsodium/test/default/sodium_utils3.c +1 -0
  97. metadata +8 -22
  98. data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha256/checksum +0 -1
  99. data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha512256/checksum +0 -1
  100. data/vendor/libsodium/src/libsodium/crypto_box/curve25519xsalsa20poly1305/checksum +0 -1
  101. data/vendor/libsodium/src/libsodium/crypto_core/hsalsa20/checksum +0 -1
  102. data/vendor/libsodium/src/libsodium/crypto_core/salsa20/checksum +0 -1
  103. data/vendor/libsodium/src/libsodium/crypto_core/salsa2012/checksum +0 -1
  104. data/vendor/libsodium/src/libsodium/crypto_core/salsa208/checksum +0 -1
  105. data/vendor/libsodium/src/libsodium/crypto_hash/sha256/checksum +0 -1
  106. data/vendor/libsodium/src/libsodium/crypto_hash/sha512/checksum +0 -1
  107. data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/donna/verify_poly1305_donna.c +0 -15
  108. data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/onetimeauth_poly1305_api.c +0 -11
  109. data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/onetimeauth_poly1305_try.c +0 -13
  110. data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/checksum +0 -1
  111. data/vendor/libsodium/src/libsodium/crypto_secretbox/xsalsa20poly1305/checksum +0 -1
  112. data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/checksum +0 -1
  113. data/vendor/libsodium/src/libsodium/crypto_stream/salsa20/checksum +0 -1
  114. data/vendor/libsodium/src/libsodium/crypto_stream/salsa2012/checksum +0 -1
  115. data/vendor/libsodium/src/libsodium/crypto_stream/salsa208/checksum +0 -1
  116. data/vendor/libsodium/src/libsodium/crypto_stream/xsalsa20/checksum +0 -1
  117. data/vendor/libsodium/src/libsodium/crypto_verify/16/checksum +0 -1
  118. data/vendor/libsodium/src/libsodium/crypto_verify/32/checksum +0 -1
@@ -54,7 +54,8 @@ int crypto_aead_aes256gcm_decrypt(unsigned char *m,
54
54
  const unsigned char *ad,
55
55
  unsigned long long adlen,
56
56
  const unsigned char *npub,
57
- const unsigned char *k);
57
+ const unsigned char *k)
58
+ __attribute__ ((warn_unused_result));
58
59
 
59
60
  SODIUM_EXPORT
60
61
  int crypto_aead_aes256gcm_beforenm(crypto_aead_aes256gcm_state *ctx_,
@@ -80,7 +81,9 @@ int crypto_aead_aes256gcm_decrypt_afternm(unsigned char *m,
80
81
  const unsigned char *ad,
81
82
  unsigned long long adlen,
82
83
  const unsigned char *npub,
83
- const crypto_aead_aes256gcm_state *ctx_);
84
+ const crypto_aead_aes256gcm_state *ctx_)
85
+ __attribute__ ((warn_unused_result));
86
+
84
87
  #ifdef __cplusplus
85
88
  }
86
89
  #endif
@@ -47,7 +47,8 @@ int crypto_aead_chacha20poly1305_decrypt(unsigned char *m,
47
47
  const unsigned char *ad,
48
48
  unsigned long long adlen,
49
49
  const unsigned char *npub,
50
- const unsigned char *k);
50
+ const unsigned char *k)
51
+ __attribute__ ((warn_unused_result));
51
52
 
52
53
  #define crypto_aead_chacha20poly1305_IETF_NPUBBYTES 12U
53
54
  SODIUM_EXPORT
@@ -73,7 +74,9 @@ int crypto_aead_chacha20poly1305_ietf_decrypt(unsigned char *m,
73
74
  const unsigned char *ad,
74
75
  unsigned long long adlen,
75
76
  const unsigned char *npub,
76
- const unsigned char *k);
77
+ const unsigned char *k)
78
+ __attribute__ ((warn_unused_result));
79
+
77
80
  #ifdef __cplusplus
78
81
  }
79
82
  #endif
@@ -31,7 +31,9 @@ int crypto_auth(unsigned char *out, const unsigned char *in,
31
31
 
32
32
  SODIUM_EXPORT
33
33
  int crypto_auth_verify(const unsigned char *h, const unsigned char *in,
34
- unsigned long long inlen, const unsigned char *k);
34
+ unsigned long long inlen, const unsigned char *k)
35
+ __attribute__ ((warn_unused_result));
36
+
35
37
  #ifdef __cplusplus
36
38
  }
37
39
  #endif
@@ -30,7 +30,8 @@ SODIUM_EXPORT
30
30
  int crypto_auth_hmacsha256_verify(const unsigned char *h,
31
31
  const unsigned char *in,
32
32
  unsigned long long inlen,
33
- const unsigned char *k);
33
+ const unsigned char *k)
34
+ __attribute__ ((warn_unused_result));
34
35
 
35
36
  /* ------------------------------------------------------------------------- */
36
37
 
@@ -30,7 +30,8 @@ SODIUM_EXPORT
30
30
  int crypto_auth_hmacsha512_verify(const unsigned char *h,
31
31
  const unsigned char *in,
32
32
  unsigned long long inlen,
33
- const unsigned char *k);
33
+ const unsigned char *k)
34
+ __attribute__ ((warn_unused_result));
34
35
 
35
36
  /* ------------------------------------------------------------------------- */
36
37
 
@@ -28,7 +28,8 @@ SODIUM_EXPORT
28
28
  int crypto_auth_hmacsha512256_verify(const unsigned char *h,
29
29
  const unsigned char *in,
30
30
  unsigned long long inlen,
31
- const unsigned char *k);
31
+ const unsigned char *k)
32
+ __attribute__ ((warn_unused_result));
32
33
 
33
34
  /* ------------------------------------------------------------------------- */
34
35
 
@@ -59,7 +59,8 @@ int crypto_box_easy(unsigned char *c, const unsigned char *m,
59
59
  SODIUM_EXPORT
60
60
  int crypto_box_open_easy(unsigned char *m, const unsigned char *c,
61
61
  unsigned long long clen, const unsigned char *n,
62
- const unsigned char *pk, const unsigned char *sk);
62
+ const unsigned char *pk, const unsigned char *sk)
63
+ __attribute__ ((warn_unused_result));
63
64
 
64
65
  SODIUM_EXPORT
65
66
  int crypto_box_detached(unsigned char *c, unsigned char *mac,
@@ -73,7 +74,8 @@ int crypto_box_open_detached(unsigned char *m, const unsigned char *c,
73
74
  unsigned long long clen,
74
75
  const unsigned char *n,
75
76
  const unsigned char *pk,
76
- const unsigned char *sk);
77
+ const unsigned char *sk)
78
+ __attribute__ ((warn_unused_result));
77
79
 
78
80
  /* -- Precomputation interface -- */
79
81
 
@@ -93,7 +95,8 @@ int crypto_box_easy_afternm(unsigned char *c, const unsigned char *m,
93
95
  SODIUM_EXPORT
94
96
  int crypto_box_open_easy_afternm(unsigned char *m, const unsigned char *c,
95
97
  unsigned long long clen, const unsigned char *n,
96
- const unsigned char *k);
98
+ const unsigned char *k)
99
+ __attribute__ ((warn_unused_result));
97
100
 
98
101
  SODIUM_EXPORT
99
102
  int crypto_box_detached_afternm(unsigned char *c, unsigned char *mac,
@@ -104,7 +107,8 @@ SODIUM_EXPORT
104
107
  int crypto_box_open_detached_afternm(unsigned char *m, const unsigned char *c,
105
108
  const unsigned char *mac,
106
109
  unsigned long long clen, const unsigned char *n,
107
- const unsigned char *k);
110
+ const unsigned char *k)
111
+ __attribute__ ((warn_unused_result));
108
112
 
109
113
  /* -- Ephemeral SK interface -- */
110
114
 
@@ -119,7 +123,8 @@ int crypto_box_seal(unsigned char *c, const unsigned char *m,
119
123
  SODIUM_EXPORT
120
124
  int crypto_box_seal_open(unsigned char *m, const unsigned char *c,
121
125
  unsigned long long clen,
122
- const unsigned char *pk, const unsigned char *sk);
126
+ const unsigned char *pk, const unsigned char *sk)
127
+ __attribute__ ((warn_unused_result));
123
128
 
124
129
  /* -- NaCl compatibility interface ; Requires padding -- */
125
130
 
@@ -139,7 +144,8 @@ int crypto_box(unsigned char *c, const unsigned char *m,
139
144
  SODIUM_EXPORT
140
145
  int crypto_box_open(unsigned char *m, const unsigned char *c,
141
146
  unsigned long long clen, const unsigned char *n,
142
- const unsigned char *pk, const unsigned char *sk);
147
+ const unsigned char *pk, const unsigned char *sk)
148
+ __attribute__ ((warn_unused_result));
143
149
 
144
150
  SODIUM_EXPORT
145
151
  int crypto_box_afternm(unsigned char *c, const unsigned char *m,
@@ -149,7 +155,9 @@ int crypto_box_afternm(unsigned char *c, const unsigned char *m,
149
155
  SODIUM_EXPORT
150
156
  int crypto_box_open_afternm(unsigned char *m, const unsigned char *c,
151
157
  unsigned long long clen, const unsigned char *n,
152
- const unsigned char *k);
158
+ const unsigned char *k)
159
+ __attribute__ ((warn_unused_result));
160
+
153
161
  #ifdef __cplusplus
154
162
  }
155
163
  #endif
@@ -59,7 +59,8 @@ int crypto_box_curve25519xsalsa20poly1305_open(unsigned char *m,
59
59
  unsigned long long clen,
60
60
  const unsigned char *n,
61
61
  const unsigned char *pk,
62
- const unsigned char *sk);
62
+ const unsigned char *sk)
63
+ __attribute__ ((warn_unused_result));
63
64
 
64
65
  SODIUM_EXPORT
65
66
  int crypto_box_curve25519xsalsa20poly1305_seed_keypair(unsigned char *pk,
@@ -87,7 +88,8 @@ int crypto_box_curve25519xsalsa20poly1305_open_afternm(unsigned char *m,
87
88
  const unsigned char *c,
88
89
  unsigned long long clen,
89
90
  const unsigned char *n,
90
- const unsigned char *k);
91
+ const unsigned char *k)
92
+ __attribute__ ((warn_unused_result));
91
93
 
92
94
  #ifdef __cplusplus
93
95
  }
@@ -104,6 +104,10 @@ int crypto_generichash_blake2b_final(crypto_generichash_blake2b_state *state,
104
104
  unsigned char *out,
105
105
  const size_t outlen);
106
106
 
107
+ /* ------------------------------------------------------------------------- */
108
+
109
+ int _crypto_generichash_blake2b_pick_best_implementation(void);
110
+
107
111
  #ifdef __cplusplus
108
112
  }
109
113
  #endif
@@ -30,7 +30,8 @@ int crypto_hash(unsigned char *out, const unsigned char *in,
30
30
 
31
31
  #define crypto_hash_PRIMITIVE "sha512"
32
32
  SODIUM_EXPORT
33
- const char *crypto_hash_primitive(void);
33
+ const char *crypto_hash_primitive(void)
34
+ __attribute__ ((warn_unused_result));
34
35
 
35
36
  #ifdef __cplusplus
36
37
  }
@@ -35,7 +35,8 @@ int crypto_onetimeauth(unsigned char *out, const unsigned char *in,
35
35
 
36
36
  SODIUM_EXPORT
37
37
  int crypto_onetimeauth_verify(const unsigned char *h, const unsigned char *in,
38
- unsigned long long inlen, const unsigned char *k);
38
+ unsigned long long inlen, const unsigned char *k)
39
+ __attribute__ ((warn_unused_result));
39
40
 
40
41
  SODIUM_EXPORT
41
42
  int crypto_onetimeauth_init(crypto_onetimeauth_state *state,
@@ -1,7 +1,7 @@
1
1
  #ifndef crypto_onetimeauth_poly1305_H
2
2
  #define crypto_onetimeauth_poly1305_H
3
3
 
4
- #include <stddef.h>
4
+ #include <stdlib.h>
5
5
  #include "export.h"
6
6
 
7
7
  #ifdef __cplusplus
@@ -21,25 +21,6 @@ typedef struct crypto_onetimeauth_poly1305_state {
21
21
  unsigned char opaque[136];
22
22
  } crypto_onetimeauth_poly1305_state;
23
23
 
24
- typedef struct crypto_onetimeauth_poly1305_implementation {
25
- const char *(*implementation_name)(void);
26
- int (*onetimeauth)(unsigned char *out,
27
- const unsigned char *in,
28
- unsigned long long inlen,
29
- const unsigned char *k);
30
- int (*onetimeauth_verify)(const unsigned char *h,
31
- const unsigned char *in,
32
- unsigned long long inlen,
33
- const unsigned char *k);
34
- int (*onetimeauth_init)(crypto_onetimeauth_poly1305_state *state,
35
- const unsigned char *key);
36
- int (*onetimeauth_update)(crypto_onetimeauth_poly1305_state *state,
37
- const unsigned char *in,
38
- unsigned long long inlen);
39
- int (*onetimeauth_final)(crypto_onetimeauth_poly1305_state *state,
40
- unsigned char *out);
41
- } crypto_onetimeauth_poly1305_implementation;
42
-
43
24
  #define crypto_onetimeauth_poly1305_BYTES 16U
44
25
  SODIUM_EXPORT
45
26
  size_t crypto_onetimeauth_poly1305_bytes(void);
@@ -48,15 +29,6 @@ size_t crypto_onetimeauth_poly1305_bytes(void);
48
29
  SODIUM_EXPORT
49
30
  size_t crypto_onetimeauth_poly1305_keybytes(void);
50
31
 
51
- SODIUM_EXPORT
52
- const char *crypto_onetimeauth_poly1305_implementation_name(void);
53
-
54
- SODIUM_EXPORT
55
- int crypto_onetimeauth_poly1305_set_implementation(crypto_onetimeauth_poly1305_implementation *impl);
56
-
57
- crypto_onetimeauth_poly1305_implementation *
58
- crypto_onetimeauth_pick_best_implementation(void);
59
-
60
32
  SODIUM_EXPORT
61
33
  int crypto_onetimeauth_poly1305(unsigned char *out,
62
34
  const unsigned char *in,
@@ -67,7 +39,8 @@ SODIUM_EXPORT
67
39
  int crypto_onetimeauth_poly1305_verify(const unsigned char *h,
68
40
  const unsigned char *in,
69
41
  unsigned long long inlen,
70
- const unsigned char *k);
42
+ const unsigned char *k)
43
+ __attribute__ ((warn_unused_result));
71
44
 
72
45
  SODIUM_EXPORT
73
46
  int crypto_onetimeauth_poly1305_init(crypto_onetimeauth_poly1305_state *state,
@@ -82,6 +55,10 @@ SODIUM_EXPORT
82
55
  int crypto_onetimeauth_poly1305_final(crypto_onetimeauth_poly1305_state *state,
83
56
  unsigned char *out);
84
57
 
58
+ /* ------------------------------------------------------------------------- */
59
+
60
+ int _crypto_onetimeauth_poly1305_pick_best_implementation(void);
61
+
85
62
  #ifdef __cplusplus
86
63
  }
87
64
  #endif
@@ -48,25 +48,29 @@ int crypto_pwhash_scryptsalsa208sha256(unsigned char * const out,
48
48
  unsigned long long passwdlen,
49
49
  const unsigned char * const salt,
50
50
  unsigned long long opslimit,
51
- size_t memlimit);
51
+ size_t memlimit)
52
+ __attribute__ ((warn_unused_result));
52
53
 
53
54
  SODIUM_EXPORT
54
55
  int crypto_pwhash_scryptsalsa208sha256_str(char out[crypto_pwhash_scryptsalsa208sha256_STRBYTES],
55
56
  const char * const passwd,
56
57
  unsigned long long passwdlen,
57
58
  unsigned long long opslimit,
58
- size_t memlimit);
59
+ size_t memlimit)
60
+ __attribute__ ((warn_unused_result));
59
61
 
60
62
  SODIUM_EXPORT
61
63
  int crypto_pwhash_scryptsalsa208sha256_str_verify(const char str[crypto_pwhash_scryptsalsa208sha256_STRBYTES],
62
64
  const char * const passwd,
63
- unsigned long long passwdlen);
65
+ unsigned long long passwdlen)
66
+ __attribute__ ((warn_unused_result));
64
67
 
65
68
  SODIUM_EXPORT
66
69
  int crypto_pwhash_scryptsalsa208sha256_ll(const uint8_t * passwd, size_t passwdlen,
67
70
  const uint8_t * salt, size_t saltlen,
68
71
  uint64_t N, uint32_t r, uint32_t p,
69
- uint8_t * buf, size_t buflen);
72
+ uint8_t * buf, size_t buflen)
73
+ __attribute__ ((warn_unused_result));
70
74
 
71
75
  #ifdef __cplusplus
72
76
  }
@@ -37,7 +37,8 @@ int crypto_secretbox_easy(unsigned char *c, const unsigned char *m,
37
37
  SODIUM_EXPORT
38
38
  int crypto_secretbox_open_easy(unsigned char *m, const unsigned char *c,
39
39
  unsigned long long clen, const unsigned char *n,
40
- const unsigned char *k);
40
+ const unsigned char *k)
41
+ __attribute__ ((warn_unused_result));
41
42
 
42
43
  SODIUM_EXPORT
43
44
  int crypto_secretbox_detached(unsigned char *c, unsigned char *mac,
@@ -52,7 +53,8 @@ int crypto_secretbox_open_detached(unsigned char *m,
52
53
  const unsigned char *mac,
53
54
  unsigned long long clen,
54
55
  const unsigned char *n,
55
- const unsigned char *k);
56
+ const unsigned char *k)
57
+ __attribute__ ((warn_unused_result));
56
58
 
57
59
  /* -- NaCl compatibility interface ; Requires padding -- */
58
60
 
@@ -72,7 +74,9 @@ int crypto_secretbox(unsigned char *c, const unsigned char *m,
72
74
  SODIUM_EXPORT
73
75
  int crypto_secretbox_open(unsigned char *m, const unsigned char *c,
74
76
  unsigned long long clen, const unsigned char *n,
75
- const unsigned char *k);
77
+ const unsigned char *k)
78
+ __attribute__ ((warn_unused_result));
79
+
76
80
  #ifdef __cplusplus
77
81
  }
78
82
  #endif
@@ -55,7 +55,8 @@ int crypto_sign(unsigned char *sm, unsigned long long *smlen_p,
55
55
  SODIUM_EXPORT
56
56
  int crypto_sign_open(unsigned char *m, unsigned long long *mlen_p,
57
57
  const unsigned char *sm, unsigned long long smlen,
58
- const unsigned char *pk);
58
+ const unsigned char *pk)
59
+ __attribute__ ((warn_unused_result));
59
60
 
60
61
  SODIUM_EXPORT
61
62
  int crypto_sign_detached(unsigned char *sig, unsigned long long *siglen_p,
@@ -66,7 +67,9 @@ SODIUM_EXPORT
66
67
  int crypto_sign_verify_detached(const unsigned char *sig,
67
68
  const unsigned char *m,
68
69
  unsigned long long mlen,
69
- const unsigned char *pk);
70
+ const unsigned char *pk)
71
+ __attribute__ ((warn_unused_result));
72
+
70
73
  #ifdef __cplusplus
71
74
  }
72
75
  #endif
@@ -35,7 +35,8 @@ int crypto_sign_ed25519(unsigned char *sm, unsigned long long *smlen_p,
35
35
  SODIUM_EXPORT
36
36
  int crypto_sign_ed25519_open(unsigned char *m, unsigned long long *mlen_p,
37
37
  const unsigned char *sm, unsigned long long smlen,
38
- const unsigned char *pk);
38
+ const unsigned char *pk)
39
+ __attribute__ ((warn_unused_result));
39
40
 
40
41
  SODIUM_EXPORT
41
42
  int crypto_sign_ed25519_detached(unsigned char *sig,
@@ -48,7 +49,8 @@ SODIUM_EXPORT
48
49
  int crypto_sign_ed25519_verify_detached(const unsigned char *sig,
49
50
  const unsigned char *m,
50
51
  unsigned long long mlen,
51
- const unsigned char *pk);
52
+ const unsigned char *pk)
53
+ __attribute__ ((warn_unused_result));
52
54
 
53
55
  SODIUM_EXPORT
54
56
  int crypto_sign_ed25519_keypair(unsigned char *pk, unsigned char *sk);
@@ -59,7 +61,8 @@ int crypto_sign_ed25519_seed_keypair(unsigned char *pk, unsigned char *sk,
59
61
 
60
62
  SODIUM_EXPORT
61
63
  int crypto_sign_ed25519_pk_to_curve25519(unsigned char *curve25519_pk,
62
- const unsigned char *ed25519_pk);
64
+ const unsigned char *ed25519_pk)
65
+ __attribute__ ((warn_unused_result));
63
66
 
64
67
  SODIUM_EXPORT
65
68
  int crypto_sign_ed25519_sk_to_curve25519(unsigned char *curve25519_sk,
@@ -4,11 +4,11 @@
4
4
  /*
5
5
  * WARNING: This construction was a prototype, which should not be used
6
6
  * any more in new projects.
7
- *
7
+ *
8
8
  * crypto_sign_edwards25519sha512batch is provided for applications
9
9
  * initially built with NaCl, but as recommended by the author of this
10
10
  * construction, new applications should use ed25519 instead.
11
- *
11
+ *
12
12
  * In Sodium, you should use the high-level crypto_sign_*() functions instead.
13
13
  */
14
14
 
@@ -24,33 +24,39 @@ extern "C" {
24
24
 
25
25
  #define crypto_sign_edwards25519sha512batch_BYTES 64U
26
26
  SODIUM_EXPORT
27
- size_t crypto_sign_edwards25519sha512batch_bytes(void);
27
+ size_t crypto_sign_edwards25519sha512batch_bytes(void)
28
+ __attribute__ ((deprecated));
28
29
 
29
30
  #define crypto_sign_edwards25519sha512batch_PUBLICKEYBYTES 32U
30
31
  SODIUM_EXPORT
31
- size_t crypto_sign_edwards25519sha512batch_publickeybytes(void);
32
+ size_t crypto_sign_edwards25519sha512batch_publickeybytes(void)
33
+ __attribute__ ((deprecated));
32
34
 
33
35
  #define crypto_sign_edwards25519sha512batch_SECRETKEYBYTES (32U + 32U)
34
36
  SODIUM_EXPORT
35
- size_t crypto_sign_edwards25519sha512batch_secretkeybytes(void);
37
+ size_t crypto_sign_edwards25519sha512batch_secretkeybytes(void)
38
+ __attribute__ ((deprecated));
36
39
 
37
40
  SODIUM_EXPORT
38
41
  int crypto_sign_edwards25519sha512batch(unsigned char *sm,
39
42
  unsigned long long *smlen_p,
40
43
  const unsigned char *m,
41
44
  unsigned long long mlen,
42
- const unsigned char *sk);
45
+ const unsigned char *sk)
46
+ __attribute__ ((deprecated));
43
47
 
44
48
  SODIUM_EXPORT
45
49
  int crypto_sign_edwards25519sha512batch_open(unsigned char *m,
46
50
  unsigned long long *mlen_p,
47
51
  const unsigned char *sm,
48
52
  unsigned long long smlen,
49
- const unsigned char *pk);
53
+ const unsigned char *pk)
54
+ __attribute__ ((deprecated));
50
55
 
51
56
  SODIUM_EXPORT
52
57
  int crypto_sign_edwards25519sha512batch_keypair(unsigned char *pk,
53
- unsigned char *sk);
58
+ unsigned char *sk)
59
+ __attribute__ ((deprecated));
54
60
 
55
61
  #ifdef __cplusplus
56
62
  }