Skip to content

Commit de106b0

Browse files
jithu83Anas Nashif
authored andcommitted
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 <[email protected]>
1 parent 417c341 commit de106b0

File tree

6 files changed

+428
-0
lines changed

6 files changed

+428
-0
lines changed

drivers/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,4 +70,5 @@ source "drivers/dma/Kconfig"
7070

7171
source "drivers/usb/Kconfig"
7272

73+
source "drivers/crypto/Kconfig"
7374
endmenu

drivers/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,4 @@ obj-$(CONFIG_AIO_COMPARATOR) += aio/
2828
obj-$(CONFIG_PINMUX) += pinmux/
2929
obj-$(CONFIG_DMA) += dma/
3030
obj-$(CONFIG_USB) += usb/
31+
obj-$(CONFIG_CRYPTO) += crypto/

drivers/crypto/Kconfig

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Kconfig - Crypto configuration options
2+
#
3+
#
4+
# Copyright (c) 2016 Intel Corporation
5+
#
6+
# Licensed under the Apache License, Version 2.0 (the "License");
7+
# you may not use this file except in compliance with the License.
8+
# You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
#
18+
19+
#
20+
# CRYPTO options
21+
#
22+
menuconfig CRYPTO
23+
bool
24+
prompt "Crypto Drivers [EXPERIMENTAL]"
25+
default n
26+
27+
if CRYPTO
28+
config SYS_LOG_CRYPTO_LEVEL
29+
int
30+
prompt "Crypto drivers log level"
31+
default 0
32+
help
33+
Sets log level for crypto drivers
34+
35+
Levels are:
36+
37+
- 0 OFF, do not write
38+
39+
- 1 ERROR, only write SYS_LOG_ERR
40+
41+
- 2 WARNING, write SYS_LOG_WRN in adition to previous level
42+
43+
- 3 INFO, write SYS_LOG_INF in adition to previous levels
44+
45+
- 4 DEBUG, write SYS_LOG_DBG in adition to previous levels
46+
47+
config CRYPTO_TINYCRYPT_SHIM
48+
bool "Enable TinyCrypt shim driver [EXPERIMENTAL] "
49+
default n
50+
depends on CRYPTO
51+
help
52+
Enable TinyCrypt shim layer compliant with crypto APIs.
53+
54+
config CRYPTO_0_NAME
55+
string "Device name for TinyCrypt Pseudo device"
56+
default "CRYPTO_TC_0"
57+
depends on CRYPTO_TINYCRYPT_SHIM
58+
help
59+
Device name for TinyCrypt Pseudo device.
60+
61+
endif # CRYPTO

drivers/crypto/Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
ccflags-y += -I${srctree}/ext/lib/crypto/tinycrypt/include
2+
3+
obj-$(CONFIG_CRYPTO_TINYCRYPT_SHIM) += tc_shim.o
4+

0 commit comments

Comments
 (0)