Skip to content
/ linux Public
forked from torvalds/linux

Commit

Permalink
crypto: ecc - Move ecc.h to include/crypto/internal
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
  • Loading branch information
dalessan authored and herbertx committed Oct 29, 2021
1 parent 1730c5a commit a745d3a
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion crypto/ecc.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@
#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 {
Expand Down
2 changes: 1 addition & 1 deletion crypto/ecdh.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion crypto/ecdsa.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion crypto/ecrdsa.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
#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)
Expand Down
2 changes: 1 addition & 1 deletion crypto/ecrdsa_defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
File renamed without changes.

0 comments on commit a745d3a

Please sign in to comment.