Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Enumerations | Functions
crypto.h File Reference
#include <linux/atomic.h>
#include <linux/kernel.h>
#include <linux/list.h>
#include <linux/bug.h>
#include <linux/slab.h>
#include <linux/string.h>
#include <linux/uaccess.h>

Go to the source code of this file.

Data Structures

struct  crypto_async_request
 
struct  ablkcipher_request
 
struct  aead_request
 
struct  blkcipher_desc
 
struct  cipher_desc
 
struct  hash_desc
 
struct  ablkcipher_alg
 
struct  aead_alg
 
struct  blkcipher_alg
 
struct  cipher_alg
 
struct  compress_alg
 
struct  rng_alg
 
struct  crypto_alg
 
struct  ablkcipher_tfm
 
struct  aead_tfm
 
struct  blkcipher_tfm
 
struct  cipher_tfm
 
struct  hash_tfm
 
struct  compress_tfm
 
struct  rng_tfm
 
struct  crypto_tfm
 
struct  crypto_ablkcipher
 
struct  crypto_aead
 
struct  crypto_blkcipher
 
struct  crypto_cipher
 
struct  crypto_comp
 
struct  crypto_hash
 
struct  crypto_rng
 
struct  crypto_attr_alg
 
struct  crypto_attr_type
 
struct  crypto_attr_u32
 

Macros

#define CRYPTO_ALG_TYPE_MASK   0x0000000f
 
#define CRYPTO_ALG_TYPE_CIPHER   0x00000001
 
#define CRYPTO_ALG_TYPE_COMPRESS   0x00000002
 
#define CRYPTO_ALG_TYPE_AEAD   0x00000003
 
#define CRYPTO_ALG_TYPE_BLKCIPHER   0x00000004
 
#define CRYPTO_ALG_TYPE_ABLKCIPHER   0x00000005
 
#define CRYPTO_ALG_TYPE_GIVCIPHER   0x00000006
 
#define CRYPTO_ALG_TYPE_DIGEST   0x00000008
 
#define CRYPTO_ALG_TYPE_HASH   0x00000008
 
#define CRYPTO_ALG_TYPE_SHASH   0x00000009
 
#define CRYPTO_ALG_TYPE_AHASH   0x0000000a
 
#define CRYPTO_ALG_TYPE_RNG   0x0000000c
 
#define CRYPTO_ALG_TYPE_PCOMPRESS   0x0000000f
 
#define CRYPTO_ALG_TYPE_HASH_MASK   0x0000000e
 
#define CRYPTO_ALG_TYPE_AHASH_MASK   0x0000000c
 
#define CRYPTO_ALG_TYPE_BLKCIPHER_MASK   0x0000000c
 
#define CRYPTO_ALG_LARVAL   0x00000010
 
#define CRYPTO_ALG_DEAD   0x00000020
 
#define CRYPTO_ALG_DYING   0x00000040
 
#define CRYPTO_ALG_ASYNC   0x00000080
 
#define CRYPTO_ALG_NEED_FALLBACK   0x00000100
 
#define CRYPTO_ALG_GENIV   0x00000200
 
#define CRYPTO_ALG_TESTED   0x00000400
 
#define CRYPTO_ALG_INSTANCE   0x00000800
 
#define CRYPTO_ALG_KERN_DRIVER_ONLY   0x00001000
 
#define CRYPTO_TFM_REQ_MASK   0x000fff00
 
#define CRYPTO_TFM_RES_MASK   0xfff00000
 
#define CRYPTO_TFM_REQ_WEAK_KEY   0x00000100
 
#define CRYPTO_TFM_REQ_MAY_SLEEP   0x00000200
 
#define CRYPTO_TFM_REQ_MAY_BACKLOG   0x00000400
 
#define CRYPTO_TFM_RES_WEAK_KEY   0x00100000
 
#define CRYPTO_TFM_RES_BAD_KEY_LEN   0x00200000
 
#define CRYPTO_TFM_RES_BAD_KEY_SCHED   0x00400000
 
#define CRYPTO_TFM_RES_BAD_BLOCK_LEN   0x00800000
 
#define CRYPTO_TFM_RES_BAD_FLAGS   0x01000000
 
#define CRYPTO_MAX_ALG_NAME   64
 
#define CRYPTO_MINALIGN   ARCH_KMALLOC_MINALIGN
 
#define CRYPTO_MINALIGN_ATTR   __attribute__ ((__aligned__(CRYPTO_MINALIGN)))
 
#define cra_ablkcipher   cra_u.ablkcipher
 
#define cra_aead   cra_u.aead
 
#define cra_blkcipher   cra_u.blkcipher
 
#define cra_cipher   cra_u.cipher
 
#define cra_compress   cra_u.compress
 
#define cra_rng   cra_u.rng
 
