sxdesc Struct
C
struct sxdesc { char *addr; struct sxdesc *next; uint32_t sz; uint32_t dmatag; };
Description
A cryptomaster DMA descriptor
sx_dmaslot Struct
C
struct sx_dmaslot {
uint32_t cfg;
struct sxdesc outdescs[5];
};
Description
Input and output descriptors and related state for cmdma
sx_dmactl Struct
C
struct sx_dmactl { struct sx_regs *regs; struct sxdesc *d; struct sxdesc *out; char *mapped; struct sx_dmaslot dmamem; };
Description
DMA controller. For internal use only. Don't access directly.
sxkeyref Struct
C
struct sxkeyref { const char *key; size_t sz; uint32_t cfg; };
Description
Key reference Used for making a reference to a key stored in memory or to a key selected by an identifier. Created by SX_KEYREF_LOAD_MATERIAL() or SX_KEYREF_LOAD_BY_ID(). Used by blkcipher and aead creation functions. All members should be considered INTERNAL and may not be accessed directly.
sxaead Struct
C
struct sxaead {
const struct sx_aead_cmdma_cfg *cfg;
const char *expectedtag;
uint8_t tagsz;
uint8_t headersz;
uint32_t discardaadsz;
uint32_t datainsz;
uint64_t dataintotalsz;
uint64_t totalaadsz;
uint8_t granularity;
int is_in_ctx;
size_t ctxsz;
unsigned int compatible;
const struct sxkeyref *key;
struct sx_dmactl dma;
struct sxdesc allindescs[7];
uint8_t extramem[SX_AEAD_PRIV_SZ];
};
Description
An AEAD operation. To be used with sx_aead() functions. All members should be considered INTERNAL and may not be accessed directly.
sxblkcipher Struct
C
struct sxblkcipher {
const struct sx_blkcipher_cmdma_cfg *cfg;
size_t inminsz;
size_t granularity;
uint32_t mode;
unsigned int compatible;
const struct sxkeyref *key;
struct sx_dmactl dma;
struct sxdesc allindescs[5];
char extramem[SX_BLKCIPHER_PRIV_SZ];
};
Description
A simple block cipher operation To be used with sx_blkcipher() functions. All members should be considered INTERNAL and may not be accessed directly.
sxhash Struct
C
struct sxhash {
const struct sxhashalg *algo;
const struct sx_digesttags *dmatags;
uint32_t cntindescs;
size_t totalsz;
uint32_t feedsz;
void(*digest)(struct sxhash* c, char *digest);
struct sx_dmactl dma;
struct sxdesc allindescs[7 + SX_EXTRA_IN_DESCS];
uint8_t extramem[SX_HASH_PRIV_SZ];
};
Description
A hash operation. To be used with sx_hash functions. All members should be considered INTERNAL and may not be accessed directly.
sxcmmask Struct
C
struct sxcmmask {
struct sx_dmactl dma;
struct sxdesc allindescs[1];
};
Description
A operation to load a countermeasures mask into the hardware. To be used with sx_cm() functions. All members should be considered INTERNAL and may not be accessed directly.
sxmac Struct
C
struct sxmac { const struct sx_mac_cmdma_cfg *cfg; uint32_t cntindescs; uint32_t feedsz; int macsz; unsigned int compatible; const struct sxkeyref *key; struct sx_dmactl dma; struct sxdesc allindescs[5]; uint8_t extramem[16]; };
Description
A simple MAC(message authentication code) operation To be used with sx_mac() functions. All members should be considered INTERNAL and may not be accessed directly.