include/crypto/algapi.h
Source file repositories/reference/linux-study-clean/include/crypto/algapi.h
File Facts
- System
- Linux kernel
- Corpus path
include/crypto/algapi.h- Extension
.h- Size
- 8116 bytes
- Lines
- 289
- Domain
- Repository Root And Misc
- Bucket
- include
- Inferred role
- Repository Root And Misc: implementation source
- Status
- source implementation candidate
Why This File Exists
Top-level or miscellaneous repository surface. Use this as map coverage unless a later manual pass promotes the file into a deeper subsystem dossier.
- Top-level or miscellaneous repository surface. Use this as map coverage unless a later manual pass promotes the file into a deeper subsystem dossier.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
crypto/utils.hlinux/align.hlinux/cache.hlinux/crypto.hlinux/list.hlinux/types.hlinux/workqueue.h
Detected Declarations
struct crypto_aeadstruct crypto_instancestruct modulestruct notifier_blockstruct rtattrstruct scatterliststruct seq_filestruct sk_buffstruct crypto_instancestruct crypto_templatestruct crypto_spawnstruct crypto_queuestruct scatter_walkstruct crypto_attr_algstruct crypto_attr_typefunction crypto_queue_lenfunction crypto_dma_alignfunction crypto_dma_paddingfunction crypto_requires_offfunction algorithmfunction crypto_request_completefunction crypto_tfm_alg_typefunction crypto_tfm_req_virtfunction crypto_request_flags
Annotated Snippet
struct crypto_instance {
struct crypto_alg alg;
struct crypto_template *tmpl;
union {
/* Node in list of instances after registration. */
struct hlist_node list;
/* List of attached spawns before registration. */
struct crypto_spawn *spawns;
};
void *__ctx[] CRYPTO_MINALIGN_ATTR;
};
struct crypto_template {
struct list_head list;
struct hlist_head instances;
struct hlist_head dead;
struct module *module;
struct work_struct free_work;
int (*create)(struct crypto_template *tmpl, struct rtattr **tb);
char name[CRYPTO_MAX_ALG_NAME];
};
struct crypto_spawn {
struct list_head list;
struct crypto_alg *alg;
union {
/* Back pointer to instance after registration.*/
struct crypto_instance *inst;
/* Spawn list pointer prior to registration. */
struct crypto_spawn *next;
};
const struct crypto_type *frontend;
u32 mask;
bool dead;
bool registered;
};
struct crypto_queue {
struct list_head list;
struct list_head *backlog;
unsigned int qlen;
unsigned int max_qlen;
};
struct scatter_walk {
/* Must be the first member, see struct skcipher_walk. */
union {
void *const addr;
/* Private API field, do not touch. */
union crypto_no_such_thing *__addr;
};
struct scatterlist *sg;
unsigned int offset;
};
struct crypto_attr_alg {
char name[CRYPTO_MAX_ALG_NAME];
};
struct crypto_attr_type {
u32 type;
u32 mask;
};
/*
* Algorithm registration interface.
*/
int crypto_register_alg(struct crypto_alg *alg);
void crypto_unregister_alg(struct crypto_alg *alg);
int crypto_register_algs(struct crypto_alg *algs, int count);
void crypto_unregister_algs(struct crypto_alg *algs, int count);
void crypto_mod_put(struct crypto_alg *alg);
int crypto_register_template(struct crypto_template *tmpl);
int crypto_register_templates(struct crypto_template *tmpls, int count);
void crypto_unregister_template(struct crypto_template *tmpl);
void crypto_unregister_templates(struct crypto_template *tmpls, int count);
struct crypto_template *crypto_lookup_template(const char *name);
int crypto_register_instance(struct crypto_template *tmpl,
struct crypto_instance *inst);
Annotation
- Immediate include surface: `crypto/utils.h`, `linux/align.h`, `linux/cache.h`, `linux/crypto.h`, `linux/list.h`, `linux/types.h`, `linux/workqueue.h`.
- Detected declarations: `struct crypto_aead`, `struct crypto_instance`, `struct module`, `struct notifier_block`, `struct rtattr`, `struct scatterlist`, `struct seq_file`, `struct sk_buff`, `struct crypto_instance`, `struct crypto_template`.
- Atlas domain: Repository Root And Misc / include.
- 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.