Frank Denis
47f409a0c8
Expose poly1305_context as crypto_onetimeauth_poly1305_state
2014-06-19 18:55:21 -07:00
Frank Denis
3ae2cb5c26
Indent
2014-06-19 18:45:56 -07:00
Frank Denis
b0f798aa66
+ crypto_stream_chacha20_xor_ic() to set the initial value of the block counter
2014-06-19 00:28:02 -07:00
Frank Denis
64154fb9f5
Use RtlGenRandom() instead of CryptGenRandom() on Windows
2014-06-15 22:39:10 -07:00
Frank Denis
bc11c90bf5
Merge branch 'master' of github.com:jedisct1/libsodium
...
* 'master' of github.com:jedisct1/libsodium:
Avoid naming a function select() in order to avoid confusion with select(2)
Comment dead code generated by qhasm
Remove useless access() before open()
Add annotations for Coverity FPs
test/default/sign.c: make the test vectors static
Make crypto_sign() test code more explicit. crypto_sign() doesn't just need the secret key. The public key has to follow. Which is why the test vectors are laid out in this order. But this can confuse static analysis, as well as people looking at the test in order to better understand how crypto_sign() works. So, just copy the sk and the pk into a dedicated buffer, for clarity.
Disable the pwhash_scrypt_ll test that requires 1 Gb RAM. This is way too much for many devices and for VPS users.
2014-06-13 17:17:31 -07:00
Frank Denis
7b7e223d39
Do not allocate more memory than needed in the easy interfaces.
...
And compute m_boxed_len as (ZEROBYTES || message len) to match the way the
documentation describes the output.
2014-06-13 17:15:34 -07:00
Frank Denis
dfade241e7
Avoid naming a function select() in order to avoid confusion with select(2)
2014-06-09 19:29:08 -07:00
Frank Denis
9b3da167fd
Comment dead code generated by qhasm
2014-06-09 19:27:54 -07:00
Frank Denis
3acdfa99a6
Remove useless access() before open()
2014-06-09 19:27:54 -07:00
Frank Denis
befd9c257d
Add annotations for Coverity FPs
2014-06-09 19:27:54 -07:00
Frank Denis
6aacecac60
Rename curve25519/ref10 files to avoid duplicate file names.
...
Sharing code between curve25519 and ed25519 would be way better, but
until then, having distinct file names is required for Cocoapods, and makes
things easier in Visual Studio.
2014-06-06 23:36:27 -07:00
Frank Denis
fee99c1b2e
Remove the ref curve25519 implementation from the tree.
2014-06-06 14:25:04 -07:00
Frank Denis
a0a3741ea3
Replace curve25519 ref implementation with latest ref10 from Supercop.
2014-06-06 08:42:19 -07:00
Frank Denis
6145edc563
Revert "Make curve25519-donna-c64 handle non-canonical points like the ref implementation."
...
This reverts commit bd8cbd3175
.
Conflicts:
src/libsodium/crypto_scalarmult/curve25519/donna_c64/smult_curve25519_donna_c64.c
test/default/scalarmult7.c
test/default/scalarmult8.c
2014-06-06 08:19:49 -07:00
Frank Denis
42b2d5c8e7
Indent
2014-06-03 23:51:51 -07:00
Frank Denis
4c9a993225
Remove useless #include
2014-05-27 08:53:46 -07:00
Frank Denis
eca4b52911
Add extra braces for int128 initializers
2014-05-27 08:53:10 -07:00
Frank Denis
9981651750
aes128ctr: use an union to avoid breaking aliasing rules.
2014-05-26 15:36:16 -07:00
Frank Denis
c712feaae3
Avoid redefinition of be32enc() on NetBSD.
2014-05-26 00:12:02 -07:00
Jan Varho
9f52b0f0e9
Change crypto_box_seed_keypair to use SHA-512 of the seed
...
This makes it compatible with what js-nacl and racl do.
2014-05-25 19:13:04 -07:00
Jan Varho
c565993885
Add crypto_box_seed_keypair like crypto_sign_seed_keypair
...
Uses sk = seed.
2014-05-23 10:25:45 +03:00
Frank Denis
5f847cb76c
Do not violate strict aliasing in int128_aes128ctr.c
2014-05-20 19:41:43 -07:00
Frank Denis
7da592b730
Use uint64_t for 64-bit types instead of unsigned long long
2014-05-20 19:35:16 -07:00
Frank Denis
a992ac5252
Expose low-level scryptsalsa208sha256()
2014-05-18 23:48:02 -07:00
Frank Denis
ddb48d3b1a
Install sodium/crypto_stream_chacha20.h
2014-05-15 21:14:36 -07:00
Frank Denis
7381983f8b
Preliminary chacha20 support
2014-05-15 13:27:15 -07:00
Frank Denis
a15eca1e4d
Compatibility macros for crypto_pwhash_scryptsalsa208sha256
2014-05-15 00:53:57 -07:00
Frank Denis
ee6412080c
Add temporary compat layer for scryptsalsa208sha256 transition
2014-05-15 00:09:15 -07:00
Frank Denis
bd05b7d292
Rename scryptxsalsa208sha256 to scryptsalsa208sha256
2014-05-15 00:01:16 -07:00
Frank Denis
184193d1c5
Kill implementation-specific macros
2014-05-13 13:47:13 -07:00
Frank Denis
f25d7aa4f1
Add an extra static assertion
2014-05-13 10:41:55 -07:00
Frank Denis
1e0eafc541
Fix inverted sse2/sse3 detection
2014-05-13 00:44:29 -07:00
Frank Denis
3026bd69f9
Disable old compatibility layer
2014-05-13 00:20:07 -07:00
Frank Denis
cdd79653f3
Remove unused macros
2014-05-13 00:01:58 -07:00
Frank Denis
291d4998be
Define crypto_*_primitive() for high-level functions only
2014-05-13 00:00:03 -07:00
Frank Denis
91d17f6be1
<stddef.h> is required in crypto_hash.h
2014-05-12 23:45:49 -07:00
Frank Denis
df427966e2
Move macro definitions close to their related function definition
2014-05-12 23:44:04 -07:00
Frank Denis
84cceed1f6
Do not require crypto_sign_BYTES extra bytes for the message in crypto_sign_open()
...
This is a common source of confusion.
2014-05-12 22:54:05 -07:00
Frank Denis
37ed9bada9
Name parameters in all prototypes.
2014-05-12 22:04:03 -07:00
Frank Denis
30c1e13f2a
Switch opslimit and memlimit in pwhash, to be closer to PHC's proposed API.
2014-05-12 12:34:41 -07:00
Frank Denis
96ea56a471
Rename cpu_features global to _cpu_features
2014-05-12 10:30:52 -07:00
Frank Denis
fb99b23ef4
Make aes256 tables static
2014-05-12 10:26:20 -07:00
Frank Denis
aefd4667c5
Remove crypto_generichash_blake2b -> crypto_generichash_blake2b_ref macro
2014-05-12 10:18:33 -07:00
Frank Denis
5940f6794c
Match crypto_generichash_blake2b_{saltbytes/personalbytes} with prototypes.
2014-05-12 10:15:16 -07:00
Frank Denis
a0158e97da
Merge remote-tracking branch 'evoskuil/master'
...
* evoskuil/master:
Update VS2010/2012 import props to match 2013.
Update NuGet packaging.
Modify VS props config for easy variation of output locations and messages.
Use explicitly Unicode Win32 APIs.
Update Visual Studio projects and packaging.
2014-05-11 09:18:17 -07:00
evoskuil
4ab3d21529
Use explicitly Unicode Win32 APIs.
2014-05-10 19:28:24 -07:00
Frank Denis
244158ab2e
pwhash: return a zeroed output buffer on error paths.
2014-05-10 01:25:07 -07:00
Frank Denis
4ea26f0b8c
Stricter autoconf checks for MMX/SSE2/SSE3
2014-05-09 22:01:15 -07:00
Frank Denis
be3c786e23
smult_curve25519_donna_c64.c assumes little-endian.
2014-05-09 18:41:39 -07:00
Frank Denis
8631fe9d1a
Avoid unaligned access in smult_curve25519_donna_c64.c if required
2014-05-09 18:39:14 -07:00
Frank Denis
23aac61bd0
Fix indentation
2014-05-09 18:27:24 -07:00
Frank Denis
5ee582509e
Do not check for __STDC_VERSION__ any more to use memset_s()
2014-05-09 13:24:36 -07:00
Frank Denis
bfeec26358
Use explicit_bzero if available
2014-05-09 13:06:39 -07:00
Frank Denis
290632a193
Use memset_s() only if compiling in C11 mode.
2014-05-09 11:11:48 -07:00
Frank Denis
af2246881d
Avoid unknown pragma on !__GCC__
2014-05-08 21:44:57 -07:00
Frank Denis
b2c5deccdd
Pretend Visual Studio has <emmintrin.h>
2014-05-08 20:26:45 -07:00
Frank Denis
4ebbd0d992
Just use escrypt_kdf_nosse if SSE2 is not available.
2014-05-08 20:18:32 -07:00
Frank Denis
2dc7038b58
Try to keep file names unique, it makes things easier with Visual Studio
2014-05-08 20:07:03 -07:00
Frank Denis
28d36d5207
Add memory locking to crypto_box_easy
2014-05-08 15:11:54 -07:00
Frank Denis
8a8463e4ac
Plug memory leak on error path in the easy interfaces
2014-05-08 15:06:28 -07:00
Frank Denis
fda08703fc
salsa20/ref: zero sensitive data before returning
2014-05-08 11:12:04 -07:00
Jan Varho
3785fc5cd5
Check r and p against zero before dividing
2014-05-08 12:48:56 +03:00
Frank Denis
dabd8fe426
<stdint.h> is not needed in crypto_pwhash_scryptxsalsa208sha256.h
2014-05-08 00:07:52 -07:00
Frank Denis
9b3219428e
Reformat prototype, for consistency.
2014-05-08 00:06:06 -07:00
Frank Denis
ee20da2cd7
Make it clear that crypto_sign_SECRETKEYBYTES actually stands for 2 * 32
2014-05-07 23:23:39 -07:00
Frank Denis
dcf8869229
Sync salsa20/ref with supercop-20140425
...
But these changes may be reverted unless there is a solid reason for
adding these copies to the stack.
2014-05-07 21:39:43 -07:00
Frank Denis
c81c5c1010
Sync stream_salsa20_amd64_xmm6.S with SUPERCOP 2014-04-25
2014-05-07 21:16:19 -07:00
Frank Denis
353f296429
Bring changes from SUPERCOP 2014-04-25 to ed25519/ref10
2014-05-07 21:01:31 -07:00
Frank Denis
e7488dec44
Add crypto_pwhash_scryptxsalsa208sha256_str_verify()
2014-05-07 19:35:05 -07:00
Frank Denis
fa05d907bf
All the crypto_pwhash_* macros do not need to be exposed.
2014-05-07 15:30:04 -07:00
Frank Denis
4ef1a332d1
Add crypto_pwhash_scryptxsalsa208sha256_str()
2014-05-07 15:14:12 -07:00
Frank Denis
a234e505f9
Saving %rbx may actually be required depending on the memory model.
2014-05-07 09:13:34 -07:00
Frank Denis
95d9a625db
pwhash_scrypt(): do not allow outlen to be > SIZE_MAX
2014-05-07 00:27:18 -07:00
Frank Denis
2702aa1a24
Remove crypto_pwhash_scryptxsalsa208sha256_BYTES, support any output length.
...
A _BYTES macro will be more useful for the crypt()-like interface.
2014-05-07 00:24:58 -07:00
Frank Denis
d1a1afb6e9
zeroing the on-stack output in escrypt_r() doesn't hurt.
2014-05-07 00:12:10 -07:00
Frank Denis
688e724dfb
Reindent
2014-05-07 00:08:47 -07:00
Frank Denis
19da370866
Reindent crypto_scrypt-common.c
2014-05-07 00:01:20 -07:00
Frank Denis
7775a34c97
Add crypto_pwhash_scryptxsalsa208sha256() + output/salt len macros/functions.
2014-05-06 23:50:46 -07:00
Frank Denis
a30f364ce1
Have sodium_munlock() zero the buffer before unlocking it.
2014-05-06 09:18:31 -07:00
Frank Denis
b4e98c0253
Ensure that /dev/urandom is a char device.
2014-05-05 14:39:38 -07:00
Pieter Hintjens
94e9981357
Problem: utils.h not installed
...
Missing backslash in Makefile.am meant utils.h wasn't installed.
2014-05-03 08:37:50 +02:00
Frank Denis
f8c49ac54f
cpuid is not going to change more than ebx, even on x86_64
2014-05-02 21:16:32 -07:00
Frank Denis
f601e6e471
Preserve (e|r)bx register when calling cpuid
2014-05-02 20:39:51 -07:00
Frank Denis
b1c79463e0
Do not forget extern "C" wrappers.
2014-05-02 17:21:44 -07:00
Frank Denis
cb4f3e4f06
Use SSE2 or portable scrypt implementation according to what the CPU supports.
2014-05-02 15:20:34 -07:00
Frank Denis
42e4ebe3e3
autoconf uses HAVE_*, but runtime_have_* sounds really awkward
2014-05-02 14:48:12 -07:00
Frank Denis
cb8544715b
Check for SSE2/SSE3/NEON support at runtime.
2014-05-02 14:40:39 -07:00
Frank Denis
3cefff9e52
Goodbye poly1305-53 and its genius fp wizardry.
2014-05-01 21:51:02 -07:00
Frank Denis
ada7ebdf5d
Get ready to say goodbye to the infamous poly1305-53 implementation.
...
Give room for optimized implementations instead.
2014-05-01 21:42:45 -07:00
Frank Denis
840b0f243d
glibc requires #pragma GCC target("sse2") to use SSE2 instructions
2014-05-01 13:55:09 -07:00
Frank Denis
40b9d0fdc7
Fix mlock()/munlock() return value on Windows
2014-04-27 09:19:50 -07:00
Frank Denis
3cbff15e59
Expose size_t crypto_shorthash_siphash24_keybytes(void);
2014-04-26 16:39:43 -07:00
Frank Denis
2e0497afa6
<limits.h> is required for SIZE_MAX. Fixes Android build.
2014-04-24 23:05:16 -07:00
Frank Denis
8c2e0189ab
Do not compile sse/pwhash_scryptxsalsa208sha256.c unless emmintrin.h is available.
2014-04-20 09:06:07 -07:00
Frank Denis
62d78ec154
Pointers for sodium_m[un]lock() do not have to be const
2014-04-17 22:10:18 -07:00
Frank Denis
b5589d1855
<errno.h> is required in scrypt_platform.h
2014-04-17 22:06:32 -07:00
Frank Denis
7b07e38c66
Add sodium_mlock() and sodium_munlock()
2014-04-16 18:18:44 -07:00
Frank Denis
f288d11910
Don't use compile-time assertions with sizeof(dynamic length).
2014-04-15 20:16:23 -07:00
Frank Denis
17f8953d3a
size -> len, for consistency
2014-04-15 00:42:29 -07:00
Frank Denis
219db714cf
Add sodium_hex2bin()
2014-04-15 00:39:14 -07:00
Frank Denis
aec630132c
Slightly rename args in sodium_bin2hex() for consistency
2014-04-15 00:21:26 -07:00
Frank Denis
99cf33bc8f
Indent
2014-04-14 22:33:46 -07:00
Frank Denis
7a85ec9789
Directly use OpenBSD's arc4random() instead of opening /dev/urandom.
2014-04-14 22:01:10 -07:00
Frank Denis
c7c4f95655
Indentation
2014-04-14 21:38:41 -07:00
Frank Denis
9f5a7ce70a
hardcoded size -> sizeof
2014-04-14 21:37:42 -07:00
Frank Denis
99970e2411
Remove useless #define
2014-04-14 21:18:41 -07:00
Frank Denis
665859e302
Since auth_hmac_sha512256 is just truncated hmac_sha512, expose hmac_sha512
2014-04-14 21:14:59 -07:00
Frank Denis
2483af0384
Make hash_sha512 / hmac_sha512256 consistent with hash_sha256 / hmac_sha256
2014-04-14 20:42:37 -07:00
Frank Denis
7791007caf
Remove non-threadsafe versions of the crypt(3)-like interface to scrypt.
2014-04-12 00:54:37 -07:00
Frank Denis
d3605bf4c3
Stored values that are never read are very likely to get optimized out.
2014-04-10 23:36:28 -07:00
Frank Denis
c9b87029c1
crypto_hash_sha256_update() cannot fail
2014-04-10 23:20:15 -07:00
Frank Denis
479620bbd1
Explicitly make crypto_hashblocks_sha512.h private.
2014-04-10 23:12:28 -07:00
Frank Denis
a62af8a4e3
Remove useless define
2014-04-10 23:12:28 -07:00
Frank Denis
ca6a52e413
Do not export crypto_hashblocks*
2014-04-10 23:12:28 -07:00
Frank Denis
175bcccee1
Remove unnecessary cast
2014-04-10 23:12:28 -07:00
Frank Denis
3d666ce901
Remove hashblocks_sha256
2014-04-10 23:12:28 -07:00
Frank Denis
96e8d255b6
Remove hashblocks*.h and sign_edwards25519sha512batch.h from sodium.h
2014-04-10 23:12:28 -07:00
Frank Denis
030fac65a8
Remove wrappers
2014-04-10 23:12:28 -07:00
Frank Denis
a2fc728956
Let crypto_pwhash_scryptxsalsa208sha256 use crypto_auth_hmacsha256
2014-04-10 23:12:27 -07:00
Frank Denis
9fa62b38a4
Move crypto_hash_sha256_state to the crypto_hash_sha256.h header file
2014-04-10 23:12:27 -07:00
Frank Denis
6c42962b57
Use cp sha256
2014-04-10 23:12:27 -07:00
Frank Denis
1d8109c4d6
hash_sha256: ref -> cp
2014-04-10 23:12:27 -07:00
Frank Denis
23e5b13b00
Indentation
2014-04-10 23:12:27 -07:00
Frank Denis
9b151f4efe
We don't need sysendian.h
2014-04-10 23:12:27 -07:00
Frank Denis
350771b9d4
Replace hmac_sha256 implementation with scrypt's
2014-04-10 23:12:21 -07:00
Frank Denis
4f31e143ca
scrypt fixes
2014-04-10 18:25:16 -07:00
Frank Denis
a06b00ecf4
Initial import of scrypt
2014-04-10 18:25:16 -07:00
Frank Denis
8fc8d2f380
A DWORD is the maximum CryptGenRandom() can support.
2014-04-09 19:07:41 -07:00
Frank Denis
433ba6be9e
Merge branch 'master' of github.com:jedisct1/libsodium
...
* 'master' of github.com:jedisct1/libsodium:
Add explicit uint8_t casts for Blake2's key length. via @evoskuil
2014-04-09 19:03:37 -07:00
Frank Denis
b35929d3b1
Do not remove previously generated files from the distribution.
2014-04-09 19:03:15 -07:00
Frank Denis
fcf228e2e7
Add explicit uint8_t casts for Blake2's key length.
...
via @evoskuil
2014-04-09 18:45:59 -07:00
Frank Denis
c7eecc28ba
Include crypto_verify_64.h in sodium.h
2014-04-08 14:19:41 -07:00
Frank Denis
8dafe380c6
De-doxygenize crypto_verify_64.h in this branch.
2014-04-08 14:15:09 -07:00
Frank Denis
d9d29efd6a
+crypto_verify64
2014-04-08 14:11:58 -07:00
Frank Denis
9c33a54e89
Nothing requires <poll.h> in randombytes_sysrandom.c
2014-03-06 21:39:05 -08:00
Frank Denis
9f2e0ba803
Use memset_s() if available
2014-03-02 19:05:14 -08:00
Frank Denis
639a92ebe7
Add crypto_hash_primitive()
2014-02-23 20:24:59 -08:00
Frank Denis
afcba42802
Save and restore errno when opening the random device.
2014-02-09 09:48:43 -08:00
Frank Denis
28b3f2ab0e
^ is not a good way to check for all zeros :) Spotted by sneves@
2014-01-26 16:47:55 -08:00
Frank Denis
49114ee2f5
Reorder vars
2014-01-24 09:41:19 -08:00
Frank Denis
bd4aacf078
crypto_sign_ed25519_open(): Check that the public key is not all zeroes.
...
Reported by Mikkel Fahnøe Jørgensen via nightcracker@
2014-01-24 09:36:21 -08:00
Frank Denis
e8509072a9
Add an easy interface to secretbox
2013-12-31 18:37:36 +01:00
Frank Denis
c57b3c58b3
C++ compat
2013-12-31 18:37:36 +01:00
Frank Denis
02ec147a00
Add a crypto_box easy interface
2013-12-31 18:37:36 +01:00
Frank Denis
41e66896c8
Disable long long warnings when compiled with an old g++ version.
2013-12-31 15:20:02 +01:00
Frank Denis
9a88b1ed74
Add .type @function to export function names in asm implementations (ELF only)
...
via NeoRaider@
2013-12-26 12:14:46 +01:00
Frank Denis
d3c949bafa
Remove ASM version of endian conversion helpers (in portable-jane.h) on PPC
...
This seems to be causing issues on ppc64 when compiling with optimizations.
2013-12-18 14:37:34 -08:00
Frank Denis
2994aebafb
Remove unused macro
2013-12-11 20:27:42 -08:00
Frank Denis
bf72ee931e
Make crypto_scalarmult_curve25519.h architecture-independent
2013-12-11 20:17:09 -08:00
Frank Denis
5133638024
Make crypto_stream_salsa20.h architecture-independent.
...
Move implementation-specific functions to compat.c
2013-12-11 19:45:11 -08:00
Frank Denis
5ad45ee98c
Move Doxygen API doc to its own branch until it is complete.
2013-12-09 18:04:05 -08:00
Frank Denis
d0793255a3
innvocation -> invocation
2013-12-09 16:56:33 -08:00
Frank Denis
71fb3e3dda
Remove trailing spaces
2013-12-09 16:55:44 -08:00
Frank Denis
149ce5b377
Lenght -> Length
2013-12-09 16:54:06 -08:00
Frank Denis
6eb2c2a284
sodium/version.h.in: fix pasto
2013-12-09 16:19:45 -08:00
Jan de Muijnck-Hughes
5a753ba908
Added api documentation.
...
The outward facing api has been documented where possible. If the
documentation has not been added a `@todo` annotations has been
added. Doxygen will constuct a list of TODO's automatically.
2013-12-08 15:58:03 +00:00
Frank Denis
08755e04e1
Support randombytes() with size == 0, but don't force implementations to support it
2013-11-21 23:22:45 -08:00
Frank Denis
f553bb4bf2
aes256-ctr: do not left shift more than 16 bits on a signed int.
...
Spotted by John Regehr and clang -fsigned-integer-overflow
2013-11-12 09:47:36 -08:00
Frank Denis
5a566c041c
We can't enforce 64-bit alignment of aes256 context w/ the current interface
2013-11-12 09:41:23 -08:00
Frank Denis
f47b7cdb58
Rename crypto_generichash_blake2b_init2()
2013-11-11 23:18:34 -08:00
Frank Denis
e43cf109a7
Add crypto_secretbox_macbytes()
2013-11-11 20:07:14 -08:00
Frank Denis
1f405ef7f2
void * casts for c++ compat
2013-11-05 22:30:39 -08:00
Frank Denis
6745db7a0b
Add blake2b_salt_personal()
2013-11-05 22:28:33 -08:00
Frank Denis
e9c46aef5f
Add support for salt & personalization to Blake2.
...
This API might change. I'm not a big fan of what we have now.
2013-11-05 21:46:19 -08:00
Frank Denis
a586df583a
Use blake2b_init() *or* blake2b_init_key(). Calling both is not needed.
2013-11-05 21:00:04 -08:00
Frank Denis
1ca05f6b16
Have sodium_memcmp(a,b,s) return -1 if a != b, document return value.
2013-10-30 06:47:13 -07:00
Frank Denis
82046cbd5e
Face it, /dev/arandom was removed from OpenBSD a loooooong time ago.
2013-10-28 10:59:51 -07:00
Frank Denis
afb89c7e16
Some systems have arc4random() but not arc4random_buf()
2013-10-22 02:54:45 -07:00
Frank Denis
af28f8f2cd
Export stream_salsa20 constants
2013-10-21 22:03:37 -07:00
Frank Denis
e10a84350f
Keep crypto_stream_salsa* constants close to their wrappers
2013-10-21 21:51:59 -07:00
Frank Denis
415b50d56b
Package crypto_scalarmult/curve25519/scalarmult_curve25519_api.c
2013-10-21 21:44:03 -07:00
Frank Denis
a5834e1e25
Use arc4random() if available in onetimeauth_poly1305_try.c
2013-10-21 21:11:06 -07:00
Frank Denis
696934b123
_sodium_alignedcalloc(): use arc4random_buf() if available
2013-10-21 21:07:39 -07:00
Frank Denis
f9aff06dc0
Remove all use of booleans. Because MSVC < 2013. Sigh.
2013-10-21 17:49:48 -07:00
Frank Denis
afa49d340c
Add stdbool.h for old MSVC.
2013-10-14 17:15:50 -07:00
Frank Denis
81321c8809
Define _SODIUM_C99 as empty on retarded compilers, not only when using C++
2013-10-14 16:45:02 -07:00
Frank Denis
fcf4b21149
sha256 IV should be unsigned chars.
2013-10-14 13:43:12 -07:00
Frank Denis
8fa91a91ab
Cast CryptGenRandom pointer to (BYTE *) to make MSVC happy when compiling as a C++ project
2013-10-14 13:40:54 -07:00
Frank Denis
6df6be8911
Remove some unneeded includes
2013-10-14 13:38:36 -07:00
Frank Denis
64729711c4
Merge branch 'master' of github.com:jedisct1/libsodium
...
* 'master' of github.com:jedisct1/libsodium:
Fixed sodium.h install
2013-10-13 12:50:00 -07:00
Frank Denis
bd8cbd3175
Make curve25519-donna-c64 handle non-canonical points like the ref implementation.
2013-10-13 12:49:15 -07:00
xantares
c6cd95f716
Fixed sodium.h install
2013-10-12 23:46:37 +02:00
xantares
5f5c82aa2f
Fixed headers install
2013-10-10 23:03:07 +02:00
xantares
8d0942d5b1
Do not include configured headers
2013-10-09 20:57:32 +02:00
xantares
e2a30a859d
Fixed libsodium.def dependency
2013-10-09 19:22:23 +02:00
Frank Denis
9599289ae0
Use HAVE_TI_MODE in portable-jane.h to use (or not) int128_t
2013-10-08 13:10:16 -07:00
Frank Denis
5ae6712192
More C89 compat
2013-10-07 19:58:06 -07:00
Frank Denis
1e4157ad19
blake2b: use only pre-C99 style declarations.
2013-10-07 19:46:32 -07:00
Frank Denis
82c7b125af
Define an empty SODIUM_EXPORT if SODIUM_STATIC is defined.
2013-10-07 19:32:58 -07:00
Frank Denis
8fbbb98847
Be consistent, keep macros and related functions next to each other.
2013-10-05 14:11:57 -07:00
Frank Denis
5e4e3c9ecf
Add an empty line. Yeah, that's a fantastic commit.
2013-10-05 14:08:03 -07:00
Frank Denis
8effa1ea88
Export scalarmult_curve25519 constants
2013-10-05 14:06:09 -07:00
Frank Denis
71489f447a
Make MSVC parser not panic when it parses a long literal.
...
Just use the scientific notation instead.
Found by @sneves, thanks!
2013-10-04 14:48:33 -07:00
Frank Denis
32a8591985
Fix randombytes_salsa20_random.c for MSVC
2013-09-24 14:20:52 -07:00
Frank Denis
26d108d468
MSVC fixes for randombytes_sysrandom.c
2013-09-24 14:09:26 -07:00
Frank Denis
ad49d05a8b
Match randombytes() prototype with declaration.
2013-09-24 14:06:26 -07:00
Frank Denis
18015e71e2
randombytes_stir() returns void
2013-09-24 14:05:34 -07:00
Frank Denis
02bb86d18b
MSVC/portable-jane.h: don't redefine _CRT_SECURE_NO_WARNINGS
2013-09-24 13:42:23 -07:00
Frank Denis
8086d6f696
blake2: remove more declarations in for() for MSVC
2013-09-24 13:38:02 -07:00
Frank Denis
14809c12c4
MSVC doesn't like a definition in a for() loop.
2013-09-24 13:28:31 -07:00