Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: hwrng: core - Prevent too-small buffer sizes hwrng: virtio-rng - Convert to new API hwrng: core - Replace u32 in driver API with byte array crypto: ansi_cprng - Move FIPS functions under CONFIG_CRYPTO_FIPS crypto: testmgr - Add ghash algorithm test before provide to users crypto: ghash-clmulni-intel - Put proper .data section in place crypto: ghash-clmulni-intel - Use gas macro for PCLMULQDQ-NI and PSHUFB crypto: aesni-intel - Use gas macro for AES-NI instructions x86: Generate .byte code for some new instructions via gas macro crypto: ghash-intel - Fix irq_fpu_usable usage crypto: ghash-intel - Add PSHUFB macros crypto: ghash-intel - Hard-code pshufb crypto: ghash-intel - Fix building failure on x86_32 crypto: testmgr - Fix warning crypto: ansi_cprng - Fix test in get_prng_bytes crypto: hash - Remove cra_u.{digest,hash} crypto: api - Remove digest case from procfs show handler crypto: hash - Remove legacy hash/digest code crypto: ansi_cprng - Add FIPS wrapper crypto: ghash - Add PCLMULQDQ accelerated implementation
This commit is contained in:
@ -250,29 +250,6 @@ struct cipher_alg {
|
||||
void (*cia_decrypt)(struct crypto_tfm *tfm, u8 *dst, const u8 *src);
|
||||
};
|
||||
|
||||
struct digest_alg {
|
||||
unsigned int dia_digestsize;
|
||||
void (*dia_init)(struct crypto_tfm *tfm);
|
||||
void (*dia_update)(struct crypto_tfm *tfm, const u8 *data,
|
||||
unsigned int len);
|
||||
void (*dia_final)(struct crypto_tfm *tfm, u8 *out);
|
||||
int (*dia_setkey)(struct crypto_tfm *tfm, const u8 *key,
|
||||
unsigned int keylen);
|
||||
};
|
||||
|
||||
struct hash_alg {
|
||||
int (*init)(struct hash_desc *desc);
|
||||
int (*update)(struct hash_desc *desc, struct scatterlist *sg,
|
||||
unsigned int nbytes);
|
||||
int (*final)(struct hash_desc *desc, u8 *out);
|
||||
int (*digest)(struct hash_desc *desc, struct scatterlist *sg,
|
||||
unsigned int nbytes, u8 *out);
|
||||
int (*setkey)(struct crypto_hash *tfm, const u8 *key,
|
||||
unsigned int keylen);
|
||||
|
||||
unsigned int digestsize;
|
||||
};
|
||||
|
||||
struct compress_alg {
|
||||
int (*coa_compress)(struct crypto_tfm *tfm, const u8 *src,
|
||||
unsigned int slen, u8 *dst, unsigned int *dlen);
|
||||
@ -293,8 +270,6 @@ struct rng_alg {
|
||||
#define cra_aead cra_u.aead
|
||||
#define cra_blkcipher cra_u.blkcipher
|
||||
#define cra_cipher cra_u.cipher
|
||||
#define cra_digest cra_u.digest
|
||||
#define cra_hash cra_u.hash
|
||||
#define cra_compress cra_u.compress
|
||||
#define cra_rng cra_u.rng
|
||||
|
||||
@ -320,8 +295,6 @@ struct crypto_alg {
|
||||
struct aead_alg aead;
|
||||
struct blkcipher_alg blkcipher;
|
||||
struct cipher_alg cipher;
|
||||
struct digest_alg digest;
|
||||
struct hash_alg hash;
|
||||
struct compress_alg compress;
|
||||
struct rng_alg rng;
|
||||
} cra_u;
|
||||
|
@ -22,10 +22,12 @@
|
||||
* @cleanup: Cleanup callback (can be NULL).
|
||||
* @data_present: Callback to determine if data is available
|
||||
* on the RNG. If NULL, it is assumed that
|
||||
* there is always data available.
|
||||
* there is always data available. *OBSOLETE*
|
||||
* @data_read: Read data from the RNG device.
|
||||
* Returns the number of lower random bytes in "data".
|
||||
* Must not be NULL.
|
||||
* Must not be NULL. *OSOLETE*
|
||||
* @read: New API. drivers can fill up to max bytes of data
|
||||
* into the buffer. The buffer is aligned for any type.
|
||||
* @priv: Private data, for use by the RNG driver.
|
||||
*/
|
||||
struct hwrng {
|
||||
@ -34,6 +36,7 @@ struct hwrng {
|
||||
void (*cleanup)(struct hwrng *rng);
|
||||
int (*data_present)(struct hwrng *rng, int wait);
|
||||
int (*data_read)(struct hwrng *rng, u32 *data);
|
||||
int (*read)(struct hwrng *rng, void *data, size_t max, bool wait);
|
||||
unsigned long priv;
|
||||
|
||||
/* internal. */
|
||||
|
Reference in New Issue
Block a user