forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
crypto: remove cipher routines from public crypto API
The cipher routines in the crypto API are mostly intended for templates implementing skcipher modes generically in software, and shouldn't be used outside of the crypto subsystem. So move the prototypes and all related definitions to a new header file under include/crypto/internal. Also, let's use the new module namespace feature to move the symbol exports into a new namespace CRYPTO_INTERNAL. Signed-off-by: Ard Biesheuvel <[email protected]> Acked-by: Eric Biggers <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
- Loading branch information
1 parent
a3b01ff
commit 0eb76ba
Showing
33 changed files
with
273 additions
and
207 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,6 +32,7 @@ | |
|
||
#include <crypto/b128ops.h> | ||
#include <crypto/chacha.h> | ||
#include <crypto/internal/cipher.h> | ||
#include <crypto/internal/hash.h> | ||
#include <crypto/internal/poly1305.h> | ||
#include <crypto/internal/skcipher.h> | ||
|
@@ -616,3 +617,4 @@ MODULE_DESCRIPTION("Adiantum length-preserving encryption mode"); | |
MODULE_LICENSE("GPL v2"); | ||
MODULE_AUTHOR("Eric Biggers <[email protected]>"); | ||
MODULE_ALIAS_CRYPTO("adiantum"); | ||
MODULE_IMPORT_NS(CRYPTO_INTERNAL); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ | |
* (C) Neil Horman <[email protected]> | ||
*/ | ||
|
||
#include <crypto/internal/cipher.h> | ||
#include <crypto/internal/rng.h> | ||
#include <linux/err.h> | ||
#include <linux/init.h> | ||
|
@@ -470,3 +471,4 @@ subsys_initcall(prng_mod_init); | |
module_exit(prng_mod_fini); | ||
MODULE_ALIAS_CRYPTO("stdrng"); | ||
MODULE_ALIAS_CRYPTO("ansi_cprng"); | ||
MODULE_IMPORT_NS(CRYPTO_INTERNAL); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,7 @@ | |
* Author: Kazunori Miyazawa <[email protected]> | ||
*/ | ||
|
||
#include <crypto/internal/cipher.h> | ||
#include <crypto/internal/hash.h> | ||
#include <linux/err.h> | ||
#include <linux/kernel.h> | ||
|
@@ -313,3 +314,4 @@ module_exit(crypto_cmac_module_exit); | |
MODULE_LICENSE("GPL"); | ||
MODULE_DESCRIPTION("CMAC keyed hash algorithm"); | ||
MODULE_ALIAS_CRYPTO("cmac"); | ||
MODULE_IMPORT_NS(CRYPTO_INTERNAL); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -85,6 +85,7 @@ | |
#include <linux/crypto.h> | ||
#include <linux/scatterlist.h> | ||
#include <crypto/scatterwalk.h> | ||
#include <crypto/internal/cipher.h> | ||
#include <crypto/internal/skcipher.h> | ||
|
||
struct crypto_kw_block { | ||
|
@@ -316,3 +317,4 @@ MODULE_LICENSE("Dual BSD/GPL"); | |
MODULE_AUTHOR("Stephan Mueller <[email protected]>"); | ||
MODULE_DESCRIPTION("Key Wrapping (RFC3394 / NIST SP800-38F)"); | ||
MODULE_ALIAS_CRYPTO("kw"); | ||
MODULE_IMPORT_NS(CRYPTO_INTERNAL); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ | |
* Kazunori Miyazawa <[email protected]> | ||
*/ | ||
|
||
#include <crypto/internal/cipher.h> | ||
#include <crypto/internal/hash.h> | ||
#include <linux/err.h> | ||
#include <linux/kernel.h> | ||
|
@@ -272,3 +273,4 @@ module_exit(crypto_xcbc_module_exit); | |
MODULE_LICENSE("GPL"); | ||
MODULE_DESCRIPTION("XCBC keyed hash algorithm"); | ||
MODULE_ALIAS_CRYPTO("xcbc"); | ||
MODULE_IMPORT_NS(CRYPTO_INTERNAL); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ | |
* Based on ecb.c | ||
* Copyright (c) 2006 Herbert Xu <[email protected]> | ||
*/ | ||
#include <crypto/internal/cipher.h> | ||
#include <crypto/internal/skcipher.h> | ||
#include <crypto/scatterwalk.h> | ||
#include <linux/err.h> | ||
|
@@ -464,3 +465,4 @@ module_exit(xts_module_exit); | |
MODULE_LICENSE("GPL"); | ||
MODULE_DESCRIPTION("XTS block cipher mode"); | ||
MODULE_ALIAS_CRYPTO("xts"); | ||
MODULE_IMPORT_NS(CRYPTO_INTERNAL); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1999,3 +1999,4 @@ MODULE_AUTHOR("Ofer Heifetz <[email protected]>"); | |
MODULE_AUTHOR("Igal Liberman <[email protected]>"); | ||
MODULE_DESCRIPTION("Support for SafeXcel cryptographic engines: EIP97 & EIP197"); | ||
MODULE_LICENSE("GPL v2"); | ||
MODULE_IMPORT_NS(CRYPTO_INTERNAL); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.