Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
ixp4xx_crypto.c File Reference
#include <linux/platform_device.h>
#include <linux/dma-mapping.h>
#include <linux/dmapool.h>
#include <linux/crypto.h>
#include <linux/kernel.h>
#include <linux/rtnetlink.h>
#include <linux/interrupt.h>
#include <linux/spinlock.h>
#include <linux/gfp.h>
#include <linux/module.h>
#include <crypto/ctr.h>
#include <crypto/des.h>
#include <crypto/aes.h>
#include <crypto/sha.h>
#include <crypto/algapi.h>
#include <crypto/aead.h>
#include <crypto/authenc.h>
#include <crypto/scatterwalk.h>
#include <mach/npe.h>
#include <mach/qmgr.h>

Go to the source code of this file.

Data Structures

struct  buffer_desc
 
struct  crypt_ctl
 
struct  ablk_ctx
 
struct  aead_ctx
 
struct  ix_hash_algo
 
struct  ix_sa_dir
 
struct  ixp_ctx
 
struct  ixp_alg
 

Macros

#define MAX_KEYLEN   32
 
#define NPE_CTX_LEN   80
 
#define AES_BLOCK128   16
 
#define NPE_OP_HASH_VERIFY   0x01
 
#define NPE_OP_CCM_ENABLE   0x04
 
#define NPE_OP_CRYPT_ENABLE   0x08
 
#define NPE_OP_HASH_ENABLE   0x10
 
#define NPE_OP_NOT_IN_PLACE   0x20
 
#define NPE_OP_HMAC_DISABLE   0x40
 
#define NPE_OP_CRYPT_ENCRYPT   0x80
 
#define NPE_OP_CCM_GEN_MIC   0xcc
 
#define NPE_OP_HASH_GEN_ICV   0x50
 
#define NPE_OP_ENC_GEN_KEY   0xc9
 
#define MOD_ECB   0x0000
 
#define MOD_CTR   0x1000
 
#define MOD_CBC_ENC   0x2000
 
#define MOD_CBC_DEC   0x3000
 
#define MOD_CCM_ENC   0x4000
 
#define MOD_CCM_DEC   0x5000
 
#define KEYLEN_128   4
 
#define KEYLEN_192   6
 
#define KEYLEN_256   8
 
#define CIPH_DECR   0x0000
 
#define CIPH_ENCR   0x0400
 
#define MOD_DES   0x0000
 
#define MOD_TDEA2   0x0100
 
#define MOD_3DES   0x0200
 
#define MOD_AES   0x0800
 
#define MOD_AES128   (0x0800 | KEYLEN_128)
 
#define MOD_AES192   (0x0900 | KEYLEN_192)
 
#define MOD_AES256   (0x0a00 | KEYLEN_256)
 
#define MAX_IVLEN   16
 
#define NPE_ID   2 /* NPE C */
 
#define NPE_QLEN   16
 
#define NPE_QLEN_TOTAL   64
 
#define SEND_QID   29
 
#define RECV_QID   30
 
#define CTL_FLAG_UNUSED   0x0000
 
#define CTL_FLAG_USED   0x1000
 
#define CTL_FLAG_PERFORM_ABLK   0x0001
 
#define CTL_FLAG_GEN_ICV   0x0002
 
#define CTL_FLAG_GEN_REVAES   0x0004
 
#define CTL_FLAG_PERFORM_AEAD   0x0008
 
#define CTL_FLAG_MASK   0x000f
 
#define HMAC_IPAD_VALUE   0x36
 
#define HMAC_OPAD_VALUE   0x5C
 
#define HMAC_PAD_BLOCKLEN   SHA1_BLOCK_SIZE
 
#define MD5_DIGEST_SIZE   16
 
#define DRIVER_NAME   "ixp4xx_crypto"
 
#define IXP_POSTFIX   "-ixp4xx"
 

Functions

 module_init (ixp_module_init)
 
 module_exit (ixp_module_exit)
 
 MODULE_LICENSE ("GPL")
 
 MODULE_AUTHOR ("Christian Hohnstaedt <[email protected]>")
 
 MODULE_DESCRIPTION ("IXP4xx hardware crypto")
 

Macro Definition Documentation

#define AES_BLOCK128   16

Definition at line 39 of file ixp4xx_crypto.c.

#define CIPH_DECR   0x0000

Definition at line 64 of file ixp4xx_crypto.c.

#define CIPH_ENCR   0x0400

Definition at line 65 of file ixp4xx_crypto.c.

#define CTL_FLAG_GEN_ICV   0x0002

Definition at line 88 of file ixp4xx_crypto.c.

#define CTL_FLAG_GEN_REVAES   0x0004

Definition at line 89 of file ixp4xx_crypto.c.

#define CTL_FLAG_MASK   0x000f

Definition at line 91 of file ixp4xx_crypto.c.

#define CTL_FLAG_PERFORM_ABLK   0x0001

Definition at line 87 of file ixp4xx_crypto.c.

#define CTL_FLAG_PERFORM_AEAD   0x0008

