1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
Commit Graph

9 Commits

Author SHA1 Message Date
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
Nico von Geyso
4a4235c622 Unified Cipher API and Block cipher operation modes 2015-07-22 19:18:34 +02:00