Commit graph

15 commits

Author SHA1 Message Date
Kumar Gala a1b77fd589 zephyr: replace zephyr integer types with C99 types
git grep -l 'u\(8\|16\|32\|64\)_t' | \
		xargs sed -i "s/u\(8\|16\|32\|64\)_t/uint\1_t/g"
	git grep -l 's\(8\|16\|32\|64\)_t' | \
		xargs sed -i "s/s\(8\|16\|32\|64\)_t/int\1_t/g"

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-06-08 08:23:57 -05:00
Anas Nashif f2cb20c772 docs: fix misspelling across the tree
Found a few annoying typos and figured I better run script and
fix anything it can find, here are the results...

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-06-19 15:34:13 -05:00
Wentong Wu 94615a4f98 ext: lib: crypto: unify the API of CCM alogrith
unify the API of CCM alogrithm's implemation for TinyCrypt,
mbedTLS and cc2520 crypto device to make users easy to use.

Fixes #8339.

Signed-off-by: Wentong Wu <wentong.wu@intel.com>
2019-04-02 21:02:00 -04:00
Patrik Flykt 24d71431e9 all: Add 'U' suffix when using unsigned variables
Add a 'U' suffix to values when computing and comparing against
unsigned variables.

Signed-off-by: Patrik Flykt <patrik.flykt@intel.com>
2019-03-28 17:15:58 -05:00
Anas Nashif 3da714193f drivers: crypto: move to new logger
Move to new logger subsystem.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-10-08 17:49:12 -04:00
Flavio Ceolin da49f2e440 coccicnelle: Ignore return of memset
The return of memset is never checked. This patch explicitly ignore
the return to avoid MISRA-C violations.

The only directory excluded directory was ext/* since it contains
only imported code.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2018-09-14 16:55:37 -04:00
Flavio Ceolin d775c2f504 drivers: crypto: Fix input len size for cbc decryption
do_cbc_decrypt() was not accounting IV's size in the input buffer.

Note that tinycrypt expects that IV and cipher text to be contiguous,
but input length must consider only the cipher text.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2018-08-02 19:18:58 +02:00
Leandro Pereira e61c48123c drivers: crypto: crypto_tc_shim: Set output length for all operations
The out_len member in struct cipher_pkt was not set.

Fixes #4684.

Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2018-05-16 23:30:11 +03:00
Ramakrishna Pallala 4742f8e010 drivers: crypto: Fix TinyCrypt Kconfig dependencies
Fix TinyCrypt shim driver Kconfig dependencies.

Limit the scope of crypto_driver_api functions to driver file only.

Remove dead code from crypto_tc_shim_priv.h

Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com>
2017-11-03 14:27:41 -04:00
Leandro Pereira d5c283a82d drivers: crypto: Fix TinyCrypt shim
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2017-08-01 10:35:06 -04:00
Tomasz Bursztyka dc646b5f2e drivers/crypto: Fix a memory leak in tc shim driver
If setting up crypto context fails enough times, the sessions will all
end up "in use" though they will not. This will lock tc shim driver
altogether and no crypto context will be possible to run on it.

Change-Id: I72346854e52294f96afc32f30ac5bfd0c368812b
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-04-27 13:06:34 +00:00
Tomasz Bursztyka aec8a03877 drivers/crypto: Use crypto init Kconfig option for tc shim driver
Instead of generic kernel init priority option.

Change-Id: I5b6ed89fdc9528b96f08b4368364256fa79d9c60
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-04-27 13:06:33 +00:00
Tomasz Bursztyka 4fdbac15cd drivers/crypto: Make tc shim number of sessions Kconfig based
Thus it is possible to reduce or raise such amount relevantly if
required.

Change-Id: Ib53131e10e69fcbf1bcd9d844703d5b8832ee224
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-04-27 13:06:32 +00:00
Tomasz Bursztyka bfc7fb5ea4 drivers/crypto: Use sys_log automatic newline addition in tinycrypt shim
All existing log entries add a line break, so let's just use the sys_log
way.

Change-Id: Ia94efa593700e9590e16b51262f0b5a2fe10ffa2
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-04-27 13:06:32 +00:00
Tomasz Bursztyka 5296cd2060 drivers/crypto: Prefix source code relevantly
As everywhere else in drivers, domain of driver should be used as name
prefix.

Change-Id: I1bb2284495c7a6b2648395b757a5f912e4410b15
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-04-27 13:06:31 +00:00
Renamed from drivers/crypto/tc_shim.c (Browse further)