Definition at line 90 of file ixp4xx_crypto.c.

#define CTL_FLAG_UNUSED   0x0000

Definition at line 85 of file ixp4xx_crypto.c.

#define CTL_FLAG_USED   0x1000

Definition at line 86 of file ixp4xx_crypto.c.

#define DRIVER_NAME   "ixp4xx_crypto"

Definition at line 226 of file ixp4xx_crypto.c.

#define HMAC_IPAD_VALUE   0x36

Definition at line 93 of file ixp4xx_crypto.c.

#define HMAC_OPAD_VALUE   0x5C

Definition at line 94 of file ixp4xx_crypto.c.

#define HMAC_PAD_BLOCKLEN   SHA1_BLOCK_SIZE

Definition at line 95 of file ixp4xx_crypto.c.

#define IXP_POSTFIX   "-ixp4xx"

Definition at line 1420 of file ixp4xx_crypto.c.

#define KEYLEN_128   4

Definition at line 60 of file ixp4xx_crypto.c.

#define KEYLEN_192   6

Definition at line 61 of file ixp4xx_crypto.c.

#define KEYLEN_256   8

Definition at line 62 of file ixp4xx_crypto.c.

#define MAX_IVLEN   16

Definition at line 75 of file ixp4xx_crypto.c.

#define MAX_KEYLEN   32

Definition at line 35 of file ixp4xx_crypto.c.

#define MD5_DIGEST_SIZE   16

Definition at line 97 of file ixp4xx_crypto.c.

#define MOD_3DES   0x0200

Definition at line 69 of file ixp4xx_crypto.c.

#define MOD_AES   0x0800

Definition at line 70 of file ixp4xx_crypto.c.

#define MOD_AES128   (0x0800 | KEYLEN_128)

Definition at line 71 of file ixp4xx_crypto.c.

#define MOD_AES192   (0x0900 | KEYLEN_192)

Definition at line 72 of file ixp4xx_crypto.c.

#define MOD_AES256   (0x0a00 | KEYLEN_256)

Definition at line 73 of file ixp4xx_crypto.c.

#define MOD_CBC_DEC   0x3000

Definition at line 56 of file ixp4xx_crypto.c.

#define MOD_CBC_ENC   0x2000

Definition at line 55 of file ixp4xx_crypto.c.

#define MOD_CCM_DEC   0x5000

Definition at line 58 of file ixp4xx_crypto.c.

#define MOD_CCM_ENC   0x4000

Definition at line 57 of file ixp4xx_crypto.c.

#define MOD_CTR   0x1000

Definition at line 54 of file ixp4xx_crypto.c.

#define MOD_DES   0x0000

Definition at line 67 of file ixp4xx_crypto.c.

#define MOD_ECB   0x0000

Definition at line 53 of file ixp4xx_crypto.c.

#define MOD_TDEA2   0x0100

Definition at line 68 of file ixp4xx_crypto.c.

#define NPE_CTX_LEN   80

Definition at line 38 of file ixp4xx_crypto.c.

#define NPE_ID   2 /* NPE C */

Definition at line 76 of file ixp4xx_crypto.c.

#define NPE_OP_CCM_ENABLE   0x04

Definition at line 42 of file ixp4xx_crypto.c.

#define NPE_OP_CCM_GEN_MIC   0xcc

Definition at line 49 of file ixp4xx_crypto.c.

#define NPE_OP_CRYPT_ENABLE   0x08

Definition at line 43 of file ixp4xx_crypto.c.

#define NPE_OP_CRYPT_ENCRYPT   0x80

Definition at line 47 of file ixp4xx_crypto.c.

#define NPE_OP_ENC_GEN_KEY   0xc9

Definition at line 51 of file ixp4xx_crypto.c.

#define NPE_OP_HASH_ENABLE   0x10

Definition at line 44 of file ixp4xx_crypto.c.

#define NPE_OP_HASH_GEN_ICV   0x50

Definition at line 50 of file ixp4xx_crypto.c.

#define NPE_OP_HASH_VERIFY   0x01

Definition at line 41 of file ixp4xx_crypto.c.

#define NPE_OP_HMAC_DISABLE   0x40

Definition at line 46 of file ixp4xx_crypto.c.

#define NPE_OP_NOT_IN_PLACE   0x20

Definition at line 45 of file ixp4xx_crypto.c.

#define NPE_QLEN   16

Definition at line 77 of file ixp4xx_crypto.c.

#define NPE_QLEN_TOTAL   64

Definition at line 80 of file ixp4xx_crypto.c.

#define RECV_QID   30

Definition at line 83 of file ixp4xx_crypto.c.

#define SEND_QID   29

Definition at line 82 of file ixp4xx_crypto.c.

Function Documentation

MODULE_AUTHOR ( "Christian Hohnstaedt <[email protected]>"  )
MODULE_DESCRIPTION ( "IXP4xx hardware crypto"  )
module_exit ( ixp_module_exit  )
module_init ( ixp_module_init  )
MODULE_LICENSE ( "GPL"  )