Skip to content

Commit

Permalink
crypto: atmel-ecc - introduce Microchip / Atmel ECC driver
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
  • Loading branch information
ambarus authored and herbertx committed Jul 18, 2017
1 parent 66d3994 commit 1110569
Show file tree
Hide file tree
Showing 5 changed files with 937 additions and 0 deletions.
13 changes: 13 additions & 0 deletions Documentation/devicetree/bindings/crypto/atmel-crypto.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,16 @@ sha@f8034000 {
dmas = <&dma1 2 17>;
dma-names = "tx";
};

* Eliptic Curve Cryptography (I2C)

Required properties:
- compatible : must be "atmel,atecc508a".
- reg: I2C bus address of the device.
- clock-frequency: must be present in the i2c controller node.

Example:
atecc508a@C0 {
compatible = "atmel,atecc508a";
reg = <0xC0>;
};
14 changes: 14 additions & 0 deletions drivers/crypto/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -525,6 +525,20 @@ config CRYPTO_DEV_ATMEL_SHA
To compile this driver as a module, choose M here: the module
will be called atmel-sha.

config CRYPTO_DEV_ATMEL_ECC
tristate "Support for Microchip / Atmel ECC hw accelerator"
depends on ARCH_AT91 || COMPILE_TEST
depends on I2C
select CRYPTO_ECDH
select CRC16
help
Microhip / Atmel ECC hw accelerator.
Select this if you want to use the Microchip / Atmel module for
ECDH algorithm.

To compile this driver as a module, choose M here: the module
will be called atmel-ecc.

config CRYPTO_DEV_CCP
bool "Support for AMD Cryptographic Coprocessor"
depends on ((X86 && PCI) || (ARM64 && (OF_ADDRESS || ACPI))) && HAS_IOMEM
Expand Down
1 change: 1 addition & 0 deletions drivers/crypto/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
obj-$(CONFIG_CRYPTO_DEV_ATMEL_AES) += atmel-aes.o
obj-$(CONFIG_CRYPTO_DEV_ATMEL_SHA) += atmel-sha.o
obj-$(CONFIG_CRYPTO_DEV_ATMEL_TDES) += atmel-tdes.o
obj-$(CONFIG_CRYPTO_DEV_ATMEL_ECC) += atmel-ecc.o
obj-$(CONFIG_CRYPTO_DEV_BFIN_CRC) += bfin_crc.o
obj-$(CONFIG_CRYPTO_DEV_CAVIUM_ZIP) += cavium/
obj-$(CONFIG_CRYPTO_DEV_CCP) += ccp/
Expand Down
Loading

0 comments on commit 1110569

Please sign in to comment.