diff options
author | Yashpal Dutta <yashpal.dutta@freescale.com> | 2012-12-10 23:32:13 (GMT) |
---|---|---|
committer | Rivera Jose-B46482 <German.Rivera@freescale.com> | 2013-10-09 20:10:20 (GMT) |
commit | ae361bb7fb946a230c366d4f257fe8476dec01ad (patch) | |
tree | 144d61fefbf3f0046403573e03bb6aee304db156 /include/crypto | |
parent | dfd7db444fa8588e37a1ceda7bd291f65ea53109 (diff) | |
download | linux-fsl-qoriq-ae361bb7fb946a230c366d4f257fe8476dec01ad.tar.xz |
Support for Public Key Cryptography in CryptoAPI
Public Key Cryptography added in Linux CryptoAPI. CryptoAPI till now
only supports symmetric ciphers and Digests. With support for asymmetric
ciphers, any cryptographic accelerator driver will be able to registers
its asymmetric cipher primitive functions
Signed-off-by: Yashpal Dutta <yashpal.dutta@freescale.com>
Change-Id: I9af49fb2c40cec0f5ecb73da15b6e738ed3987b6
Reviewed-on: http://git.am.freescale.net:8181/5447
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Rivera Jose-B46482 <German.Rivera@freescale.com>
Diffstat (limited to 'include/crypto')
-rw-r--r-- | include/crypto/algapi.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/crypto/algapi.h b/include/crypto/algapi.h index 418d270..4f5f331 100644 --- a/include/crypto/algapi.h +++ b/include/crypto/algapi.h @@ -125,6 +125,7 @@ struct ablkcipher_walk { extern const struct crypto_type crypto_ablkcipher_type; extern const struct crypto_type crypto_aead_type; extern const struct crypto_type crypto_blkcipher_type; +extern const struct crypto_type crypto_pkc_type; void crypto_mod_put(struct crypto_alg *alg); @@ -227,6 +228,11 @@ static inline void *crypto_ablkcipher_ctx(struct crypto_ablkcipher *tfm) return crypto_tfm_ctx(&tfm->base); } +static inline void *crypto_pkc_ctx(struct crypto_pkc *tfm) +{ + return crypto_tfm_ctx(&tfm->base); +} + static inline void *crypto_ablkcipher_ctx_aligned(struct crypto_ablkcipher *tfm) { return crypto_tfm_ctx_aligned(&tfm->base); @@ -386,5 +392,11 @@ static inline int crypto_requires_sync(u32 type, u32 mask) return (type ^ CRYPTO_ALG_ASYNC) & mask & CRYPTO_ALG_ASYNC; } +/* RSA Request Completion handler */ +static inline void pkc_request_complete(struct pkc_request *req, + int err) +{ + req->base.complete(&req->base, err); +} #endif /* _CRYPTO_ALGAPI_H */ |