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

57 Commits

Author SHA1 Message Date
Marian Buschsieweke
86fdbd7054
core/lib: Add macros/utils.h header
The macros CONCAT(), MIN(), and MAX() are defined over and over again in
RIOT's code base. This de-duplicates the code by moving the macros to a
common place.
2023-01-07 09:47:44 +01:00
Marian Buschsieweke
e92a7164e3
sys/hash/pbkdf2: Accept passwd as void * instead of uint8_t *
Having to cast a password provided as `const char *` to
`const uint8_t *` is a needless pain in the ass when using the API.
Hence, fix it by accepting passwords and salts as `const void *`
instead.
2022-11-18 13:51:32 +01:00
Benjamin Valentin
6e7d5ae2d3 codespell: fix remaining issues 2022-09-16 14:00:35 +02:00
Martine Lenders
5e59649fda
hashes_cmac: rename to hashes_aes128_cmac 2022-08-31 10:43:25 +02:00
Jan Romann
4384795cb9
treewide: Remove excessive newlines 2021-08-13 19:50:38 +02:00
Ollrogge
427d2bd06e sys/crypto: Enable support for AES-192, AES-256 2021-05-03 17:34:49 +02:00
Leandro Lanzieri
0fb2711a15
sys/hashes: add module to Kconfig 2021-01-26 17:40:29 +01:00
benpicco
568e1e3635
Merge pull request #15199 from fjmolinas/pbkdf2-sha256
sys/hashes/pbkdf2: Add PBKDF2-sha256 implementation. [TAKEOVER]
2020-11-04 14:45:12 +01:00
Juan Carrano
bc8ce928d4
sys/hashes/pbkdf2: wipe local variables, prevents leaks.
Wipe temporary buffers and sha256 contexts so that no remnants of the
password is left on the stack

This ensures that the password is not leaked if some function reads
the stack afterwards.
2020-11-04 09:57:32 +01:00
Juan Carrano
62667848c4
sys/hashes/pbkdf2: Add PBKDF2-sha256 implementation.
This add an implementation of PBKDF2 using sha256 hmac. Only one derived
key length is supported (32) though it should not be hard to extend it.

