Skip to content

Commit 1110569

Browse files
ambarusherbertx
authored andcommitted
crypto: atmel-ecc - introduce Microchip / Atmel ECC driver
Add ECDH support for ATECC508A (I2C) device. The device features hardware acceleration for the NIST standard P256 prime curve and supports the complete key life cycle from private key generation to ECDH key agreement. Random private key generation is supported internally within the device to ensure that the private key can never be known outside of the device. If the user wants to use its own private keys, the driver will fallback to the ecdh software implementation. Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
1 parent 66d3994 commit 1110569

5 files changed

Lines changed: 937 additions & 0 deletions

File tree

‎Documentation/devicetree/bindings/crypto/atmel-crypto.txt‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,16 @@ sha@f8034000 {
6666
dmas = <&dma1 2 17>;
6767
dma-names = "tx";
6868
};
69+
70+
* Eliptic Curve Cryptography (I2C)
71+
72+
Required properties:
73+
- compatible : must be "atmel,atecc508a".
74+
- reg: I2C bus address of the device.
75+
- clock-frequency: must be present in the i2c controller node.
76+
77+
Example:
78+
atecc508a@C0 {
79+
compatible = "atmel,atecc508a";
80+
reg = <0xC0>;
81+
};

‎drivers/crypto/Kconfig‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -525,6 +525,20 @@ config CRYPTO_DEV_ATMEL_SHA
525525
To compile this driver as a module, choose M here: the module
526526
will be called atmel-sha.
527527

528+
config CRYPTO_DEV_ATMEL_ECC
529+
tristate "Support for Microchip / Atmel ECC hw accelerator"
530+
depends on ARCH_AT91 || COMPILE_TEST
531+
depends on I2C
532+
select CRYPTO_ECDH
533+
select CRC16
534+
help
535+
Microhip / Atmel ECC hw accelerator.
536+
Select this if you want to use the Microchip / Atmel module for
537+
ECDH algorithm.
538+
539+
To compile this driver as a module, choose M here: the module
540+
will be called atmel-ecc.
541+
528542
config CRYPTO_DEV_CCP
529543
bool "Support for AMD Cryptographic Coprocessor"
530544
depends on ((X86 && PCI) || (ARM64 && (OF_ADDRESS || ACPI))) && HAS_IOMEM

‎drivers/crypto/Makefile‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
obj-$(CONFIG_CRYPTO_DEV_ATMEL_AES) += atmel-aes.o
22
obj-$(CONFIG_CRYPTO_DEV_ATMEL_SHA) += atmel-sha.o
33
obj-$(CONFIG_CRYPTO_DEV_ATMEL_TDES) += atmel-tdes.o
4+
obj-$(CONFIG_CRYPTO_DEV_ATMEL_ECC) += atmel-ecc.o
45
obj-$(CONFIG_CRYPTO_DEV_BFIN_CRC) += bfin_crc.o
56
obj-$(CONFIG_CRYPTO_DEV_CAVIUM_ZIP) += cavium/
67
obj-$(CONFIG_CRYPTO_DEV_CCP) += ccp/

0 commit comments

Comments
 (0)