drivers/crypto/amcc/crypto4xx_sa.h

Source file repositories/reference/linux-study-clean/drivers/crypto/amcc/crypto4xx_sa.h

File Facts

System
Linux kernel
Corpus path
drivers/crypto/amcc/crypto4xx_sa.h
Extension
.h
Size
7299 bytes
Lines
310
Domain
Driver Families
Bucket
drivers/crypto
Inferred role
Driver Families: implementation source
Status
source implementation candidate

Why This File Exists

Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.

Dependency Surface

Detected Declarations

Annotated Snippet

struct dynamic_sa_ctl {
	union dynamic_sa_contents sa_contents;
	union sa_command_0 sa_command_0;
	union sa_command_1 sa_command_1;
} __attribute__((packed));

/*
 * State Record for Security Association (SA)
 */
struct  sa_state_record {
	__le32 save_iv[4];
	__le32 save_hash_byte_cnt[2];
	union {
		u32 save_digest[16]; /* for MD5/SHA */
		__le32 save_digest_le32[16]; /* GHASH / CBC */
	};
} __attribute__((packed));

/*
 * Security Association (SA) for AES128
 *
 */
struct dynamic_sa_aes128 {
	struct dynamic_sa_ctl	ctrl;
	__le32 key[4];
	__le32 iv[4]; /* for CBC, OFC, and CFB mode */
	u32 state_ptr;
	u32 reserved;
} __attribute__((packed));

#define SA_AES128_LEN		(sizeof(struct dynamic_sa_aes128)/4)
#define SA_AES128_CONTENTS	0x3e000042

/*
 * Security Association (SA) for AES192
 */
struct dynamic_sa_aes192 {
	struct dynamic_sa_ctl ctrl;
	__le32 key[6];
	__le32 iv[4]; /* for CBC, OFC, and CFB mode */
	u32 state_ptr;
	u32 reserved;
} __attribute__((packed));

#define SA_AES192_LEN		(sizeof(struct dynamic_sa_aes192)/4)
#define SA_AES192_CONTENTS	0x3e000062

/*
 * Security Association (SA) for AES256
 */
struct dynamic_sa_aes256 {
	struct dynamic_sa_ctl ctrl;
	__le32 key[8];
	__le32 iv[4]; /* for CBC, OFC, and CFB mode */
	u32 state_ptr;
	u32 reserved;
} __attribute__((packed));

#define SA_AES256_LEN		(sizeof(struct dynamic_sa_aes256)/4)
#define SA_AES256_CONTENTS	0x3e000082
#define SA_AES_CONTENTS		0x3e000002

/*
 * Security Association (SA) for AES128 CCM
 */
struct dynamic_sa_aes128_ccm {
	struct dynamic_sa_ctl ctrl;
	__le32 key[4];
	__le32 iv[4];
	u32 state_ptr;
	u32 reserved;
} __packed;
#define SA_AES128_CCM_LEN	(sizeof(struct dynamic_sa_aes128_ccm)/4)
#define SA_AES128_CCM_CONTENTS	0x3e000042
#define SA_AES_CCM_CONTENTS	0x3e000002

/*
 * Security Association (SA) for AES128_GCM
 */
struct dynamic_sa_aes128_gcm {
	struct dynamic_sa_ctl ctrl;
	__le32 key[4];
	__le32 inner_digest[4];
	__le32 iv[4];
	u32 state_ptr;
	u32 reserved;
} __packed;

#define SA_AES128_GCM_LEN	(sizeof(struct dynamic_sa_aes128_gcm)/4)
#define SA_AES128_GCM_CONTENTS	0x3e000442

Annotation

Implementation Notes