The testing is done with both random (with fixed seed) vectors amd vectors
from rfc7914.
2020-11-04 09:57:32 +01:00
Bas Stottelaar
b32baa0f72 sys/*: remove unused assert.h include 2020-10-22 11:29:27 +02:00
PeterKietzmann
f9c67e18b6 sys/hashes: inline functions in sha224/sha256 2020-06-10 10:00:30 +02:00
PeterKietzmann
344a8a5369 sys/hashes: add sha224 2020-06-10 09:40:13 +02:00
PeterKietzmann
852c58b82b sys/hashes/sha256: extract common code 2020-06-08 23:12:11 +02:00
ec8a4ba3c2 sys/hashes: fix typos 2019-11-23 22:39:37 +01:00
74919d0646
sys/sha3: fix dead assignment of blockSize in Keccak_update 2019-10-27 10:44:54 +01:00
9e9ef3293d
sys/sha1: deduplicate sys_hashes_sha1 group definition 2019-08-05 16:57:36 +02:00
d6390b3685 hashes/sha256: don't call memcpy if len==0 2019-01-17 10:56:34 +01:00
Jose Alamos
cac5944023 doc/hashes: deprecate supports section 2018-08-29 16:08:53 +02:00
Jose Alamos
116118af22 doc/hashes: define new hash groups 2018-08-28 19:06:36 +02:00
Mathias Tausig
ce099c6517 hashes:sha3: Remove unused functions from Keccak code
Remove unused SHAKE functions
Removed unused SHA3-224
2018-03-06 16:18:26 +01:00
Mathias Tausig
91a473a8d9 hashes:sha3: Alterations to Keccak code
Changed integer typedefs to portable stdint types
Added Endianness define
2018-03-06 16:18:23 +01:00
Mathias Tausig
792137f88d hashes:sha3: Integrate SHA-3 into RIOT API
Add init/update/final interface
Add interface functions for direct SHA3
Add unit tests for SHA-3
Document functions and types
Reduced var scope in Keccak code
Add CCO Copyright notice to Keccak code
2018-03-06 16:18:18 +01:00
Mathias Tausig
a44a313e8f hashes:sha3: Import Keccak code from Keccak Code Package 2018-03-06 16:17:46 +01:00
smlng
6ac0922c7d doc: replace dashes 2017-09-06 08:49:05 +02:00
José Alamos
5dc146269d sys/hashes: add AES-CMAC implementation 2017-05-08 13:52:11 +02:00
BytesGalore
dacc3cba9f Merge pull request #6283 from OTAkeys/pr/hmac_iterative_calc
hashes/sha256: add iterative hmac calc. functions
2017-03-01 17:14:11 +01:00
Hermann Lelong
f2ef9db988 hashes/sha256: add iterative hmac calc. functions
Add init, update, and final functions to do HMAC
calculation using blocks, instead of one shot.

Unit tests: use the PRF-6 test vector to test the case
where data is splitted in 3 different blocks.
2017-03-01 15:51:21 +01:00
kYc0o
4fc6b89d87 sys/hashes/sha256: remove unnecessary include 2017-01-04 16:54:13 +01:00
Ludwig Knüpfer
af1968e52a sys/hashes: fix doxygen group
- fix group membership
- improve description style
2016-12-20 20:42:13 +01:00
Martine Lenders
3c005b64b6 Merge pull request #5692 from BytesGalore/md5_change_parameter_type
hashes/md5: changed data-parameter types to `void*`
2016-09-27 20:07:11 +02:00
BytesGalore
4fa3a83910 hashes/md5: changed data-parameter types to void* 2016-09-27 18:53:43 +02:00
Martine Lenders
3a204d69b4 Merge pull request #5691 from BytesGalore/sha1_change_parameter_type
hashes/sha1: changed data-parameter pointers to `void*`
2016-09-27 18:48:31 +02:00
BytesGalore
9818d053f4 hashes/sha256: changed data pointer parameters to void* 2016-09-27 06:36:08 +02:00
Wentao Shang
600c8f626d hashes/sha256: support unaligned memory access in be32enc_vect 2016-07-31 18:58:13 -07:00
BytesGalore
68d9f07eee hashes/sha1: changed data-parameter types to void* 2016-07-26 10:03:58 +02:00
Mathias Tausig
ca5564f643 Cleanup: Corrected code style with uncrustify 2016-05-24 16:57:06 +02:00
Mathias Tausig
b30945a2f8 hashes: Cleanup (removed unneccesary increment operator) 2016-05-24 16:57:06 +02:00
Mathias Tausig
dfee5c3274 hashes: Unified the cryptographic hash functions
- Same signatures for XXX_init, XXX_update and XXX_final
- Same naming conventions and parameter types for all funtions in sha1.h
2016-05-24 16:52:30 +02:00
BytesGalore
f0245bd648 hashes/sha256: add sha256-chain computation and verification functions
* also added unittetst for it

x[SQUASH ME] separated out all waypoints test and increased waypoints
2016-02-24 19:04:17 +01:00
Oleg Hahm
e0732a5a81 Merge pull request #4701 from OlegHahm/sha1
hashes: Import of SHA-1 algorithm
2016-02-23 12:23:21 +01:00
Oleg Hahm
6afd629d1a hashes: add SHA-1 hashing algorithm 2016-02-23 12:09:37 +01:00
Ludwig Knüpfer
be4ac58e0c sys/hashes, sys/checksum: mv fletcher* checksum 2016-02-15 09:29:04 +01:00
BytesGalore
b1537bc17c hashes/sha256: initial commit for hmac-sha256 computation 2016-02-06 08:11:37 +01:00
Oleg Hahm
6823b47623 doc: add starting page for hash functions 2016-02-04 14:58:34 +01:00
Oleg Hahm
51db509f7c sha256: move from crypto to hashes 2016-02-04 14:58:34 +01:00
Joakim Nohlgård
98c465008b all: Update @gebart family name, email 2015-09-20 13:47:39 +02:00
René Kijewski
caf5503486 Merge pull request #3235 from haukepetersen/add_md5
sys/hashes: added MD5 implementation
2015-07-13 22:59:09 +02:00
haukepetersen
9370506a72 sys/hashes: added MD5 implementation 2015-06-22 21:43:28 +02:00
Joakim Gebart
1f94a93fb8 sys/hashes: Add Fletcher's checksums 2015-05-26 23:11:30 +02:00