#define crt_ablkcipher   crt_u.ablkcipher
 
#define crt_aead   crt_u.aead
 
#define crt_blkcipher   crt_u.blkcipher
 
#define crt_cipher   crt_u.cipher
 
#define crt_hash   crt_u.hash
 
#define crt_compress   crt_u.compress
 
#define crt_rng   crt_u.rng
 
#define CRYPTOA_MAX   (__CRYPTOA_MAX - 1)
 
#define CRYPTO_MAX_ATTRS   32
 

Typedefs

typedef void(* crypto_completion_t )(struct crypto_async_request *req, int err)
 

Enumerations

enum  {
  CRYPTOA_UNSPEC, CRYPTOA_ALG, CRYPTOA_TYPE, CRYPTOA_U32,
  __CRYPTOA_MAX
}
 

Functions

int crypto_register_alg (struct crypto_alg *alg)
 
int crypto_unregister_alg (struct crypto_alg *alg)
 
int crypto_register_algs (struct crypto_alg *algs, int count)
 
int crypto_unregister_algs (struct crypto_alg *algs, int count)
 
int crypto_has_alg (const char *name, u32 type, u32 mask)
 
struct crypto_tfmcrypto_alloc_base (const char *alg_name, u32 type, u32 mask)
 
void crypto_destroy_tfm (void *mem, struct crypto_tfm *tfm)
 
int alg_test (const char *driver, const char *alg, u32 type, u32 mask)
 
struct crypto_ablkciphercrypto_alloc_ablkcipher (const char *alg_name, u32 type, u32 mask)
 
struct crypto_aeadcrypto_alloc_aead (const char *alg_name, u32 type, u32 mask)
 
int crypto_aead_setauthsize (struct crypto_aead *tfm, unsigned int authsize)
 

Macro Definition Documentation

#define cra_ablkcipher   cra_u.ablkcipher

Definition at line 273 of file crypto.h.

#define cra_aead   cra_u.aead

Definition at line 274 of file crypto.h.

#define cra_blkcipher   cra_u.blkcipher

Definition at line 275 of file crypto.h.

#define cra_cipher   cra_u.cipher

Definition at line 276 of file crypto.h.

#define cra_compress   cra_u.compress

Definition at line 277 of file crypto.h.

#define cra_rng   cra_u.rng

Definition at line 278 of file crypto.h.

#define crt_ablkcipher   crt_u.ablkcipher

Definition at line 405 of file crypto.h.

#define crt_aead   crt_u.aead

Definition at line 406 of file crypto.h.

#define crt_blkcipher   crt_u.blkcipher

Definition at line 407 of file crypto.h.

#define crt_cipher   crt_u.cipher

Definition at line 408 of file crypto.h.

#define crt_compress   crt_u.compress

Definition at line 410 of file crypto.h.

#define crt_hash   crt_u.hash

Definition at line 409 of file crypto.h.

#define crt_rng   crt_u.rng

Definition at line 411 of file crypto.h.

#define CRYPTO_ALG_ASYNC   0x00000080

Definition at line 52 of file crypto.h.

#define CRYPTO_ALG_DEAD   0x00000020

Definition at line 50 of file crypto.h.

#define CRYPTO_ALG_DYING   0x00000040

Definition at line 51 of file crypto.h.

#define CRYPTO_ALG_GENIV   0x00000200

Definition at line 64 of file crypto.h.

#define CRYPTO_ALG_INSTANCE   0x00000800

Definition at line 77 of file crypto.h.

#define CRYPTO_ALG_KERN_DRIVER_ONLY   0x00001000

Definition at line 82 of file crypto.h.

#define CRYPTO_ALG_LARVAL   0x00000010

Definition at line 49 of file crypto.h.

#define CRYPTO_ALG_NEED_FALLBACK   0x00000100

Definition at line 58 of file crypto.h.

#define CRYPTO_ALG_TESTED   0x00000400

Definition at line 72 of file crypto.h.

#define CRYPTO_ALG_TYPE_ABLKCIPHER   0x00000005

Definition at line 36 of file crypto.h.

#define CRYPTO_ALG_TYPE_AEAD   0x00000003

Definition at line 34 of file crypto.h.

#define CRYPTO_ALG_TYPE_AHASH   0x0000000a

Definition at line 41 of file crypto.h.

#define CRYPTO_ALG_TYPE_AHASH_MASK   0x0000000c

Definition at line 46 of file crypto.h.

#define CRYPTO_ALG_TYPE_BLKCIPHER   0x00000004

Definition at line 35 of file crypto.h.

#define CRYPTO_ALG_TYPE_BLKCIPHER_MASK   0x0000000c

Definition at line 47 of file crypto.h.

#define CRYPTO_ALG_TYPE_CIPHER   0x00000001

Definition at line 32 of file crypto.h.

