mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
2cf4253710
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.
8 lines
238 B
Makefile
8 lines
238 B
Makefile
ifeq (, ${RIOT_CHACHA_PRNG_DEFAULT})
|
|
RIOT_CHACHA_PRNG_DEFAULT := $(shell head -c 64 /dev/urandom | hexdump -e '"0x%4xull,"')
|
|
endif
|
|
|
|
CFLAGS += -DRIOT_CHACHA_PRNG_DEFAULT="${RIOT_CHACHA_PRNG_DEFAULT}"
|
|
|
|
include $(RIOTBASE)/Makefile.base
|