diff options
Diffstat (limited to 'include/crypto/algapi.h')
-rw-r--r-- | include/crypto/algapi.h | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/include/crypto/algapi.h b/include/crypto/algapi.h index 4f5f331..eb07bd5 100644 --- a/include/crypto/algapi.h +++ b/include/crypto/algapi.h @@ -392,11 +392,21 @@ 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) +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) { - req->base.complete(&req->base, err); + return __crypto_memneq(a, b, size) != 0UL ? 1 : 0; } -#endif /* _CRYPTO_ALGAPI_H */ +#endif /* _CRYPTO_ALGAPI_H */ |