crypto.c:440:38: warning: array subscript 24 is above array bounds of 'int[24]' [-Warray-bounds]
440 | crypto_drivers[driverid].cc_alg[alg] == 0)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
In file included from crypto.c:37:
nuttx/include/crypto/cryptodev.h:269:7: note: while referencing 'cc_alg'
269 | int cc_alg[CRYPTO_ALGORITHM_MAX + 1];
following commit cbf8475b93
(1)alg need to blong to [1, CRYPTO_ALGORITHM_MAX + 1] in sanity checks
(2)clear alg algorithm when alg blongs to [1, CRYPTO_ALGORITHM_MAX + 1)
(3)clear all algorithms when alg equals to CRYPTO_ALGORITHM_MAX + 1
Signed-off-by: makejian <makejian@xiaomi.com>
public header files put into include/crpyto
private header/source files put into crpyto
crypto.c cryptodev.[c|h] cryptosoft.[c|h] come from:
commit id is f245bed2a7593bf0decce50caaed4ce05fefd6cf
the rest come from:
commit id is 61b0e532b2dce0a91cf3ea67d346645a61a88cdd
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
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>
- 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