José Alamos
d16d911f42
Merge pull request #10120 from mtausig/ocb
...
Add OCB encryption mode
2019-04-23 11:08:30 +02:00
Mathias Tausig
dcab239b9b
crypto: Implement Unit Tests for OCB mode
2019-04-23 10:36:31 +02:00
f4a4f5d0b1
chacha20poly1305: Provide a test based on the rfc
...
Add a test case to the crypto tests testing the chacha20poly1305
algorithm with the test vectors from rfc 8439.
2019-02-04 09:29:26 +01:00
Kevin "Bear Puncher" Weiss
f05852290a
Merge pull request #9236 from bergzand/pr/crypto/poly1305
...
crypto: Poly1305 implementation
2018-12-03 14:31:28 +01:00
d5c527161d
test/crypto: Add tests for poly1305
...
Tests are based on the tests vectors provided in RFC 7539
2018-12-03 09:31:10 +01:00
Juan I Carrano
77c9cc4041
Merge pull request #10219 from bergzand/pr/crypt/helper_add_wipe
...
crypto/helper: Add secure wipe function
2018-11-30 11:32:45 +01:00
Gaëtan Harter
5c426f0fc9
tests-crypto-modes-ccm: change test inputs to const
...
Do required changes to have test inputs as const buffers.
2018-11-19 16:44:04 +01:00
Gaëtan Harter
3ca51d8b5d
tests-crypto/test-crypto.h: update api to const input buffers
...
Input buffers are not modified, so can be declared const arguments.
This will allow using `const` inputs for `modes/ccm` tests.
2018-11-19 16:44:04 +01:00
Gaëtan Harter
c87fe94ec1
crypto/modes/ccm: update api to const input buffers
...
Input buffers are not modified, so can be declared const arguments.
2018-11-19 16:44:04 +01:00
Gaëtan Harter
147390c209
tests/ccm: add test for auth_data_len upper value
...
Maximal supported value is 0xFEFF.
2018-11-12 16:38:45 +01:00
730286903a
crypto/helper: Add test for crypto_secure_wipe
...
The test added for crypto_secure_wipe wipes a buffer with a secret in
it. Only the last byte is kept as it was. The last byte is used to check
that the function doesn't write outside the supplied buffer.
2018-11-07 18:27:10 +01:00
Gaëtan Harter
fa33eacd1f
crypto/ccm: fix _fits_in_nbytes function
...
Function is broken with num_bytes >= 4.
Could happen when storing input_len with len_encoding >= 4.
It can take values from 2 to 8, so make it work for cases it would overflow.
2018-05-07 15:08:00 +02:00
Gaëtan Harter
a47e5e427e
tests/ccm: add test for input_len check
2018-05-07 15:08:00 +02:00
Gaëtan Harter
30202f9de7
tests/ccm: check output buffer size
...
Add static test to verify output buffer is big enough for testing.
2018-01-04 18:01:58 +01:00
Gaëtan Harter
a83a1a80e5
tests/ccm: support input/adata bigger than 256
...
Fix data types to have bigger sizes.
The 'data' buffer size will still need to be increased when adding bigger tests.
2018-01-03 12:02:29 +01:00
Gaëtan Harter
e74b0ff33d
tests/ccm: set 'len_encoding' from 'nonce_len'
...
Configure len_encoding in test depending on nonce_len.
Prepare for tests with nonce_len != 13.
2018-01-03 12:02:28 +01:00
Gaëtan Harter
b5c1855d7e
tests/ccm: make 'mac_length' configurable in test
...
Preparation to add tests with different mac_length than 8.
2018-01-03 12:02:20 +01:00
Gaëtan Harter
fc3efbd0ee
tests/ccm: add macro to simplify test call
2018-01-03 12:02:16 +01:00
Gaëtan Harter
5f6dc57d09
tests/ccm: fixup indentation
2018-01-03 12:01:57 +01:00
Emmanuel Baccelli
6589c01aa0
sys/crypto: remove 3DES
2017-04-25 18:34:18 +02:00
908429eb33
tests: fix misc cppcheck warnings
2017-04-14 14:36:16 +02:00
Oleg Hahm
7ee7801c10
*: remove trailing underscores from header guards
2017-01-19 18:30:53 +01:00
Oleg Hahm
c2893d4a88
sys: crypto: remove twofish and rc5
2017-01-15 14:53:43 +01:00
9082273746
core: header cleanup
2016-02-28 22:46:28 +01:00
Oleg Hahm
51db509f7c
sha256: move from crypto to hashes
2016-02-04 14:58:34 +01:00
BytesGalore
59a69796ab
unittests/crypto: changed to really compare digest vs string of digest
...
* added additional test with longer input
* uncrustified file
2016-01-27 06:32:28 +01:00
Nico von Geyso
4a4235c622
Unified Cipher API and Block cipher operation modes
2015-07-22 19:18:34 +02:00
René Kijewski
2cf4253710
sys: add ChaCha stream cipher and PRNG
...
This implementation is optimized for a little code and data size, not
for speed. IMO the code is more readable than in the reference
implementation.
The biggest advantage of ChaCha over other stream ciphers is the very
little data usage with only 64 bytes of context, and its good encryption
speed.
Also part of this PR is pseudo-random number generator, that just
returns the keystream of a randomly initialized ChaCha context.
2015-06-28 18:32:04 +02:00
Joakim Gebart
13832d8e62
everything: Remove filename from @file Doxygen command
2015-05-22 07:34:41 +02:00
kushalsingh007
88349beb89
Tests: Removing extra newline from Makefile.include
...
- Removing the extra newline from tests-bloom, tests-crypto and
tests-timex.
2015-04-16 09:50:03 +05:30
Darredevil
ce46de3799
unittests/tests-crypto: fixed header file include guard
...
fixes #2623
2015-03-22 16:29:20 +02:00
René Kijewski
f684aa4b2d
tests: make embUnit a normal sys module
...
There is nothing quite special about embUnit.
This PR makes it a normal sys module, so that you can use it in any
application / test.
2014-12-21 20:04:57 +01:00
Philipp Rosenkranz
1024e0b8be
tests: transformed tests/sha256 into an unittest
2014-12-11 21:57:01 +01:00