diff options
Diffstat (limited to 'include/crypto/algapi.h')
| -rw-r--r-- | include/crypto/algapi.h | 27 | 
1 files changed, 25 insertions, 2 deletions
diff --git a/include/crypto/algapi.h b/include/crypto/algapi.h index 418d270e180..016c2f110f6 100644 --- a/include/crypto/algapi.h +++ b/include/crypto/algapi.h @@ -100,9 +100,12 @@ struct blkcipher_walk {  	void *page;  	u8 *buffer;  	u8 *iv; +	unsigned int ivsize;  	int flags; -	unsigned int blocksize; +	unsigned int walk_blocksize; +	unsigned int cipher_blocksize; +	unsigned int alignmask;  };  struct ablkcipher_walk { @@ -192,6 +195,10 @@ int blkcipher_walk_phys(struct blkcipher_desc *desc,  int blkcipher_walk_virt_block(struct blkcipher_desc *desc,  			      struct blkcipher_walk *walk,  			      unsigned int blocksize); +int blkcipher_aead_walk_virt_block(struct blkcipher_desc *desc, +				   struct blkcipher_walk *walk, +				   struct crypto_aead *tfm, +				   unsigned int blocksize);  int ablkcipher_walk_done(struct ablkcipher_request *req,  			 struct ablkcipher_walk *walk, int err); @@ -386,5 +393,21 @@ static inline int crypto_requires_sync(u32 type, u32 mask)  	return (type ^ CRYPTO_ALG_ASYNC) & mask & CRYPTO_ALG_ASYNC;  } -#endif	/* _CRYPTO_ALGAPI_H */ +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 */  | 
