drivers/crypto/ccp/ccp-crypto.h
Source file repositories/reference/linux-study-clean/drivers/crypto/ccp/ccp-crypto.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/crypto/ccp/ccp-crypto.h- Extension
.h- Size
- 5764 bytes
- Lines
- 287
- 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.
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/list.hlinux/wait.hlinux/ccp.hcrypto/algapi.hcrypto/aes.hcrypto/internal/aead.hcrypto/aead.hcrypto/ctr.hcrypto/hash.hcrypto/sha1.hcrypto/sha2.hcrypto/akcipher.hcrypto/skcipher.hcrypto/internal/rsa.h
Detected Declarations
struct ccp_crypto_skcipher_algstruct ccp_crypto_aeadstruct ccp_crypto_ahash_algstruct ccp_crypto_akcipher_algstruct ccp_aes_ctxstruct ccp_aes_req_ctxstruct ccp_aes_cmac_req_ctxstruct ccp_aes_cmac_exp_ctxstruct ccp_des3_ctxstruct ccp_des3_req_ctxstruct ccp_sha_ctxstruct ccp_sha_req_ctxstruct ccp_sha_exp_ctxstruct ccp_rsa_ctxstruct ccp_rsa_req_ctxstruct ccp_ctxfunction ccp_crypto_skcipher_algfunction ccp_crypto_ahash_alg
Annotated Snippet
struct ccp_crypto_skcipher_alg {
struct list_head entry;
u32 mode;
struct skcipher_alg alg;
};
struct ccp_crypto_aead {
struct list_head entry;
u32 mode;
struct aead_alg alg;
};
struct ccp_crypto_ahash_alg {
struct list_head entry;
const __be32 *init;
u32 type;
u32 mode;
/* Child algorithm used for HMAC, CMAC, etc */
char child_alg[CRYPTO_MAX_ALG_NAME];
struct ahash_alg alg;
};
struct ccp_crypto_akcipher_alg {
struct list_head entry;
struct akcipher_alg alg;
};
static inline struct ccp_crypto_skcipher_alg *
ccp_crypto_skcipher_alg(struct crypto_skcipher *tfm)
{
struct skcipher_alg *alg = crypto_skcipher_alg(tfm);
return container_of(alg, struct ccp_crypto_skcipher_alg, alg);
}
static inline struct ccp_crypto_ahash_alg *
ccp_crypto_ahash_alg(struct crypto_tfm *tfm)
{
struct crypto_alg *alg = tfm->__crt_alg;
struct ahash_alg *ahash_alg;
ahash_alg = container_of(alg, struct ahash_alg, halg.base);
return container_of(ahash_alg, struct ccp_crypto_ahash_alg, alg);
}
/***** AES related defines *****/
struct ccp_aes_ctx {
/* Fallback cipher for XTS with unsupported unit sizes */
struct crypto_skcipher *tfm_skcipher;
enum ccp_engine engine;
enum ccp_aes_type type;
enum ccp_aes_mode mode;
struct scatterlist key_sg;
unsigned int key_len;
u8 key[AES_MAX_KEY_SIZE * 2];
u8 nonce[CTR_RFC3686_NONCE_SIZE];
/* CMAC key structures */
struct scatterlist k1_sg;
struct scatterlist k2_sg;
unsigned int kn_len;
u8 k1[AES_BLOCK_SIZE];
u8 k2[AES_BLOCK_SIZE];
};
struct ccp_aes_req_ctx {
struct scatterlist iv_sg;
u8 iv[AES_BLOCK_SIZE];
struct scatterlist tag_sg;
u8 tag[AES_BLOCK_SIZE];
/* Fields used for RFC3686 requests */
u8 *rfc3686_info;
u8 rfc3686_iv[AES_BLOCK_SIZE];
struct ccp_cmd cmd;
Annotation
- Immediate include surface: `linux/list.h`, `linux/wait.h`, `linux/ccp.h`, `crypto/algapi.h`, `crypto/aes.h`, `crypto/internal/aead.h`, `crypto/aead.h`, `crypto/ctr.h`.
- Detected declarations: `struct ccp_crypto_skcipher_alg`, `struct ccp_crypto_aead`, `struct ccp_crypto_ahash_alg`, `struct ccp_crypto_akcipher_alg`, `struct ccp_aes_ctx`, `struct ccp_aes_req_ctx`, `struct ccp_aes_cmac_req_ctx`, `struct ccp_aes_cmac_exp_ctx`, `struct ccp_des3_ctx`, `struct ccp_des3_req_ctx`.
- Atlas domain: Driver Families / drivers/crypto.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.