Frank Denis
a894ec93f2
Add crypto_pwhash_str_alg()
2017-08-05 20:56:59 +02:00
Frank Denis
9df008a786
Add some invalid base64 strings to pwhash_str_verify() tests
2017-07-17 23:26:36 +02:00
Frank Denis
5d56821d3d
More tests, and start testing misuse cases
2017-07-17 23:09:44 +02:00
Frank Denis
7cfbb5922b
Dont expect EFBIG to be returned if a requested allocation is too large
...
Some environments return funny things such as "function not implemented",
EINVAL or "permission denied" instead.
So, don't assume anything.
2017-07-12 21:36:33 +02:00
Frank Denis
3e85167657
Fix crypto_pwhash_argon2i_str_verify()
and its tests after errno
changes
2017-05-12 15:09:54 +02:00
Emil Bay
94760400a6
Add crypto_pwhash_MISMATCH errno ( #541 )
...
* Add crypto_pwhash_MISMATCH errno
* Use EINVAL for invalid password
* Only set errno on mismatch
2017-05-12 14:30:26 +02:00
Frank Denis
eb1c92d2ec
Reformat the scrypt tests
2017-02-25 20:59:54 +01:00
Frank Denis
7bbeba5723
Indent
2017-02-23 11:30:21 +01:00
Frank Denis
e0150faf56
Always zero the argon2 output buffer prior to doing anything
...
This is consistent with what we are doing with scrypt.
On error/misuse, the buffer is zeroed; this may prevent bugs with
reused/invalid buffers.
2017-02-19 12:40:28 +01:00
Frank Denis
2e4e1c66a0
Complete 08c0e03f83
2017-02-19 12:23:37 +01:00
Emil Bay
08c0e03f83
WIP: crypto_pwhash constants ( #464 )
...
* Test exposed constraint constants on crypto_pwhash
This includes the following constants for crypto_pwhash, crypto_pwhash_argon2i,
and crypto_pwhash_scryptsalsa208sha256:
- crypto_pwhash_BYTES_MIN
- crypto_pwhash_BYTES_MAX
- crypto_pwhash_PASSWD_MIN
- crypto_pwhash_PASSWD_MAX
- crypto_pwhash_OPSLIMIT_MIN
- crypto_pwhash_OPSLIMIT_MAX
- crypto_pwhash_MEMLIMIT_MIN
- crypto_pwhash_MEMLIMIT_MAX
* Expose constraint constants for crypto_pwhash
* Expose constant methods for crypto_pwhash
2017-02-19 11:19:01 +01:00
Frank Denis
d7f5877df5
Add crypto_pwhash_argon2i_ALG_ARGON2I13
2016-04-01 20:48:34 +02:00
Frank Denis
384e08b7f4
Require an algorithm identifier in crypto_pwhash()
2016-04-01 20:29:28 +02:00
Frank Denis
1f1d3f70b9
More Argon2 tests
2016-03-25 15:45:50 +01:00
Frank Denis
fb865c9a5c
More tests / lcov exclusions
2016-03-25 15:36:57 +01:00
Frank Denis
a25569320c
The version in Argon2i strings is separated from other parameters
2016-03-25 12:27:04 +01:00
Frank Denis
346f8c131e
More tests
2016-03-24 22:16:52 +01:00
Frank Denis
3fb2ee07cb
Add crypto_pwhash_primitive()
2016-03-21 20:59:43 +01:00
Frank Denis
79935dc918
test/pwhash_argon2i -> test/pwhash
2016-03-21 09:48:01 +01:00
Frank Denis
14bf02af88
Rename the pwhash test as as pwhash_scrypt
2015-12-29 16:14:19 +01:00
Frank Denis
1b0e51da5e
Use sodium_malloc() in the pwhash test.
2015-05-01 17:35:45 +02:00
Frank Denis
820a2b70e3
Move macros up
2015-01-15 00:51:53 +01:00
Frank Denis
d556a56c3c
Add extra assert() in tests allocating memory on the heap.
2014-11-25 16:19:20 -08:00
Frank Denis
d42634d466
Tests: use explicit casts when shortening types
2014-11-20 13:12:08 -08:00
Frank Denis
d311731bad
Revert "Fix integer narrowing warnings in tests."
...
This reverts commit 173ad74d3e
.
2014-11-20 12:00:37 -08:00
evoskuil
173ad74d3e
Fix integer narrowing warnings in tests.
2014-11-02 22:35:36 -08:00
Frank Denis
18f4dd241e
C++ compat
2014-09-23 21:30:37 -07:00
Frank Denis
727f3993a1
lcov exclusion
2014-09-23 21:22:44 -07:00
Frank Denis
5a7782eb6e
Extra tests for invalid pwhash strings
2014-09-23 21:15:38 -07:00
Frank Denis
7670932918
test pwhash_str_verify() with an invalid character
2014-09-23 15:38:31 -07:00
Frank Denis
b07dfc5da3
The test for pwhash is too slow for some systems.
...
Stop checking alterations for every single character.
2014-09-23 15:18:06 -07:00
Frank Denis
7a54ba58e9
Test password verification with an empty password
2014-09-23 14:54:19 -07:00
Frank Denis
d6d539a0ce
Test crypto_pwhash_scryptsalsa208sha256_str_verify() with invalid input.
2014-09-23 13:58:59 -07:00
Frank Denis
46df8ea890
Test pwhash with opslimit < 32768
2014-09-23 13:19:03 -07:00
Frank Denis
fe4bbdc5ca
More crypto_pwhash() tests
2014-09-16 15:07:42 -07:00
Frank Denis
82bc039d6c
Consistent syle for the tests.
2014-09-14 11:32:55 -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
bd05b7d292
Rename scryptxsalsa208sha256 to scryptsalsa208sha256
2014-05-15 00:01:16 -07:00
Frank Denis
62e37fbfe4
crypto_pwhash_scryptxsalsa208sha256_str() test vectors
2014-05-14 23:46:15 -07:00
Frank Denis
eca5267df9
crypto_pwhash_scryptxsalsa208sha256 test vectors
2014-05-14 23:22:11 -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
37d73684b8
More crypto_pwhash tests
2014-05-12 11:26:39 -07:00
Frank Denis
42d87bf926
The pwhash test requires a 32 bytes salt.
2014-05-08 20:39:14 -07:00
Frank Denis
e48b1e6b75
Remove extra puts() in pwhash test.
2014-05-08 19:09:43 -07:00
Frank Denis
299ff0ceb3
Add a minimal test for crypto_pwhash
2014-05-07 23:54:55 -07:00