Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
crypto4xx_sa.h File Reference

Go to the source code of this file.

Data Structures

union  dynamic_sa_contents
 
union  sa_command_0
 
union  sa_command_1
 
struct  dynamic_sa_ctl
 
struct  sa_state_record
 
struct  dynamic_sa_aes128
 
struct  dynamic_sa_aes192
 
struct  dynamic_sa_aes256
 
struct  dynamic_sa_hash160
 

Macros

#define AES_IV_SIZE   16
 
#define DIR_OUTBOUND   0
 
#define DIR_INBOUND   1
 
#define SA_OP_GROUP_BASIC   0
 
#define SA_OPCODE_ENCRYPT   0
 
#define SA_OPCODE_DECRYPT   0
 
#define SA_OPCODE_HASH   3
 
#define SA_CIPHER_ALG_DES   0
 
#define SA_CIPHER_ALG_3DES   1
 
#define SA_CIPHER_ALG_ARC4   2
 
#define SA_CIPHER_ALG_AES   3
 
#define SA_CIPHER_ALG_KASUMI   4
 
#define SA_CIPHER_ALG_NULL   15
 
#define SA_HASH_ALG_MD5   0
 
#define SA_HASH_ALG_SHA1   1
 
#define SA_HASH_ALG_NULL   15
 
#define SA_HASH_ALG_SHA1_DIGEST_SIZE   20
 
#define SA_LOAD_HASH_FROM_SA   0
 
#define SA_LOAD_HASH_FROM_STATE   2
 
#define SA_NOT_LOAD_HASH   3
 
#define SA_LOAD_IV_FROM_SA   0
 
#define SA_LOAD_IV_FROM_INPUT   1
 
#define SA_LOAD_IV_FROM_STATE   2
 
#define SA_LOAD_IV_GEN_IV   3
 
#define SA_PAD_TYPE_CONSTANT   2
 
#define SA_PAD_TYPE_ZERO   3
 
#define SA_PAD_TYPE_TLS   5
 
#define SA_PAD_TYPE_DTLS   5
 
#define SA_NOT_SAVE_HASH   0
 
#define SA_SAVE_HASH   1
 
#define SA_NOT_SAVE_IV   0
 
#define SA_SAVE_IV   1
 
#define SA_HEADER_PROC   1
 
#define SA_NO_HEADER_PROC   0
 
#define CRYPTO_MODE_ECB   0
 
#define CRYPTO_MODE_CBC   1
 
#define CRYPTO_FEEDBACK_MODE_NO_FB   0
 
#define CRYPTO_FEEDBACK_MODE_64BIT_OFB   0
 
#define CRYPTO_FEEDBACK_MODE_8BIT_CFB   1
 
#define CRYPTO_FEEDBACK_MODE_1BIT_CFB   2
 
#define CRYPTO_FEEDBACK_MODE_128BIT_CFB   3
 
#define SA_AES_KEY_LEN_128   2
 
#define SA_AES_KEY_LEN_192   3
 
#define SA_AES_KEY_LEN_256   4
 
#define SA_REV2   1
 
#define SA_HASH_MODE_HASH   0
 
#define SA_HASH_MODE_HMAC   1
 
#define SA_MC_ENABLE   0
 
#define SA_MC_DISABLE   1
 
#define SA_NOT_COPY_HDR   0
 
#define SA_COPY_HDR   1
 
#define SA_NOT_COPY_PAD   0
 
#define SA_COPY_PAD   1
 
#define SA_NOT_COPY_PAYLOAD   0
 
#define SA_COPY_PAYLOAD   1
 
#define SA_EXTENDED_SN_OFF   0
 
#define SA_EXTENDED_SN_ON   1
 
#define SA_SEQ_MASK_OFF   0
 
#define SA_SEQ_MASK_ON   1
 
#define SA_AES128_LEN   (sizeof(struct dynamic_sa_aes128)/4)
 
#define SA_AES128_CONTENTS   0x3e000042
 
#define SA_AES192_LEN   (sizeof(struct dynamic_sa_aes192)/4)
 
#define SA_AES192_CONTENTS   0x3e000062
 
#define SA_AES256_LEN   (sizeof(struct dynamic_sa_aes256)/4)
 
#define SA_AES256_CONTENTS   0x3e000082
 
#define SA_AES_CONTENTS   0x3e000002
 
#define SA_HASH160_LEN   (sizeof(struct dynamic_sa_hash160)/4)
 
#define SA_HASH160_CONTENTS   0x2000a502
 

Functions

union dynamic_sa_contents __attribute__ ((packed))
 

Variables

struct {
   u32   arc4_state_ptr:1
 
   u32   arc4_ij_ptr:1
 
   u32   state_ptr:1
 
   u32   iv3:1
 
   u32   iv2:1
 
