rbnacl-libsodium 0.6.1 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (89) 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/AUTHORS +0 -3
  5. data/vendor/libsodium/ChangeLog +24 -0
  6. data/vendor/libsodium/THANKS +2 -0
  7. data/vendor/libsodium/autom4te.cache/output.1 +35 -147
  8. data/vendor/libsodium/autom4te.cache/output.3 +35 -147
  9. data/vendor/libsodium/autom4te.cache/requests +127 -127
  10. data/vendor/libsodium/autom4te.cache/traces.1 +244 -254
  11. data/vendor/libsodium/autom4te.cache/traces.3 +111 -113
  12. data/vendor/libsodium/builds/msvc/properties/Common.props +3 -1
  13. data/vendor/libsodium/builds/msvc/properties/Release.props +1 -3
  14. data/vendor/libsodium/builds/msvc/version.h +3 -3
  15. data/vendor/libsodium/builds/msvc/vs2010/libsodium/libsodium.vcxproj +1 -11
  16. data/vendor/libsodium/builds/msvc/vs2010/libsodium/libsodium.vcxproj.filters +1 -37
  17. data/vendor/libsodium/builds/msvc/vs2010/test/test.vcxproj +10 -1
  18. data/vendor/libsodium/builds/msvc/vs2010/test/test.vcxproj.filters +10 -1
  19. data/vendor/libsodium/builds/msvc/vs2012/libsodium/libsodium.vcxproj +1 -11
  20. data/vendor/libsodium/builds/msvc/vs2012/libsodium/libsodium.vcxproj.filters +1 -37
  21. data/vendor/libsodium/builds/msvc/vs2012/test/test.vcxproj +10 -1
  22. data/vendor/libsodium/builds/msvc/vs2012/test/test.vcxproj.filters +10 -1
  23. data/vendor/libsodium/builds/msvc/vs2013/libsodium/libsodium.vcxproj +1 -11
  24. data/vendor/libsodium/builds/msvc/vs2013/libsodium/libsodium.vcxproj.filters +1 -37
  25. data/vendor/libsodium/builds/msvc/vs2013/test/test.vcxproj +10 -1
  26. data/vendor/libsodium/builds/msvc/vs2013/test/test.vcxproj.filters +10 -1
  27. data/vendor/libsodium/configure +33 -145
  28. data/vendor/libsodium/configure.ac +22 -23
  29. data/vendor/libsodium/dist-build/android-build.sh +1 -0
  30. data/vendor/libsodium/dist-build/emscripten.sh +2 -2
  31. data/vendor/libsodium/dist-build/ios.sh +1 -0
  32. data/vendor/libsodium/libsodium.pc.in +1 -1
  33. data/vendor/libsodium/libsodium.vcxproj +1 -5
  34. data/vendor/libsodium/libsodium.vcxproj.filters +1 -13
  35. data/vendor/libsodium/msvc-scripts/process.bat +3 -3
  36. data/vendor/libsodium/msvc-scripts/sodium.props +4 -1
  37. data/vendor/libsodium/src/libsodium/Makefile.am +1 -10
  38. data/vendor/libsodium/src/libsodium/Makefile.in +5 -79
  39. data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha256/cp/verify_hmacsha256.c +3 -1
  40. data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha512/cp/verify_hmacsha512.c +3 -1
  41. data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha512256/cp/verify_hmacsha512256.c +3 -1
  42. data/vendor/libsodium/src/libsodium/crypto_pwhash/scryptsalsa208sha256/pwhash_scryptsalsa208sha256.c +6 -0
  43. data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/ref10/pow225521.h +2 -2
  44. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/keypair.c +46 -3
  45. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/open.c +2 -10
  46. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/sign.c +7 -1
  47. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/sign_ed25519_api.c +18 -0
  48. data/vendor/libsodium/src/libsodium/include/Makefile.am +0 -1
  49. data/vendor/libsodium/src/libsodium/include/Makefile.in +0 -1
  50. data/vendor/libsodium/src/libsodium/include/sodium.h +0 -1
  51. data/vendor/libsodium/src/libsodium/include/sodium/crypto_onetimeauth_poly1305.h +1 -2
  52. data/vendor/libsodium/src/libsodium/include/sodium/crypto_pwhash_scryptsalsa208sha256.h +5 -0
  53. data/vendor/libsodium/src/libsodium/include/sodium/crypto_sign_ed25519.h +15 -0
  54. data/vendor/libsodium/src/libsodium/include/sodium/utils.h +54 -3
  55. data/vendor/libsodium/src/libsodium/randombytes/salsa20/randombytes_salsa20_random.c +22 -7
  56. data/vendor/libsodium/src/libsodium/sodium/core.c +2 -0
  57. data/vendor/libsodium/src/libsodium/sodium/utils.c +305 -31
  58. data/vendor/libsodium/test/default/Makefile.am +18 -16
  59. data/vendor/libsodium/test/default/Makefile.in +141 -76
  60. data/vendor/libsodium/test/default/ed25519_convert.c +48 -0
  61. data/vendor/libsodium/test/default/ed25519_convert.exp +3 -0
  62. data/vendor/libsodium/test/default/sign.c +15 -4
  63. data/vendor/libsodium/test/default/sodium_utils2.c +70 -0
  64. data/vendor/libsodium/test/default/sodium_utils2.exp +3 -0
  65. data/vendor/libsodium/test/default/sodium_utils3.c +55 -0
  66. data/vendor/libsodium/test/default/sodium_utils3.exp +2 -0
  67. metadata +8 -24
  68. data/vendor/libsodium/src/libsodium/crypto_auth/try.c +0 -119
  69. data/vendor/libsodium/src/libsodium/crypto_box/try.c +0 -195
  70. data/vendor/libsodium/src/libsodium/crypto_hash/try.c +0 -76
  71. data/vendor/libsodium/src/libsodium/crypto_scalarmult/try.c +0 -125
  72. data/vendor/libsodium/src/libsodium/crypto_secretbox/try.c +0 -129
  73. data/vendor/libsodium/src/libsodium/crypto_sign/try.c +0 -87
  74. data/vendor/libsodium/src/libsodium/crypto_stream/aes256estream/hongjun/aes-table-be.h +0 -273
  75. data/vendor/libsodium/src/libsodium/crypto_stream/aes256estream/hongjun/aes-table-le.h +0 -274
  76. data/vendor/libsodium/src/libsodium/crypto_stream/aes256estream/hongjun/aes-table.h +0 -62
  77. data/vendor/libsodium/src/libsodium/crypto_stream/aes256estream/hongjun/aes256-ctr.c +0 -239
  78. data/vendor/libsodium/src/libsodium/crypto_stream/aes256estream/hongjun/aes256.h +0 -171
  79. data/vendor/libsodium/src/libsodium/crypto_stream/aes256estream/hongjun/api.h +0 -13
  80. data/vendor/libsodium/src/libsodium/crypto_stream/aes256estream/hongjun/ecrypt-sync.h +0 -27
  81. data/vendor/libsodium/src/libsodium/crypto_stream/aes256estream/stream_aes256estream_api.c +0 -16
  82. data/vendor/libsodium/src/libsodium/crypto_stream/try.c +0 -122
  83. data/vendor/libsodium/src/libsodium/crypto_verify/try.c +0 -76
  84. data/vendor/libsodium/src/libsodium/include/sodium/crypto_stream_aes256estream.h +0 -67
  85. data/vendor/libsodium/src/libsodium/sodium/compat.c +0 -361
  86. data/vendor/libsodium/test/default/stream5.c +0 -29
  87. data/vendor/libsodium/test/default/stream5.exp +0 -1
  88. data/vendor/libsodium/test/default/stream6.c +0 -54
  89. data/vendor/libsodium/test/default/stream6.exp +0 -17
