]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
crypto: ecc - Move ecc.h to include/crypto/internal
authorDaniele Alessandrelli <daniele.alessandrelli@intel.com>
Wed, 20 Oct 2021 10:35:35 +0000 (11:35 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 29 Oct 2021 13:04:03 +0000 (21:04 +0800)
Move ecc.h header file to 'include/crypto/internal' so that it can be
easily imported from everywhere in the kernel tree.

This change is done to allow crypto device drivers to re-use the symbols
exported by 'crypto/ecc.c', thus avoiding code duplication.

Signed-off-by: Daniele Alessandrelli <daniele.alessandrelli@intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/ecc.c
crypto/ecdh.c
crypto/ecdsa.c
crypto/ecrdsa.c
crypto/ecrdsa_defs.h
include/crypto/internal/ecc.h [moved from crypto/ecc.h with 100% similarity]

index afc6cefdc1d9ef0fa6e683c5047afd18c323230e..80efc9b4eb69a22b1e6df42654b0b1edcecacd03 100644 (file)
 #include <linux/fips.h>
 #include <crypto/ecdh.h>
 #include <crypto/rng.h>
+#include <crypto/internal/ecc.h>
 #include <asm/unaligned.h>
 #include <linux/ratelimit.h>
 
-#include "ecc.h"
 #include "ecc_curve_defs.h"
 
 typedef struct {
index c6f61c2211dc7de076947a06fdfd90cd68f9e58b..e4857d534344f56c826d6dc4893efbaf932ee72e 100644 (file)
@@ -6,11 +6,11 @@
  */
 
 #include <linux/module.h>
+#include <crypto/internal/ecc.h>
 #include <crypto/internal/kpp.h>
 #include <crypto/kpp.h>
 #include <crypto/ecdh.h>
 #include <linux/scatterlist.h>
-#include "ecc.h"
 
 struct ecdh_ctx {
        unsigned int curve_id;
index 1e7b15009bf6314d1cff33adb34c193682e6f757..b3a8a6b572ba9ed71b1224cd67101c8b2d94200a 100644 (file)
@@ -5,12 +5,12 @@
 
 #include <linux/module.h>
 #include <crypto/internal/akcipher.h>
+#include <crypto/internal/ecc.h>
 #include <crypto/akcipher.h>
 #include <crypto/ecdh.h>
 #include <linux/asn1_decoder.h>
 #include <linux/scatterlist.h>
 
-#include "ecc.h"
 #include "ecdsasignature.asn1.h"
 
 struct ecc_ctx {
index 6a3fd09057d0c96de203837f1006d7dc431bce7e..b32ffcaad9adfcf49ac67c53af668d10aea3ab88 100644 (file)
 #include <linux/crypto.h>
 #include <crypto/streebog.h>
 #include <crypto/internal/akcipher.h>
+#include <crypto/internal/ecc.h>
 #include <crypto/akcipher.h>
 #include <linux/oid_registry.h>
 #include <linux/scatterlist.h>
 #include "ecrdsa_params.asn1.h"
 #include "ecrdsa_pub_key.asn1.h"
-#include "ecc.h"
 #include "ecrdsa_defs.h"
 
 #define ECRDSA_MAX_SIG_SIZE (2 * 512 / 8)
index 170baf0390072fc7950ae6c49a45d5cc9958fd5e..0056335b9d03a14e9db837d62f49b1871592ddac 100644 (file)
@@ -13,7 +13,7 @@
 #ifndef _CRYTO_ECRDSA_DEFS_H
 #define _CRYTO_ECRDSA_DEFS_H
 
-#include "ecc.h"
+#include <crypto/internal/ecc.h>
 
 #define ECRDSA_MAX_SIG_SIZE (2 * 512 / 8)
 #define ECRDSA_MAX_DIGITS (512 / 64)
similarity index 100%
rename from crypto/ecc.h
rename to include/crypto/internal/ecc.h