   u32   iv1:1
 
   u32   iv0:1
 
   u32   seq_num_mask3:1
 
   u32   seq_num_mask2:1
 
   u32   seq_num_mask1:1
 
   u32   seq_num_mask0:1
 
   u32   seq_num1:1
 
   u32   seq_num0:1
 
   u32   spi:1
 
   u32   outer_size:5
 
   u32   inner_size:5
 
   u32   key_size:4
 
   u32   cmd_size:4
 
bf
 
u32 w
 
u32 sa_contents
 
union sa_command_0 sa_command_0
 
union sa_command_1 sa_command_1
 
u32 save_hash_byte_cnt [2]
 
u32 save_digest [16]
 
struct dynamic_sa_ctl ctrl
 
u32 key [4]
 
u32 iv [4]
 
u32 reserved
 
u32 inner_digest [5]
 
u32 outer_digest [5]
 

Macro Definition Documentation

#define AES_IV_SIZE   16

AMCC SoC PPC4xx Crypto Driver

Copyright (c) 2008 Applied Micro Circuits Corporation. All rights reserved. James Hsiao jhsia[email protected][email protected][email protected]cc.co[email protected]m

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

This file defines the security context associate format.

Definition at line 24 of file crypto4xx_sa.h.

#define CRYPTO_FEEDBACK_MODE_128BIT_CFB   3

Definition at line 120 of file crypto4xx_sa.h.

#define CRYPTO_FEEDBACK_MODE_1BIT_CFB   2

Definition at line 119 of file crypto4xx_sa.h.

#define CRYPTO_FEEDBACK_MODE_64BIT_OFB   0

Definition at line 117 of file crypto4xx_sa.h.

#define CRYPTO_FEEDBACK_MODE_8BIT_CFB   1

Definition at line 118 of file crypto4xx_sa.h.

#define CRYPTO_FEEDBACK_MODE_NO_FB   0

Definition at line 116 of file crypto4xx_sa.h.

#define CRYPTO_MODE_CBC   1

Definition at line 114 of file crypto4xx_sa.h.

#define CRYPTO_MODE_ECB   0

Definition at line 113 of file crypto4xx_sa.h.

#define DIR_INBOUND   1

Definition at line 54 of file crypto4xx_sa.h.

#define DIR_OUTBOUND   0

Definition at line 53 of file crypto4xx_sa.h.

#define SA_AES128_CONTENTS   0x3e000042

Definition at line 199 of file crypto4xx_sa.h.

#define SA_AES128_LEN   (sizeof(struct dynamic_sa_aes128)/4)

Definition at line 198 of file crypto4xx_sa.h.

#define SA_AES192_CONTENTS   0x3e000062

Definition at line 213 of file crypto4xx_sa.h.

#define SA_AES192_LEN   (sizeof(struct dynamic_sa_aes192)/4)

Definition at line 212 of file crypto4xx_sa.h.

#define SA_AES256_CONTENTS   0x3e000082

Definition at line 227 of file crypto4xx_sa.h.

#define SA_AES256_LEN   (sizeof(struct dynamic_sa_aes256)/4)

Definition at line 226 of file crypto4xx_sa.h.

#define SA_AES_CONTENTS   0x3e000002

Definition at line 228 of file crypto4xx_sa.h.

#define SA_AES_KEY_LEN_128   2

Definition at line 122 of file crypto4xx_sa.h.

#define SA_AES_KEY_LEN_192   3

Definition at line 123 of file crypto4xx_sa.h.

#define SA_AES_KEY_LEN_256   4

Definition at line 124 of file crypto4xx_sa.h.

#define SA_CIPHER_ALG_3DES   1

Definition at line 60 of file crypto4xx_sa.h.

#define SA_CIPHER_ALG_AES   3

Definition at line 62 of file crypto4xx_sa.h.

#define SA_CIPHER_ALG_ARC4   2

Definition at line 61 of file crypto4xx_sa.h.

#define SA_CIPHER_ALG_DES   0

Definition at line 59 of file crypto4xx_sa.h.

#define SA_CIPHER_ALG_KASUMI   4

Definition at line 63 of file crypto4xx_sa.h.

#define SA_CIPHER_ALG_NULL   15

Definition at line 64 of file crypto4xx_sa.h.

#define SA_COPY_HDR   1

Definition at line 137 of file crypto4xx_sa.h.

#define SA_COPY_PAD   1

Definition at line 139 of file crypto4xx_sa.h.

#define SA_COPY_PAYLOAD   1

Definition at line 141 of file crypto4xx_sa.h.

#define SA_EXTENDED_SN_OFF   0

Definition at line 142 of file crypto4xx_sa.h.

#define SA_EXTENDED_SN_ON   1

Definition at line 143 of file crypto4xx_sa.h.

#define SA_HASH160_CONTENTS   0x2000a502

Definition at line 241 of file crypto4xx_sa.h.

#define SA_HASH160_LEN   (sizeof(struct dynamic_sa_hash160)/4)

Definition at line 240 of file crypto4xx_sa.h.

#define SA_HASH_ALG_MD5   0

Definition at line 66 of file crypto4xx_sa.h.

#define SA_HASH_ALG_NULL   15

Definition at line 68 of file crypto4xx_sa.h.

#define SA_HASH_ALG_SHA1   1

Definition at line 67 of file crypto4xx_sa.h.

#define SA_HASH_ALG_SHA1_DIGEST_SIZE   20

Definition at line 69 of file crypto4xx_sa.h.

#define SA_HASH_MODE_HASH   0

The follow defines bits sa_command_1 In Basic hash mode this bit define simple hash or hmac. In IPsec mode, this bit define muting control.

Definition at line 132 of file crypto4xx_sa.h.

#define SA_HASH_MODE_HMAC   1

Definition at line 133 of file crypto4xx_sa.h.

#define SA_HEADER_PROC   1

Definition at line 87 of file crypto4xx_sa.h.

#define SA_LOAD_HASH_FROM_SA   0

Definition at line 71 of file crypto4xx_sa.h.

#define SA_LOAD_HASH_FROM_STATE   2

Definition at line 72 of file crypto4xx_sa.h.

#define SA_LOAD_IV_FROM_INPUT   1

Definition at line 75 of file crypto4xx_sa.h.

#define SA_LOAD_IV_FROM_SA   0

Definition at line 74 of file crypto4xx_sa.h.

#define SA_LOAD_IV_FROM_STATE   2

Definition at line 76 of file crypto4xx_sa.h.

#define SA_LOAD_IV_GEN_IV   3

Definition at line 77 of file crypto4xx_sa.h.

#define SA_MC_DISABLE   1

Definition at line 135 of file crypto4xx_sa.h.

#define SA_MC_ENABLE   0

Definition at line 134 of file crypto4xx_sa.h.

#define SA_NO_HEADER_PROC   0

Definition at line 88 of file crypto4xx_sa.h.

#define SA_NOT_COPY_HDR   0

Definition at line 136 of file crypto4xx_sa.h.

#define SA_NOT_COPY_PAD   0

Definition at line 138 of file crypto4xx_sa.h.

#define SA_NOT_COPY_PAYLOAD   0

Definition at line 140 of file crypto4xx_sa.h.

#define SA_NOT_LOAD_HASH   3

Definition at line 73 of file crypto4xx_sa.h.

#define SA_NOT_SAVE_HASH   0

Definition at line 83 of file crypto4xx_sa.h.

#define SA_NOT_SAVE_IV   0

Definition at line 85 of file crypto4xx_sa.h.

#define SA_OP_GROUP_BASIC   0

Definition at line 55 of file crypto4xx_sa.h.

#define SA_OPCODE_DECRYPT   0

Definition at line 57 of file crypto4xx_sa.h.

#define SA_OPCODE_ENCRYPT   0

Definition at line 56 of file crypto4xx_sa.h.

#define SA_OPCODE_HASH   3

Definition at line 58 of file crypto4xx_sa.h.

#define SA_PAD_TYPE_CONSTANT   2

Definition at line 79 of file crypto4xx_sa.h.

#define SA_PAD_TYPE_DTLS   5

Definition at line 82 of file crypto4xx_sa.h.

#define SA_PAD_TYPE_TLS   5

Definition at line 81 of file crypto4xx_sa.h.

#define SA_PAD_TYPE_ZERO   3

Definition at line 80 of file crypto4xx_sa.h.

#define SA_REV2   1

Definition at line 126 of file crypto4xx_sa.h.

#define SA_SAVE_HASH   1

Definition at line 84 of file crypto4xx_sa.h.

#define SA_SAVE_IV   1

Definition at line 86 of file crypto4xx_sa.h.

#define SA_SEQ_MASK_OFF   0

Definition at line 144 of file crypto4xx_sa.h.

#define SA_SEQ_MASK_ON   1

Definition at line 145 of file crypto4xx_sa.h.

Function Documentation

union dynamic_sa_contents __attribute__ ( (packed)  )
read

Definition at line 171 of file esd_usb2.c.

Variable Documentation

u32 arc4_ij_ptr

Definition at line 54 of file crypto4xx_sa.h.

u32 arc4_state_ptr

Definition at line 53 of file crypto4xx_sa.h.

u32 arc4_stateful

Definition at line 173 of file crypto4xx_sa.h.

struct { ... } bf
u32 byte_offset

Definition at line 177 of file crypto4xx_sa.h.

Definition at line 125 of file crypto4xx_sa.h.

u32 cmd_size

Definition at line 70 of file crypto4xx_sa.h.

u32 copy_hdr

Definition at line 187 of file crypto4xx_sa.h.

u32 copy_pad

Definition at line 185 of file crypto4xx_sa.h.

u32 copy_payload

Definition at line 186 of file crypto4xx_sa.h.

u32 crypto_mode31

Definition at line 171 of file crypto4xx_sa.h.

u32 crypto_mode9_8

Definition at line 180 of file crypto4xx_sa.h.

Definition at line 197 of file crypto4xx_sa.h.

u32 digest_len

Definition at line 119 of file crypto4xx_sa.h.

Definition at line 128 of file crypto4xx_sa.h.

u32 extend_pad

Definition at line 121 of file crypto4xx_sa.h.

u32 extended_seq_num

Definition at line 181 of file crypto4xx_sa.h.

u32 feedback_mode

Definition at line 179 of file crypto4xx_sa.h.

u32 gather

Definition at line 114 of file crypto4xx_sa.h.

u32 hash_alg

Definition at line 124 of file crypto4xx_sa.h.

u32 hash_crypto_offset

Definition at line 175 of file crypto4xx_sa.h.

u32 hdr_proc

Definition at line 120 of file crypto4xx_sa.h.

u32 hmac_muting

Definition at line 178 of file crypto4xx_sa.h.

u32 inner_digest[5]

Definition at line 241 of file crypto4xx_sa.h.

u32 inner_size

Definition at line 68 of file crypto4xx_sa.h.

u32 ip_version

Definition at line 184 of file crypto4xx_sa.h.

u32 iv

Definition at line 199 of file crypto4xx_sa.h.

u32 iv0

Definition at line 59 of file crypto4xx_sa.h.

u32 iv1

Definition at line 58 of file crypto4xx_sa.h.

u32 iv2

Definition at line 57 of file crypto4xx_sa.h.

u32 iv3

Definition at line 56 of file crypto4xx_sa.h.

u32 key[8]

Definition at line 198 of file crypto4xx_sa.h.

u32 key_len

Definition at line 174 of file crypto4xx_sa.h.

u32 key_size

Definition at line 69 of file crypto4xx_sa.h.

u32 load_hash_state

Definition at line 117 of file crypto4xx_sa.h.

u32 load_iv

Definition at line 118 of file crypto4xx_sa.h.

u32 mutable_bit_proc

Definition at line 183 of file crypto4xx_sa.h.

u32 op_group

Definition at line 127 of file crypto4xx_sa.h.

Definition at line 129 of file crypto4xx_sa.h.

u32 outer_digest[5]

Definition at line 242 of file crypto4xx_sa.h.

u32 outer_size

Definition at line 67 of file crypto4xx_sa.h.

u32 pad_type

Definition at line 126 of file crypto4xx_sa.h.

u32 reserved

Definition at line 201 of file crypto4xx_sa.h.

u32 rsv

Definition at line 123 of file crypto4xx_sa.h.

u32 rsv1

Definition at line 188 of file crypto4xx_sa.h.

Definition at line 177 of file crypto4xx_sa.h.

Definition at line 178 of file crypto4xx_sa.h.

u32 sa_contents

Definition at line 176 of file crypto4xx_sa.h.

u32 sa_rev

Definition at line 176 of file crypto4xx_sa.h.

u32 save_arc4_state

Definition at line 172 of file crypto4xx_sa.h.

u32 save_digest[16]

Definition at line 187 of file crypto4xx_sa.h.

u32 save_hash_byte_cnt[2]

Definition at line 186 of file crypto4xx_sa.h.

u32 save_hash_state

Definition at line 115 of file crypto4xx_sa.h.

u32 save_iv

Definition at line 116 of file crypto4xx_sa.h.

u32 scatter

Definition at line 113 of file crypto4xx_sa.h.

u32 seq_num0

Definition at line 65 of file crypto4xx_sa.h.

u32 seq_num1

Definition at line 64 of file crypto4xx_sa.h.

u32 seq_num_mask

Definition at line 182 of file crypto4xx_sa.h.

u32 seq_num_mask0

Definition at line 63 of file crypto4xx_sa.h.

u32 seq_num_mask1

Definition at line 62 of file crypto4xx_sa.h.

u32 seq_num_mask2

Definition at line 61 of file crypto4xx_sa.h.

u32 seq_num_mask3

Definition at line 60 of file crypto4xx_sa.h.

u32 spi

Definition at line 66 of file crypto4xx_sa.h.

u32 state_ptr

Definition at line 55 of file crypto4xx_sa.h.

u32 stream_cipher_pad

Definition at line 122 of file crypto4xx_sa.h.

u32 w

Definition at line 72 of file crypto4xx_sa.h.