#define CRYPTO_ALG_TYPE_COMPRESS   0x00000002

Definition at line 33 of file crypto.h.

#define CRYPTO_ALG_TYPE_DIGEST   0x00000008

Definition at line 38 of file crypto.h.

#define CRYPTO_ALG_TYPE_GIVCIPHER   0x00000006

Definition at line 37 of file crypto.h.

#define CRYPTO_ALG_TYPE_HASH   0x00000008

Definition at line 39 of file crypto.h.

#define CRYPTO_ALG_TYPE_HASH_MASK   0x0000000e

Definition at line 45 of file crypto.h.

#define CRYPTO_ALG_TYPE_MASK   0x0000000f

Definition at line 31 of file crypto.h.

#define CRYPTO_ALG_TYPE_PCOMPRESS   0x0000000f

Definition at line 43 of file crypto.h.

#define CRYPTO_ALG_TYPE_RNG   0x0000000c

Definition at line 42 of file crypto.h.

#define CRYPTO_ALG_TYPE_SHASH   0x00000009

Definition at line 40 of file crypto.h.

#define CRYPTO_MAX_ALG_NAME   64

Definition at line 102 of file crypto.h.

#define CRYPTO_MAX_ATTRS   32

Definition at line 473 of file crypto.h.

#define CRYPTO_MINALIGN   ARCH_KMALLOC_MINALIGN

Definition at line 112 of file crypto.h.

#define CRYPTO_MINALIGN_ATTR   __attribute__ ((__aligned__(CRYPTO_MINALIGN)))

Definition at line 114 of file crypto.h.

#define CRYPTO_TFM_REQ_MASK   0x000fff00

Definition at line 87 of file crypto.h.

#define CRYPTO_TFM_REQ_MAY_BACKLOG   0x00000400

Definition at line 92 of file crypto.h.

#define CRYPTO_TFM_REQ_MAY_SLEEP   0x00000200

Definition at line 91 of file crypto.h.

#define CRYPTO_TFM_REQ_WEAK_KEY   0x00000100

Definition at line 90 of file crypto.h.

#define CRYPTO_TFM_RES_BAD_BLOCK_LEN   0x00800000

Definition at line 96 of file crypto.h.

#define CRYPTO_TFM_RES_BAD_FLAGS   0x01000000

Definition at line 97 of file crypto.h.

#define CRYPTO_TFM_RES_BAD_KEY_LEN   0x00200000

Definition at line 94 of file crypto.h.

#define CRYPTO_TFM_RES_BAD_KEY_SCHED   0x00400000

Definition at line 95 of file crypto.h.

#define CRYPTO_TFM_RES_MASK   0xfff00000

Definition at line 88 of file crypto.h.

#define CRYPTO_TFM_RES_WEAK_KEY   0x00100000

Definition at line 93 of file crypto.h.

#define CRYPTOA_MAX   (__CRYPTOA_MAX - 1)

Definition at line 470 of file crypto.h.

Typedef Documentation

typedef void(* crypto_completion_t)(struct crypto_async_request *req, int err)

Definition at line 128 of file crypto.h.

Enumeration Type Documentation

anonymous enum
Enumerator:
CRYPTOA_UNSPEC 
CRYPTOA_ALG 
CRYPTOA_TYPE 
CRYPTOA_U32 
__CRYPTOA_MAX 

Definition at line 462 of file crypto.h.

Function Documentation

int alg_test ( const char driver,
const char alg,
u32  type,
u32  mask 
)

Definition at line 3269 of file testmgr.c.

int crypto_aead_setauthsize ( struct crypto_aead tfm,
unsigned int  authsize 
)

Definition at line 62 of file aead.c.

struct crypto_ablkcipher* crypto_alloc_ablkcipher ( const char alg_name,
u32  type,
u32  mask 
)
read

Definition at line 675 of file ablkcipher.c.

struct crypto_aead* crypto_alloc_aead ( const char alg_name,
u32  type,
u32  mask 
)
read

Definition at line 528 of file aead.c.

struct crypto_tfm* crypto_alloc_base ( const char alg_name,
u32  type,
u32  mask 
)
read

Definition at line 415 of file api.c.

void crypto_destroy_tfm ( void mem,
struct crypto_tfm tfm 
)

Definition at line 574 of file api.c.

int crypto_has_alg ( const char name,
u32  type,
u32  mask 
)

Definition at line 591 of file api.c.

int crypto_register_alg ( struct crypto_alg alg)

Definition at line 335 of file algapi.c.

int crypto_register_algs ( struct crypto_alg algs,
int  count 
)

Definition at line 391 of file algapi.c.

int crypto_unregister_alg ( struct crypto_alg alg)

Definition at line 370 of file algapi.c.

int crypto_unregister_algs ( struct crypto_alg algs,
int  count 
)

Definition at line 411 of file algapi.c.