Commit graph

31 commits

Author SHA1 Message Date
Tomi Fontanilles 3efdbe6c0c modules: mbedtls: rename CONFIG_MBEDTLS_MAC_*_ENABLED and rm duplicates
Remove the `_MAC` part because those Kconfig options enable only hash
algorithms, nothing MAC-related, and the `_ENABLED` part to align the
naming to the Mbed TLS defines (plus we don't need such a part).

As a bonus, enabling SHA-256 does not automatically enable SHA-224
anymore.

See the migration guide entries for more details on the practical
changes.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-05-29 08:39:26 +02:00
Tomi Fontanilles 9bbff1ac84 drivers: crypto: mbedtls: fix dependency
Explicitly enable SHA-512 now that it is not enabled by default
anymore.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-05-03 14:47:52 -07:00
Ioannis Karachalios 6f6066cdf1 drivers: crypto: smartbond: Support crypto accelerator
Add support for the crypto engine.

Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
2023-10-26 09:47:23 +02:00
Pieter De Gendt 6758777ddf drivers: crypto: Add NXP MCUX DCP driver
Add a shim driver for NXP's Data Co-Processor (DCP) driver.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2023-07-26 09:09:48 +02:00
Dino Li fa49f77973 drivers/crypto/it8xxx2: add support for SHA256 hardware accelerator
Add SHA256 accelerator support for it8xxx2 series.

This driver passes the following test:
tests/crypto/crypto_hash/

Signed-off-by: Dino Li <Dino.Li@ite.com.tw>
2023-07-07 09:24:47 +02:00
Manimaran A 3cc7d37b70 drivers: crypto: MEC172x crypto driver supporting hash
Implement zephyr crypto driver hash API's using calls to
MEC172x ROM hash API's. Hardware supports zephyr driver
hash modes: SHA-224, 256, 384, and 512. Driver supports
synchronous (blocking) mode at this time.

Signed-off-by: Manimaran A <manimaran.a@microchip.com>
2023-05-16 12:07:24 +02:00
Henrik Brix Andersen c41dd36de2 drivers: kconfig: unify menuconfig title strings
Unify the drivers/*/Kconfig menuconfig title strings to the format
"<class> [(acronym)] [bus] drivers".

Including both the full name of the driver class and an acronym makes
menuconfig more user friendly as some of the acronyms are less well-known
than others. It also improves Kconfig search, both via menuconfig and via
the generated Kconfig documentation.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-03-28 15:06:06 +02:00
Jun Lin 885695f425 drivers: crypto: SHA: npcx: add support for SHA hardware accelerator
NPCX9 series chips include a SHA hardware accelerator, which supports
SHA256/SHA384/SHA512 hashing and a library (APIs) in the on-chip ROM.
This commit adds the driver support by wrapping the on-chip ROM APIs.

Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
2022-12-21 10:10:10 +01:00
Krzysztof Frydryk 93e9b5c49d Drivers: crypto_intel_sha: Add support for hw intel sha driver
Adds support for intel ADSP SHA hw accelerator.

Signed-off-by: Krzysztof Frydryk <krzysztofx.frydryk@intel.com>
2022-06-06 12:05:12 +02:00
Gerard Marull-Paretas 95fb0ded6b kconfig: remove Enable from boolean prompts
According to Kconfig guidelines, boolean prompts must not start with
"Enable...". The following command has been used to automate the changes
in this patch:

sed -i "s/bool \"[Ee]nables\? \(\w\)/bool \"\U\1/g" **/Kconfig*

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-03-09 15:35:54 +01:00
Sebastian Bøe 85c4f5dd55 kconfig: drivers: crypto: Remove EXPERIMENTAL
The crypto driver API is 6 years old, has 5 different implementations,
and is widely used.

Remove the EXPERIMENTAL marking from the API. Each implementation may
still choose to mark itself as EXPERIMENTAL.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2022-02-21 22:20:51 -05:00
Torsten Rasmussen bd61122aa2 kconfig: drivers: experimental settings now uses select EXPERIMENTAL
With the introduction of `EXPERIMENTAL` and `WARN_EXPERIMENTAL` in
Zephyr all drivers settings having `[EXPERIMENTAL]` in their
prompt has has been updated to include `select EXPERIMENTAL` so that
developers can enable warnings when experimental features are enabled.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2021-10-25 10:46:48 +02:00
Maciej Fabia ae285ef4e6 drivers: crypto: add driver for nRF ECB
add driver for nRF AES Electronic CodeBook (ECB) peripheral

Signed-off-by: Maciej Fabia <maciej.fabia@nordicsemi.no>
2020-04-08 16:20:53 +02:00
Markus Fuchs b0fcb0777c drivers: crypto: Add STM32 CRYP crypto driver
This patch adds crypto driver support for all STM32F4 devices providing
a CRYP peripheral.
This driver implements the AES ECB, CBC and CTR modes of operation.

It has been tested on a STM32F437 SoC running the Zephyr crypto driver
sample.

Signed-off-by: Markus Fuchs <markus.fuchs@de.sauter-bc.com>
2020-02-07 10:45:51 -06:00
Ulf Magnusson bd6e04411e kconfig: Clean up header comments and make them consistent
Use this short header style in all Kconfig files:

    # <description>

    # <copyright>
    # <license>

    ...

Also change all <description>s from

    # Kconfig[.extension] - Foo-related options

to just

    # Foo-related options

It's clear enough that it's about Kconfig.

The <description> cleanup was done with this command, along with some
manual cleanup (big letter at the start, etc.)

    git ls-files '*Kconfig*' | \
        xargs sed -i -E '1 s/#\s*Kconfig[\w.-]*\s*-\s*/# /'

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-11-04 17:31:27 -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
Ulf Magnusson 8cf8db3a73 Kconfig: Use a short, consistent style for prompts
Consistently use

    config FOO
            bool/int/hex/string "Prompt text"

instead of

    config FOO
            bool/int/hex/string
            prompt "Prompt text"

(...and a bunch of other variations that e.g. swapped the order of the
type and the 'prompt', or put other properties between them).

The shorthand is fully equivalent to using 'prompt'. It saves lines and
avoids tricking people into thinking there is some semantic difference.

Most of the grunt work was done by a modified version of
https://unix.stackexchange.com/questions/26284/
how-can-i-use-sed-to-replace-a-multi-line-string/26290#26290, but some
of the rarer variations had to be converted manually.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-08-15 04:10:10 -07:00
Ulf Magnusson a816d105a9 drivers: crypto: Kconfig: Remove redundant 'default n' properties
Bool symbols implicitly default to 'n'.

A 'default n' can make sense e.g. in a Kconfig.defconfig file, if you
want to override a 'default y' on the base definition of the symbol. It
isn't used like that on any of these symbols though, and is
inconsistent.

This will make the auto-generated Kconfig documentation have "No
defaults. Implicitly defaults to n." as well, which is clearer than
'default n if ...'

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-07-03 17:11:31 -04:00
Ulf Magnusson aa26289458 kconfig: Get rid of leading/trailing whitespace in prompts
Leading/trailing whitespace in prompts requires ugly workarounds in
genrest.py, as e.g. *prompt * is invalid RST. strip() all prompts in
Kconfiglib and get rid of the genrest.py workarounds. Add a warning too.

The Kconfiglib update has some unrelated cleanups and fixes (that won't
affect Zephyr).

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-05-19 09:26:39 +03:00
Ulf Magnusson 93689bdc80 kconfig: Remove no-op selects of choice symbols
Selecting a choice symbol is always a no-op, and the latest version of
Kconfiglib prints a warning. This commit removes all selects of choice
symbols, which might make the Kconfig files a bit clearer and gets rid
of the warnings.

This is just a dumb removal. I did not try to guess the intent of each
select.

Fixes #6849

Signed-off-by: Ulf Magnusson <ulfalizer@gmail.com>
2018-03-29 08:57:39 -04:00
Anas Nashif 429c2a4d9d kconfig: fix help syntax and add spaces
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-12-13 17:43:28 -06:00
Ramakrishna Pallala bb5a2985d1 drivers: crypto: Fix mbedtls Kconfig dependencies
Fix mbedtls shim driver Kconfig dependencies.

Limit the scope of crypto_driver_api functions to driver file only.

Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com>
2017-11-03 14:27:41 -04: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
Tomasz Bursztyka 7abf3c5307 drivers/crypto: Add mbedTLS shim crypto driver
This exposes the CCM operations through generic Crypto API.

Change-Id: I09346e77bf8821c208305a7aa2805cf49cb42d71
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-08-17 22:20:23 -04:00
Anas Nashif 09bcd8ee74 Kconfig: make all syslog variables depend on SYS_LOG
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-08-04 14:34:54 -05: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 0b5946e4b7 drivers/crypto: Use a proper driver name for TinyCrypt shim driver
Change-Id: I526677c98fa70e46f92dbb4e4569707e1cb8469a
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-04-27 13:06:29 +00:00
Tomasz Bursztyka 493ffdf7cb drivers/Kconfig: Cleanup Kconfig
- help message should have same intendation on a specific file
- No need of "depends on" if it's already in a relevant if/endif
- either prompt is used, or not, but let's not mix.

Change-Id: Ib75f25dcf2440fd0ba7bde5c95bc1fbece68be07
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-04-27 13:06:29 +00:00
David B. Kinder 93e4d7258d spell: fix Kconfig help typos: /boards /drivers
Fix misspellings in Kconfig help text

Change-Id: I3ae28a5d23d8e266612114bc0eb8a6e158129dc7
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-04-21 21:31:30 +00:00
Juan Manuel Cruz Alcaraz 485da78449 ataes132a: Adds a driver to support ATAES132A device
Adds a driver for Atmel Crypto Authorization solution
ATAES132A crypto device.

The driver supports the following functionality.

- AES CCM encryption, decryption and authentication
- AES ECB block operation.

The driver requires an I2C device to access crypto device registers.

Jira: ZEP-1387

Change-Id: I60aa8f3b069b703d4f83d866d28391625bb9ac13
Signed-off-by: Juan Manuel Cruz Alcaraz <juan.m.cruz.alcaraz@intel.com>
2017-02-15 02:07:14 +00:00
Jithu Joseph de106b026a drivers/crypto: TinyCrypt shim driver
Shim layer interfacing between crypto APIs and TinyCrypt
library. Currently facilitates only a subset of TinyCrypt
features/algorithms.

Jira: ZEP-509

Change-Id: I7fe6b9d86df016d92d717378d08a1ab09caafb31
Signed-off-by: Jithu Joseph <jithu.joseph@intel.com>
2017-02-15 01:08:15 +00:00