Commit Graph

24 Commits

Author SHA1 Message Date
Petro Karashchenko 89fe6b1d24 include/nuttx/crypto: include sys/types.h insted of stdint.h
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-05-13 10:48:42 +08:00
wangbowen6 bc61e71b94 crypto: change type uint32_t to size_t in aes_cypher() arguments.
Signed-off-by: wangbowen6 <wangbowen6@xiaomi.com>
2022-05-12 22:28:54 +08:00
wangbowen6 568621fbcf crypto: fix compile error.
In file included from drivers_initialize.c:25:0:
/home/wangbowen/project/community/wbw_nuttx/nuttx/include/nuttx/crypto/crypto.h:74:20: error: expected ')' before 'void'

Signed-off-by: wangbowen6 <wangbowen6@xiaomi.com>
2022-05-12 22:28:54 +08:00
Alin Jerpelea 33383a09dd include: 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
Xiang Xiao b3f9ffbe72 Replace all __attribute__((aligned(x)) with aligned_data(x)
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-07-29 21:55:21 -03:00
Xiang Xiao d7f96003cf Don't include debug.h from public header file
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-06-01 06:42:02 +09:00
Alin Jerpelea 8034289cf6 include: update licenses to Apache
Gregory Nutt is the copyright holder for those files and he has submitted the
SGA as a result we can migrate the licenses to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-05-27 08:07:25 +09:00
Alin Jerpelea a8a1308240 include: nuttx: update licenses to Apache 2.0
The SGA from Gregory Nutt had been submitted and we can replace
the licenses to Apache 2.0

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-02-01 11:21:57 -03:00
Alin Jerpelea 47141edb27 include: nuttx: crypto: fix nxstyle errors
Fix nxstyle errors for headers

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-01-25 08:26:44 -08:00
Xiang Xiao 80277d1630
Refine the preprocessor conditional guard style (#190) 2020-01-31 19:07:39 +01:00
Xiang Xiao 68951e8d72 Remove exra whitespace from files (#189)
* Remove multiple newlines at the end of files
* Remove the whitespace from the end of lines
2020-01-31 09:24:49 -06:00
Sebastien Lorquet a7257eff52 This change:
- Avoids the use of up_aesinitialize() entirely, which resolves dependency problems, because this function does not make sure that an actual hardware aes implementation was made available: each SoC is now responsible to ensure the AES hardware is initialized before first use. This applies to lpc43xx, stm32 and sam34.
    - Remove definitions of the NEVER used aes_init and aes_update operations. The new AES API will be more suitable.
    - Change the unusual naming in stm32 (avoiding possible naming clashes)
    - Change the unusual naming in sam34 (avoiding possible naming clashes)
    - Add some FAR to pointers and enforce the 80 col limit in stm32 and sam
2018-12-19 08:42:48 -06:00
Sebastien Lorquet c912e53344 crypto/aes.c: This commit provides an improved AES cipher API in addition to the existing routines. The reasons for this new API are: 1) better performance, giving the possibility to avoid re-setting-up the key for each AES block when the same key is used multiple times. This is important for the current single user of AES, which is related to storage and FTL. And 2) suitable for simultaneous use of multiple AES keys, which will be required by the upcoming crypto framework. It retains compatibility with the previous API, so there is no need to change anything else right now. 2018-12-18 10:21:37 -06:00
Gregory Nutt 7cf88d7dbd Make sure that labeling is used consistently in all function headers. 2018-02-01 10:00:02 -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
Alexander Vasiljev eb11e662db Modifications to the crypto API needed for LPC43xx. 2016-05-23 08:05:02 -06:00
Gregory Nutt f849116a0b Add implementatino of Tiny Encryption Algorithm 2016-01-19 16:37:45 -06:00
Gregory Nutt 580529ba23 crypto/aes.c: Make refernce to key const 2015-11-16 14:30:43 -06:00
Gregory Nutt c955cdccd9 Move rivers/wireless/cc3000/security.c to crypto/aes.c; move include/nuttx/wireless/cc3000/security.h to include/nuttx/crypto/aes.h 2015-11-16 13:31:02 -06:00
Max Neklyudov 01a35ff27f sam4cm: add CFB and MAC AES modes. From Max Neklyudov 2015-06-22 06:42:37 -06:00
Gregory Nutt 855e40ee7d Make some file section headers more consistent with standard 2015-04-08 07:25:06 -06:00
Gregory Nutt cb5cb96bc9 Fix issues when AES support was added for the STM32L1. From Juha Niskanen 2015-03-04 06:38:03 -06:00
Gregory Nutt 1c05245963 STM32: Add driver for STM32L162XX AES peripheral. Signed-off-by: Juha Niskanen <juha.niskanen@haltian.com> 2015-02-04 06:49:05 -06:00
Gregory Nutt 1657e6296b Move crypto header files from include/crypto to include/nuttx/crypto 2014-07-03 18:35:08 -06:00