Skip to content

Commit 3c4b239

Browse files
Salvatore Benedettoherbertx
authored andcommitted
crypto: ecdh - Add ECDH software support
* Implement ECDH under kpp API * Provide ECC software support for curve P-192 and P-256. * Add kpp test for ECDH with data generated by OpenSSL Signed-off-by: Salvatore Benedetto <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
1 parent 802c7f1 commit 3c4b239

File tree

11 files changed

+1538
-0
lines changed

11 files changed

+1538
-0
lines changed

crypto/Kconfig

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,11 @@ config CRYPTO_DH
118118
help
119119
Generic implementation of the Diffie-Hellman algorithm.
120120

121+
config CRYPTO_ECDH
122+
tristate "ECDH algorithm"
123+
select CRYTPO_KPP
124+
help
125+
Generic implementation of the ECDH algorithm
121126

122127
config CRYPTO_MANAGER
123128
tristate "Cryptographic algorithm manager"

crypto/Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ obj-$(CONFIG_CRYPTO_KPP2) += kpp.o
3535
dh_generic-y := dh.o
3636
dh_generic-y += dh_helper.o
3737
obj-$(CONFIG_CRYPTO_DH) += dh_generic.o
38+
ecdh_generic-y := ecc.o
39+
ecdh_generic-y += ecdh.o
40+
ecdh_generic-y += ecdh_helper.o
41+
obj-$(CONFIG_CRYPTO_ECDH) += ecdh_generic.o
3842

3943
$(obj)/rsapubkey-asn1.o: $(obj)/rsapubkey-asn1.c $(obj)/rsapubkey-asn1.h
4044
$(obj)/rsaprivkey-asn1.o: $(obj)/rsaprivkey-asn1.c $(obj)/rsaprivkey-asn1.h

0 commit comments

Comments
 (0)