@@ -1,361 +0,0 @@
1
-
2
- #include "crypto_auth_hmacsha256.h"
3
- #include "crypto_auth_hmacsha512256.h"
4
- #include "crypto_box_curve25519xsalsa20poly1305.h"
5
- #include "crypto_hash_sha256.h"
6
- #include "crypto_hash_sha512.h"
7
- #include "crypto_onetimeauth_poly1305.h"
8
- #include "crypto_pwhash_scryptsalsa208sha256.h"
9
- #include "crypto_scalarmult_curve25519.h"
10
- #include "crypto_secretbox_xsalsa20poly1305.h"
11
- #include "crypto_sign_ed25519.h"
12
- #include "crypto_stream_salsa20.h"
13
- #include "crypto_stream_xsalsa20.h"
14
- #include "crypto_verify_16.h"
15
- #include "crypto_verify_32.h"
16
- #include "export.h"
17
-
18
- #ifdef __cplusplus
19
- extern "C" {
20
- #endif
21
-
22
- #undef crypto_pwhash_scryptxsalsa208sha256_saltbytes
23
- SODIUM_EXPORT size_t
24
- crypto_pwhash_scryptxsalsa208sha256_saltbytes(void)
25
- {
26
- return crypto_pwhash_scryptsalsa208sha256_saltbytes();
27
- }
28
-
29
- #undef crypto_pwhash_scryptxsalsa208sha256_strbytes
30
- SODIUM_EXPORT size_t
31
- crypto_pwhash_scryptxsalsa208sha256_strbytes(void)
32
- {
33
- return crypto_pwhash_scryptsalsa208sha256_strbytes();
34
- }
35
-
36
- #undef crypto_pwhash_scryptxsalsa208sha256
37
- SODIUM_EXPORT int
38
- crypto_pwhash_scryptxsalsa208sha256(unsigned char * const out,
39
- unsigned long long outlen,
40
- const char * const passwd,
41
- unsigned long long passwdlen,
42
- const unsigned char * const salt,
43
- unsigned long long opslimit,
44
- size_t memlimit)
45
- {
46
- return crypto_pwhash_scryptsalsa208sha256(out, outlen, passwd, passwdlen,
47
- salt, opslimit, memlimit);
48
- }
49
-
50
- #undef crypto_pwhash_scryptxsalsa208sha256_str
51
- SODIUM_EXPORT int
52
- crypto_pwhash_scryptxsalsa208sha256_str(char out[crypto_pwhash_scryptsalsa208sha256_STRBYTES],
53
- const char * const passwd,
54
- unsigned long long passwdlen,
55
- unsigned long long opslimit,
56
- size_t memlimit)
57
- {
58
- return crypto_pwhash_scryptsalsa208sha256_str(out, passwd, passwdlen,
59
- opslimit, memlimit);
60
- }
61
-
62
- #undef crypto_pwhash_scryptxsalsa208sha256_str_verify
63
- SODIUM_EXPORT int
64
- crypto_pwhash_scryptxsalsa208sha256_str_verify(const char str[crypto_pwhash_scryptsalsa208sha256_STRBYTES],
65
- const char * const passwd,
66
- unsigned long long passwdlen)
67
- {
68
- return crypto_pwhash_scryptsalsa208sha256_str_verify(str,
69
- passwd, passwdlen);
70
- }
71
-
72
- #ifdef EXPORT_ORIGINAL_IMPLEMENTATIONS
73
-
74
- #undef crypto_hash_sha256_ref
75
- SODIUM_EXPORT int
76
- crypto_hash_sha256_ref(unsigned char *out, const unsigned char *in,
77
- unsigned long long inlen)
78
- {
79
- return crypto_hash_sha256(out, in, inlen);
80
- }
81
-
82
- #undef crypto_hash_sha512_ref
83
- SODIUM_EXPORT int
84
- crypto_hash_sha512_ref(unsigned char *out, const unsigned char *in,
85
- unsigned long long inlen)
86
- {
87
- return crypto_hash_sha512(out, in, inlen);
88
- }
89
-
90
- #undef crypto_auth_hmacsha256_ref
91
- SODIUM_EXPORT int
92
- crypto_auth_hmacsha256_ref(unsigned char *out, const unsigned char *in,
93
- unsigned long long inlen, const unsigned char *k)
94
- {
95
- return crypto_auth_hmacsha256(out, in, inlen, k);
96
- }
97
-
98
- #undef crypto_auth_hmacsha256_ref_verify
99
- SODIUM_EXPORT int
100
- crypto_auth_hmacsha256_ref_verify(const unsigned char *h,
101
- const unsigned char *in,
102
- unsigned long long inlen,
103
- const unsigned char *k)
104
- {
105
- return crypto_auth_hmacsha256_verify(h, in, inlen, k);
106
- }
107
-
108
- #undef crypto_auth_hmacsha512256_ref
109
- SODIUM_EXPORT int
110
- crypto_auth_hmacsha512256_ref(unsigned char *out, const unsigned char *in,
111
- unsigned long long inlen, const unsigned char *k)
112
- {
113
- return crypto_auth_hmacsha512256(out, in, inlen, k);
114
- }
115
-
116
- #undef crypto_auth_hmacsha512256_ref_verify
117
- SODIUM_EXPORT int
118
- crypto_auth_hmacsha512256_ref_verify(const unsigned char *h,
119
- const unsigned char *in,
120
- unsigned long long inlen,
121
- const unsigned char *k)
122
- {
123
- return crypto_auth_hmacsha512256_verify(h, in, inlen, k);
124
- }
125
-
126
- #undef crypto_box_curve25519xsalsa20poly1305_ref_keypair
127
- SODIUM_EXPORT int
128
- crypto_box_curve25519xsalsa20poly1305_ref_keypair(unsigned char *pk,
129
- unsigned char *sk)
130
- {
131
- return crypto_box_curve25519xsalsa20poly1305_keypair(pk, sk);
132
- }
133
-
134
- #undef crypto_box_curve25519xsalsa20poly1305_ref_beforenm
135
- SODIUM_EXPORT int
136
- crypto_box_curve25519xsalsa20poly1305_ref_beforenm(unsigned char *k,
137
- const unsigned char *pk,
138
- const unsigned char *sk)
139
- {
140
- return crypto_box_curve25519xsalsa20poly1305_beforenm(k, pk, sk);
141
- }
142
-
143
- #undef crypto_box_curve25519xsalsa20poly1305_ref_afternm
144
- SODIUM_EXPORT int
145
- crypto_box_curve25519xsalsa20poly1305_ref_afternm(unsigned char *c,
146
- const unsigned char *m,
147
- unsigned long long mlen,
148
- const unsigned char *n,
149
- const unsigned char *k)
150
- {
151
- return crypto_box_curve25519xsalsa20poly1305_afternm(c, m, mlen, n, k);
152
- }
153
-
154
- #undef crypto_box_curve25519xsalsa20poly1305_ref_open_afternm
155
- SODIUM_EXPORT int
156
- crypto_box_curve25519xsalsa20poly1305_ref_open_afternm(unsigned char *m,
157
- const unsigned char *c,
158
- unsigned long long clen,
159
- const unsigned char *n,
160
- const unsigned char *k)
161
- {
162
- return crypto_box_curve25519xsalsa20poly1305_open_afternm(m, c, clen, n, k);
163
- }
164
-
165
- #undef crypto_box_curve25519xsalsa20poly1305_ref
166
- SODIUM_EXPORT int
167
- crypto_box_curve25519xsalsa20poly1305_ref(unsigned char *c,
168
- const unsigned char *m,
169
- unsigned long long mlen,
170
- const unsigned char *n,
171
- const unsigned char *pk,
172
- const unsigned char *sk)
173
- {
174
- return crypto_box_curve25519xsalsa20poly1305(c, m, mlen, n, pk, sk);
175
- }
176
-
177
- #undef crypto_box_curve25519xsalsa20poly1305_ref_open
178
- SODIUM_EXPORT int
179
- crypto_box_curve25519xsalsa20poly1305_ref_open(unsigned char *m,
180
- const unsigned char *c,
181
- unsigned long long clen,
182
- const unsigned char *n,
183
- const unsigned char *pk,
184
- const unsigned char *sk)
185
- {
186
- return crypto_box_curve25519xsalsa20poly1305_open(m, c, clen, n, pk, sk);
187
- }
188
-
189
- #undef crypto_scalarmult_curve25519_ref_base
190
- SODIUM_EXPORT int
191
- crypto_scalarmult_curve25519_ref_base(unsigned char *q, const unsigned char *n)
192
- {
193
- return crypto_scalarmult_curve25519_base(q, n);
194
- }
195
-
196
- #undef crypto_scalarmult_curve25519_ref
197
- SODIUM_EXPORT int
198
- crypto_scalarmult_curve25519_ref(unsigned char *q, const unsigned char *n,
199
- const unsigned char *p)
200
- {
201
- return crypto_scalarmult_curve25519(q, n, p);
202
- }
203
-
204
- #undef crypto_scalarmult_curve25519_donna_c64_base
205
- SODIUM_EXPORT int
206
- crypto_scalarmult_curve25519_donna_c64_base(unsigned char *q, const unsigned char *n)
207
- {
208
- return crypto_scalarmult_curve25519_base(q, n);
209
- }
210
-
211
- #undef crypto_scalarmult_curve25519_donna_c64
212
- SODIUM_EXPORT int
213
- crypto_scalarmult_curve25519_donna_c64(unsigned char *q, const unsigned char *n,
214
- const unsigned char *p)
215
- {
216
- return crypto_scalarmult_curve25519(q, n, p);
217
- }
218
-
219
- #undef crypto_secretbox_xsalsa20poly1305_ref
220
- SODIUM_EXPORT int
221
- crypto_secretbox_xsalsa20poly1305_ref(unsigned char *c,
222
- const unsigned char *m,
223
- unsigned long long mlen,
224
- const unsigned char *n,
225
- const unsigned char *k)
226
- {
227
- return crypto_secretbox_xsalsa20poly1305(c, m, mlen, n, k);
228
- }
229
-
230
- #undef crypto_secretbox_xsalsa20poly1305_ref_open
231
- SODIUM_EXPORT int
232
- crypto_secretbox_xsalsa20poly1305_ref_open(unsigned char *m,
233
- const unsigned char *c,
234
- unsigned long long clen,
235
- const unsigned char *n,
236
- const unsigned char *k)
237
- {
238
- return crypto_secretbox_xsalsa20poly1305_open(m, c, clen, n, k);
239
- }
240
-
241
- #undef crypto_sign_ed25519_ref_seed_keypair
242
- SODIUM_EXPORT int
243
- crypto_sign_ed25519_ref_seed_keypair(unsigned char *pk, unsigned char *sk,
244
- const unsigned char *seed)
245
- {
246
- return crypto_sign_ed25519_seed_keypair(pk, sk, seed);
247
- }
248
-
249
- #undef crypto_sign_ed25519_ref_keypair
250
- SODIUM_EXPORT int
251
- crypto_sign_ed25519_ref_keypair(unsigned char *pk, unsigned char *sk)
252
- {
253
- return crypto_sign_ed25519_keypair(pk, sk);
254
- }
255
-
256
- #undef crypto_sign_ed25519_ref
257
- SODIUM_EXPORT int
258
- crypto_sign_ed25519_ref(unsigned char *sm, unsigned long long *smlen,
259
- const unsigned char *m, unsigned long long mlen,
260
- const unsigned char *sk)
261
- {
262
- return crypto_sign_ed25519(sm, smlen, m, mlen, sk);
263
- }
264
-
265
- #undef crypto_sign_ed25519_ref_open
266
- SODIUM_EXPORT int
267
- crypto_sign_ed25519_ref_open(unsigned char *m, unsigned long long *mlen,
268
- const unsigned char *sm, unsigned long long smlen,
269
- const unsigned char *pk)
270
- {
271
- return crypto_sign_ed25519_open(m, mlen, sm, smlen, pk);
272
- }
273
-
274
- #undef crypto_stream_xsalsa20_ref
275
- SODIUM_EXPORT int
276
- crypto_stream_xsalsa20_ref(unsigned char *c, unsigned long long clen,
277
- const unsigned char *n, const unsigned char *k)
278
- {
279
- return crypto_stream_xsalsa20(c, clen, n, k);
280
- }
281
-
282
- #undef crypto_stream_xsalsa20_ref_xor
283
- SODIUM_EXPORT int
284
- crypto_stream_xsalsa20_ref_xor(unsigned char *c, const unsigned char *m,
285
- unsigned long long mlen, const unsigned char *n,
286
- const unsigned char *k)
287
- {
288
- return crypto_stream_xsalsa20_xor(c, m, mlen, n, k);
289
- }
290
-
291
- #undef crypto_verify_16_ref
292
- SODIUM_EXPORT int
293
- crypto_verify_16_ref(const unsigned char *x, const unsigned char *y)
294
- {
295
- return crypto_verify_16(x, y);
296
- }
297
-
298
- #undef crypto_verify_32_ref
299
- SODIUM_EXPORT int
300
- crypto_verify_32_ref(const unsigned char *x, const unsigned char *y)
301
- {
302
- return crypto_verify_32(x, y);
303
- }
304
-
305
- #undef crypto_onetimeauth_poly1305_ref
306
- SODIUM_EXPORT int
307
- crypto_onetimeauth_poly1305_ref(unsigned char *out,
308
- const unsigned char *in,
309
- unsigned long long inlen,
310
- const unsigned char *k)
311
- {
312
- return crypto_onetimeauth_poly1305(out, in, inlen, k);
313
- }
314
-
315
- #undef crypto_stream_salsa20_amd64_xmm6
316
- SODIUM_EXPORT int
317
- crypto_stream_salsa20_amd64_xmm6(unsigned char *c,
318
- unsigned long long clen,
319
- const unsigned char *n,
320
- const unsigned char *k)
321
- {
322
- return crypto_stream_salsa20(c, clen, n, k);
323
- }
324
-
325
- #undef crypto_stream_salsa20_ref
326
- SODIUM_EXPORT int
327
- crypto_stream_salsa20_ref(unsigned char *c,
328
- unsigned long long clen,
329
- const unsigned char *n,
330
- const unsigned char *k)
331
- {
332
- return crypto_stream_salsa20(c, clen, n, k);
333
- }
334
-
335
- #undef crypto_stream_salsa20_amd64_xmm6_xor
336
- SODIUM_EXPORT int
337
- crypto_stream_salsa20_amd64_xmm6_xor(unsigned char *c,
338
- const unsigned char *m,
339
- unsigned long long mlen,
340
- const unsigned char *n,
341
- const unsigned char *k)
342
- {
343
- return crypto_stream_salsa20_xor(c, m, mlen, n, k);
344
- }
345
-
346
- #undef crypto_stream_salsa20_ref_xor
347
- SODIUM_EXPORT int
348
- crypto_stream_salsa20_ref_xor(unsigned char *c,
349
- const unsigned char *m,
350
- unsigned long long mlen,
351
- const unsigned char *n,
352
- const unsigned char *k)
353
- {
354
- return crypto_stream_salsa20_xor(c, m, mlen, n, k);
355
- }
356
-
357
- #endif
358
-
359
- #ifdef __cplusplus
360
- }
361
- #endif
@@ -1,29 +0,0 @@
1
- #include <stdio.h>
2
-
3
- #define TEST_NAME "stream5"
4
- #include "cmptest.h"
5
-
6
- unsigned char firstkey[32] = {
7
- 0x1b,0x27,0x55,0x64,0x73,0xe9,0x85,0xd4
8
- ,0x62,0xcd,0x51,0x19,0x7a,0x9a,0x46,0xc7
9
- ,0x60,0x09,0x54,0x9e,0xac,0x64,0x74,0xf2
10
- ,0x06,0xc4,0xee,0x08,0x44,0xf6,0x83,0x89
11
- } ;
12
-
13
- unsigned char nonce[16] = {
14
- 0x69,0x69,0x6e,0xe9,0x55,0xb6,0x2b,0x73
15
- ,0xcd,0x62,0xbd,0xa8,0x75,0xfc,0x73,0xd6
16
- } ;
17
-
18
- unsigned char output[4194304];
19
-
20
- unsigned char h[32];
21
-
22
- int main(void)
23
- {
24
- int i;
25
- crypto_stream_aes256estream(output,4194304,nonce,firstkey);
26
- crypto_hash_sha256(h,output,sizeof output);
27
- for (i = 0;i < 32;++i) printf("%02x",h[i]); printf("\n");
28
- return 0;
29
- }
@@ -1 +0,0 @@
1
- b5d3f979ab4a760787484b4e0cf7c82db358b06fdf365cc7d456cc91258af618
@@ -1,54 +0,0 @@
1
- #include <stdio.h>
2
-
3
- #define TEST_NAME "stream6"
4
- #include "cmptest.h"
5
-
6
- unsigned char firstkey[32] = {
7
- 0x1b,0x27,0x55,0x64,0x73,0xe9,0x85,0xd4
8
- ,0x62,0xcd,0x51,0x19,0x7a,0x9a,0x46,0xc7
9
- ,0x60,0x09,0x54,0x9e,0xac,0x64,0x74,0xf2
10
- ,0x06,0xc4,0xee,0x08,0x44,0xf6,0x83,0x89
11
- } ;
12
-
13
- unsigned char nonce[16] = {
14
- 0x69,0x69,0x6e,0xe9,0x55,0xb6,0x2b,0x73
15
- ,0xcd,0x62,0xbd,0xa8,0x75,0xfc,0x73,0xd6
16
- } ;
17
-
18
- unsigned char m[163] = {
19
- 0, 0, 0, 0, 0, 0, 0, 0
20
- , 0, 0, 0, 0, 0, 0, 0, 0
21
- , 0, 0, 0, 0, 0, 0, 0, 0
22
- , 0, 0, 0, 0, 0, 0, 0, 0
23
- ,0xbe,0x07,0x5f,0xc5,0x3c,0x81,0xf2,0xd5
24
- ,0xcf,0x14,0x13,0x16,0xeb,0xeb,0x0c,0x7b
25
- ,0x52,0x28,0xc5,0x2a,0x4c,0x62,0xcb,0xd4
26
- ,0x4b,0x66,0x84,0x9b,0x64,0x24,0x4f,0xfc
27
- ,0xe5,0xec,0xba,0xaf,0x33,0xbd,0x75,0x1a
28
- ,0x1a,0xc7,0x28,0xd4,0x5e,0x6c,0x61,0x29
29
- ,0x6c,0xdc,0x3c,0x01,0x23,0x35,0x61,0xf4
30
- ,0x1d,0xb6,0x6c,0xce,0x31,0x4a,0xdb,0x31
31
- ,0x0e,0x3b,0xe8,0x25,0x0c,0x46,0xf0,0x6d
32
- ,0xce,0xea,0x3a,0x7f,0xa1,0x34,0x80,0x57
33
- ,0xe2,0xf6,0x55,0x6a,0xd6,0xb1,0x31,0x8a
34
- ,0x02,0x4a,0x83,0x8f,0x21,0xaf,0x1f,0xde
35
- ,0x04,0x89,0x77,0xeb,0x48,0xf5,0x9f,0xfd
36
- ,0x49,0x24,0xca,0x1c,0x60,0x90,0x2e,0x52
37
- ,0xf0,0xa0,0x89,0xbc,0x76,0x89,0x70,0x40
38
- ,0xe0,0x82,0xf9,0x37,0x76,0x38,0x48,0x64
39
- ,0x5e,0x07,0x05
40
- } ;
41
-
42
- unsigned char c[163];
43
-
44
- int main(void)
45
- {
46
- int i;
47
- crypto_stream_aes256estream_xor(c,m,163,nonce,firstkey);
48
- for (i = 32;i < 163;++i) {
49
- printf(",0x%02x",(unsigned int) c[i]);
50
- if (i % 8 == 7) printf("\n");
51
- }
52
- printf("\n");
53
- return 0;
54
- }
@@ -1,17 +0,0 @@
1
- ,0x04,0x1d,0x9f,0xb0,0x61,0x23,0xe3,0x37
2
- ,0x05,0xbb,0x0a,0xfe,0x81,0xc6,0x63,0x87
3
- ,0xd0,0x61,0x26,0xd8,0xd7,0x18,0x97,0x66
4
- ,0xc6,0x15,0xf3,0x46,0x58,0x7d,0xdc,0x0a
5
- ,0x68,0xdd,0xc0,0xaa,0x44,0x80,0xc5,0xa2
6
- ,0x1c,0xea,0x1f,0xfa,0x17,0xfe,0xe0,0xd1
7
- ,0x00,0x0f,0x8f,0x70,0x0c,0xd2,0x9e,0xe1
8
- ,0x00,0x88,0xdf,0xfa,0xf8,0xbd,0x07,0x62
9
- ,0xbf,0xfd,0x81,0xa8,0x84,0x30,0x39,0x01
10
- ,0x85,0x08,0x8d,0x66,0x5d,0x96,0x20,0x14
11
- ,0xa0,0x5a,0xa4,0xe8,0xd2,0x07,0x4f,0x47
12
- ,0x0c,0x2b,0xbc,0x9b,0xd1,0x11,0x85,0xda
13
- ,0x71,0xc3,0x59,0x5c,0xd9,0x27,0x64,0x89
14
- ,0xf2,0x2d,0xa7,0x10,0x80,0xdf,0xbb,0x0f
15
- ,0x32,0xb9,0x9a,0x07,0x66,0x6c,0x7c,0x41
16
- ,0xf6,0x78,0x71,0xf7,0x8d,0x69,0xb9,0xb1
17
- ,0x79,0x8e,0xe3