Frank Denis
12a3f27706
More tests for constants
2014-09-13 14:37:04 -07:00
Frank Denis
2c1b507045
More constant tests
2014-09-13 14:29:59 -07:00
Frank Denis
ab37bd3e0b
Tests: no need for crypto_uint8
2014-09-13 14:15:55 -07:00
Frank Denis
b7b0436fb8
Test the presence of some extra functions
2014-09-13 14:12:40 -07:00
Frank Denis
4d276a81e7
Include header files commonly used by the tests to cmptest.h
2014-09-13 14:11:12 -07:00
Frank Denis
3b680e0a52
Use high-level APIs in tests
2014-09-13 13:56:41 -07:00
Frank Denis
21a5e5accb
Let Travis check --enable-minimal builds
2014-09-13 13:24:41 -07:00
Frank Denis
7dde13e1b4
Sync Blake2s changes with Blake2b
...
Note: Blake2s code is not compiled yet
2014-09-13 13:14:56 -07:00
Frank Denis
a7d38ef15d
Check outlen in blake2b_final
...
Not required in Sodium since the check is already performed in
higher-level functions, but it doesn't hurt either.
2014-09-13 13:09:25 -07:00
Frank Denis
8994dc340f
Blake2 load/store functions must accept unaligned pointers even on LE
2014-09-13 12:59:11 -07:00
Frank Denis
59a207e4ff
__cpuidex() is not really required for now, just use __cpuid()
2014-09-13 12:22:53 -07:00
Frank Denis
a4264a221f
Disable MSVC deprecation warning just for _ftime()
2014-09-13 12:04:00 -07:00
Frank Denis
fe586939f6
_ftime_s() was not available on Windows XP. And people still run XP.
2014-09-13 10:28:46 -07:00
Frank Denis
03b122dd5d
Fix .travis.yml indentation
2014-09-06 13:45:31 -07:00
Frank Denis
c8c2c7a93d
Revert "The C standard says nothing about accesses via lvalue expressions with volatile types"
...
This reverts commit fc1bc0718b
.
2014-09-05 18:27:48 -07:00
Frank Denis
6c0852f22f
Remove unused macros
2014-09-04 13:24:09 -07:00
Frank Denis
fc1bc0718b
The C standard says nothing about accesses via lvalue expressions with volatile types
2014-09-04 13:22:54 -07:00
Frank Denis
86a0884ac2
Merge pull request #186 from khungus/master
...
Update NuGet packaging to 0.7
2014-08-30 15:42:21 -07:00
khungus
89eacfa06c
Update NuGet packaging to 0.7
2014-08-30 16:46:59 -05:00
Frank Denis
ddf56925d6
Thanks to @lvh for the Clojure bindings
2014-08-28 07:42:18 -07:00
Frank Denis
c6ca4c6ef8
randombytes() -> randombytes_buf()
...
Since randombytes() wraps randombytes_buf(), that's one more function
the linker can strip out until it's actually used by the app.
2014-08-27 11:39:45 -07:00
Frank Denis
7c7f1cfacc
Reorder randombytes prototypes; mention that randombytes() is a compat API.
2014-08-27 10:50:49 -07:00
Frank Denis
f241744e4d
Thanks @electricFeel for the Elixir wrapper
2014-08-20 21:00:09 -07:00
Frank Denis
f789f8a05a
Rephrase
2014-08-19 21:13:14 -07:00
Frank Denis
9126ec1804
Update ChangeLog
2014-08-15 17:16:44 -07:00
Frank Denis
6dfada1ebc
Remove unneeded #include
2014-08-15 17:14:04 -07:00
Frank Denis
61449686ee
Version bump
2014-08-15 16:52:01 -07:00
Frank Denis
2997ed2619
Comment out loops not being executed.
2014-08-15 15:15:29 -07:00
Frank Denis
d01e1f4875
On error path, do not set the signature len if a NULL pointer was given.
2014-08-15 15:10:24 -07:00
Frank Denis
6c8df6adad
Remove unused variable
2014-08-15 14:36:52 -07:00
Frank Denis
0e23192159
Add crypto_sign_ed25519_sk_to_seed() and crypto_sign_ed25519_sk_to_pk()
2014-08-15 13:52:08 -07:00
Frank Denis
d3403d1e01
memzero az in crypto_signed_detached. via Stanford SCS.
2014-08-15 13:21:09 -07:00
Frank Denis
2947ea863d
Clear the seed in crypto_sign_keypair() - Reported by the Stanford SCS group.
2014-08-15 12:00:59 -07:00
Frank Denis
473e1718cc
Add sodium_{malloc,allocarray,free}() and sodium_mprotect_*()
...
ptr = sodium_malloc(size) returns a pointer from which exactly "size" bytes
can be accessed.
ptr = sodium_allocarray(count, size) allocates enough storage space for
"count" pointers or scalars of unit size "size".
In both cases, the region is immediately followed by a guard page.
As a result, any attempt to access a memory location after ptr[size - 1] will
immediately trigger a segmentation fault.
The allocated region is mlock()ed and filled with 0xd0 bytes.
A read-only page with the size, a guard page, as well as a canary are
placed before the returned pointer.
The canary is checked by sodium_free(); as a result, altering data right
before ptr is likely to cause sodium_free() to kill the process.
sodium_free() munlock()s the region and fills it with zeros before
actually calling free().
sodium_mprotect_noaccess(), sodium_mprotect_readonly() and
sodium_mprotect_readwrite() can be used to change the protection on the set
of allocated pages.
Reverting the protection to read+write is not required before calling
sodium_free().
2014-08-14 21:41:05 -07:00
Frank Denis
729a54f4a2
Use --enable-minimal in the Android and iOS builds
2014-08-13 23:32:26 -07:00
Frank Denis
6c78c9815c
Remove compat.c
2014-08-13 17:40:06 -07:00
Frank Denis
55bb50b855
Bump major
2014-08-06 10:09:21 -07:00
Frank Denis
88ff698bfb
--llvm-lto 1 produces smaller Javascript code.
...
Also add the symbol map.
2014-08-05 23:24:03 -07:00
Frank Denis
85acbd0020
Do not export low-level functions to Javascript by default
2014-08-05 23:09:39 -07:00
Frank Denis
658ae19e0b
Update the list of symbols exported to Javascript.
2014-08-05 22:23:14 -07:00
Frank Denis
9f0208050e
crypto_sign_SECRETKEYBYTES already includes the public key
2014-08-05 14:26:39 -07:00
Frank Denis
b06951dd20
Zero the nonce in crypto_sign()
2014-08-05 14:08:00 -07:00
Frank Denis
eae4add8de
Implement ed25519 -> curve25519 keys conversion
2014-08-05 13:32:25 -07:00
Frank Denis
7b0eeda1c6
Remove aes256estream.
...
AES-256 will be reintroduced, but not until we have a bitsliced implementation.
2014-08-05 00:57:10 -07:00
Frank Denis
88de46b6ae
Document the maximum number of bytes for crypto_stream_aes256estream*()
...
abort() if these functions are misused.
2014-08-04 20:15:07 -07:00
Frank Denis
ed76b41369
Rephrase
2014-08-04 16:29:13 -07:00
Frank Denis
2b0c8e40aa
Keep IA-32 asm on MingW/Cygwin, check for Windows during the x86-64 test.
2014-08-04 16:24:11 -07:00
Frank Denis
b9be5fbd45
Do not pass -fPIC on Windows. Add msys as a host_os value to detect Windows as well.
2014-08-04 14:30:07 -07:00
Frank Denis
4d02391067
Remove scryptx() compatibility functions
2014-08-03 21:18:06 -07:00
Frank Denis
c5a9d46386
Double check for crypto_auth_verify()
2014-08-03 21:15:04 -07:00