Commit Graph

7 Commits

Author SHA1 Message Date
anjiahao
319e8d66f6 crypto:fix typo for blake2s
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2023-08-10 13:35:44 +08:00
Alin Jerpelea
7597b8e471 crypto: Haltian Ltd: update licenses to Apache
Gregory Nutt has submitted the SGA
Haltian Ltd has submitted the SGA

as a result we can migrate the licenses to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-11-15 06:49:32 -06:00
Gregory Nutt
2dae970ec6 Fix cases where memory is allocated using malloc()
arch/arm/src/cxd56xx/cxd56_gnss.c, arch/arm/src/xmc4/xmc4_spi.c,
 crypto/blake2s.c, drivers/lcd/pcf8574_lcd_backpack.c, drivers/lcd/st7032.c

User space memory should not be used within the OS and, when it is absolutely necessary to use user-space memory, it should be allocated using kumm_malloc().
2020-08-04 20:40:57 +01:00
Alin Jerpelea
048d4954a0 crypto: nxstyle fixes
nxstyle fixes to reduce the CI warnings

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2020-04-22 14:07:04 -06:00
Xiang Xiao
6a3c2aded6 Fix wait loop and void cast (#24)
* Simplify EINTR/ECANCEL error handling

1. Add semaphore uninterruptible wait function
2 .Replace semaphore wait loop with a single uninterruptible wait
3. Replace all sem_xxx to nxsem_xxx

* Unify the void cast usage

1. Remove void cast for function because many place ignore the returned value witout cast
2. Replace void cast for variable with UNUSED macro
2020-01-02 10:54:43 -06:00
Gregory Nutt
dc8c814ca3 Squashed commit of the following:
Fixed coding standard error in several files.  Use of while( is incorrect; a space is required between while and (.  Also ran tools/nxstyle and fix thoses complaints as well in most files.

    Changes to comply with coding standard.  Mostly focused on files with missing space after keyword in if(, switch(, and for(.  Offending files also got changes to comply with tools nxstyle.  If there were logs of nxstyle complaints, the file also got a taste of tools/indent.sh.  Still need to fix occurrences of while( with missing space.  There are a lot of them.
2019-02-27 08:41:08 -06:00
Jussi Kivilinna
dffb8a67e3 Add entropy pool and strong random number generator
Entropy pool gathers environmental noise from device drivers, user-space, etc., and returns good random numbers, suitable for cryptographic use. Based on entropy pool design from *BSDs and uses BLAKE2Xs algorithm for CSPRNG output.

Patch also adds /dev/urandom support for using entropy pool RNG and new 'getrandom' system call for getting randomness without file-descriptor usage (thus avoiding file-descriptor exhaustion attacks). The 'getrandom' interface is similar as 'getentropy' and 'getrandom' available on OpenBSD and Linux respectively.
2017-03-30 07:38:37 -06:00