diff options
author | Scott Wood <scottwood@freescale.com> | 2014-04-07 23:49:35 (GMT) |
---|---|---|
committer | Scott Wood <scottwood@freescale.com> | 2014-04-07 23:49:35 (GMT) |
commit | 62b8c978ee6b8d135d9e7953221de58000dba986 (patch) | |
tree | 683b04b2e627f6710c22c151b23c8cc9a165315e /include/crypto | |
parent | 78fd82238d0e5716578c326404184a27ba67fd6e (diff) | |
download | linux-fsl-qoriq-62b8c978ee6b8d135d9e7953221de58000dba986.tar.xz |
Rewind v3.13-rc3+ (78fd82238d0e5716) to v3.12
Diffstat (limited to 'include/crypto')
-rw-r--r-- | include/crypto/ablk_helper.h | 31 | ||||
-rw-r--r-- | include/crypto/algapi.h | 18 | ||||
-rw-r--r-- | include/crypto/authenc.h | 12 | ||||
-rw-r--r-- | include/crypto/hash_info.h | 40 | ||||
-rw-r--r-- | include/crypto/public_key.h | 25 | ||||
-rw-r--r-- | include/crypto/scatterwalk.h | 3 |
6 files changed, 19 insertions, 110 deletions
diff --git a/include/crypto/ablk_helper.h b/include/crypto/ablk_helper.h deleted file mode 100644 index 4f93df5..0000000 --- a/include/crypto/ablk_helper.h +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Shared async block cipher helpers - */ - -#ifndef _CRYPTO_ABLK_HELPER_H -#define _CRYPTO_ABLK_HELPER_H - -#include <linux/crypto.h> -#include <linux/kernel.h> -#include <crypto/cryptd.h> - -struct async_helper_ctx { - struct cryptd_ablkcipher *cryptd_tfm; -}; - -extern int ablk_set_key(struct crypto_ablkcipher *tfm, const u8 *key, - unsigned int key_len); - -extern int __ablk_encrypt(struct ablkcipher_request *req); - -extern int ablk_encrypt(struct ablkcipher_request *req); - -extern int ablk_decrypt(struct ablkcipher_request *req); - -extern void ablk_exit(struct crypto_tfm *tfm); - -extern int ablk_init_common(struct crypto_tfm *tfm, const char *drv_name); - -extern int ablk_init(struct crypto_tfm *tfm); - -#endif /* _CRYPTO_ABLK_HELPER_H */ diff --git a/include/crypto/algapi.h b/include/crypto/algapi.h index e73c19e..418d270 100644 --- a/include/crypto/algapi.h +++ b/include/crypto/algapi.h @@ -386,21 +386,5 @@ static inline int crypto_requires_sync(u32 type, u32 mask) return (type ^ CRYPTO_ALG_ASYNC) & mask & CRYPTO_ALG_ASYNC; } -noinline unsigned long __crypto_memneq(const void *a, const void *b, size_t size); - -/** - * crypto_memneq - Compare two areas of memory without leaking - * timing information. - * - * @a: One area of memory - * @b: Another area of memory - * @size: The size of the area. - * - * Returns 0 when data is equal, 1 otherwise. - */ -static inline int crypto_memneq(const void *a, const void *b, size_t size) -{ - return __crypto_memneq(a, b, size) != 0UL ? 1 : 0; -} - #endif /* _CRYPTO_ALGAPI_H */ + diff --git a/include/crypto/authenc.h b/include/crypto/authenc.h index 6775059..e47b044 100644 --- a/include/crypto/authenc.h +++ b/include/crypto/authenc.h @@ -23,15 +23,5 @@ struct crypto_authenc_key_param { __be32 enckeylen; }; -struct crypto_authenc_keys { - const u8 *authkey; - const u8 *enckey; - - unsigned int authkeylen; - unsigned int enckeylen; -}; - -int crypto_authenc_extractkeys(struct crypto_authenc_keys *keys, const u8 *key, - unsigned int keylen); - #endif /* _CRYPTO_AUTHENC_H */ + diff --git a/include/crypto/hash_info.h b/include/crypto/hash_info.h deleted file mode 100644 index e1e5a3e..0000000 --- a/include/crypto/hash_info.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Hash Info: Hash algorithms information - * - * Copyright (c) 2013 Dmitry Kasatkin <d.kasatkin@samsung.com> - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the Free - * Software Foundation; either version 2 of the License, or (at your option) - * any later version. - * - */ - -#ifndef _CRYPTO_HASH_INFO_H -#define _CRYPTO_HASH_INFO_H - -#include <crypto/sha.h> -#include <crypto/md5.h> - -#include <uapi/linux/hash_info.h> - -/* not defined in include/crypto/ */ -#define RMD128_DIGEST_SIZE 16 -#define RMD160_DIGEST_SIZE 20 -#define RMD256_DIGEST_SIZE 32 -#define RMD320_DIGEST_SIZE 40 - -/* not defined in include/crypto/ */ -#define WP512_DIGEST_SIZE 64 -#define WP384_DIGEST_SIZE 48 -#define WP256_DIGEST_SIZE 32 - -/* not defined in include/crypto/ */ -#define TGR128_DIGEST_SIZE 16 -#define TGR160_DIGEST_SIZE 20 -#define TGR192_DIGEST_SIZE 24 - -extern const char *const hash_algo_name[HASH_ALGO__LAST]; -extern const int hash_digest_size[HASH_ALGO__LAST]; - -#endif /* _CRYPTO_HASH_INFO_H */ diff --git a/include/crypto/public_key.h b/include/crypto/public_key.h index fc09732..f5b0224 100644 --- a/include/crypto/public_key.h +++ b/include/crypto/public_key.h @@ -15,7 +15,6 @@ #define _LINUX_PUBLIC_KEY_H #include <linux/mpi.h> -#include <crypto/hash_info.h> enum pkey_algo { PKEY_ALGO_DSA, @@ -23,11 +22,21 @@ enum pkey_algo { PKEY_ALGO__LAST }; -extern const char *const pkey_algo_name[PKEY_ALGO__LAST]; -extern const struct public_key_algorithm *pkey_algo[PKEY_ALGO__LAST]; +extern const char *const pkey_algo[PKEY_ALGO__LAST]; -/* asymmetric key implementation supports only up to SHA224 */ -#define PKEY_HASH__LAST (HASH_ALGO_SHA224 + 1) +enum pkey_hash_algo { + PKEY_HASH_MD4, + PKEY_HASH_MD5, + PKEY_HASH_SHA1, + PKEY_HASH_RIPE_MD_160, + PKEY_HASH_SHA256, + PKEY_HASH_SHA384, + PKEY_HASH_SHA512, + PKEY_HASH_SHA224, + PKEY_HASH__LAST +}; + +extern const char *const pkey_hash_algo[PKEY_HASH__LAST]; enum pkey_id_type { PKEY_ID_PGP, /* OpenPGP generated key ID */ @@ -35,7 +44,7 @@ enum pkey_id_type { PKEY_ID_TYPE__LAST }; -extern const char *const pkey_id_type_name[PKEY_ID_TYPE__LAST]; +extern const char *const pkey_id_type[PKEY_ID_TYPE__LAST]; /* * Cryptographic data for the public-key subtype of the asymmetric key type. @@ -50,7 +59,6 @@ struct public_key { #define PKEY_CAN_DECRYPT 0x02 #define PKEY_CAN_SIGN 0x04 #define PKEY_CAN_VERIFY 0x08 - enum pkey_algo pkey_algo : 8; enum pkey_id_type id_type : 8; union { MPI mpi[5]; @@ -80,8 +88,7 @@ struct public_key_signature { u8 *digest; u8 digest_size; /* Number of bytes in digest */ u8 nr_mpi; /* Occupancy of mpi[] */ - enum pkey_algo pkey_algo : 8; - enum hash_algo pkey_hash_algo : 8; + enum pkey_hash_algo pkey_hash_algo : 8; union { MPI mpi[2]; struct { diff --git a/include/crypto/scatterwalk.h b/include/crypto/scatterwalk.h index 6a626a5..13621cc 100644 --- a/include/crypto/scatterwalk.h +++ b/include/crypto/scatterwalk.h @@ -36,7 +36,6 @@ static inline void scatterwalk_sg_chain(struct scatterlist *sg1, int num, { sg_set_page(&sg1[num - 1], (void *)sg2, 0, 0); sg1[num - 1].page_link &= ~0x02; - sg1[num - 1].page_link |= 0x01; } static inline struct scatterlist *scatterwalk_sg_next(struct scatterlist *sg) @@ -44,7 +43,7 @@ static inline struct scatterlist *scatterwalk_sg_next(struct scatterlist *sg) if (sg_is_last(sg)) return NULL; - return (++sg)->length ? sg : sg_chain_ptr(sg); + return (++sg)->length ? sg : (void *)sg_page(sg); } static inline void scatterwalk_crypto_chain(struct scatterlist *head, |