crypto/cmac.c
Source file repositories/reference/linux-study-clean/crypto/cmac.c
File Facts
- System
- Linux kernel
- Corpus path
crypto/cmac.c- Extension
.c- Size
- 6031 bytes
- Lines
- 245
- Domain
- Kernel Services
- Bucket
- crypto
- Inferred role
- Kernel Services: exported/initcall integration point
- Status
- integration implementation candidate
Why This File Exists
Shared kernel service surface used by multiple subsystems, including helpers, cryptography, virtualization support, and async I/O infrastructure.
- Shared kernel service surface used by multiple subsystems, including helpers, cryptography, virtualization support, and async I/O infrastructure.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
crypto/internal/cipher.hcrypto/internal/hash.hcrypto/utils.hlinux/err.hlinux/kernel.hlinux/module.hlinux/slab.hlinux/string.h
Detected Declarations
struct cmac_tfm_ctxfunction crypto_cmac_digest_setkeyfunction crypto_cmac_digest_initfunction crypto_cmac_digest_updatefunction crypto_cmac_digest_finupfunction cmac_init_tfmfunction cmac_exit_tfmfunction cmac_createfunction crypto_cmac_module_initfunction crypto_cmac_module_exitmodule init crypto_cmac_module_init
Annotated Snippet
module_init(crypto_cmac_module_init);
module_exit(crypto_cmac_module_exit);
MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("CMAC keyed hash algorithm");
MODULE_ALIAS_CRYPTO("cmac");
MODULE_IMPORT_NS("CRYPTO_INTERNAL");
Annotation
- Immediate include surface: `crypto/internal/cipher.h`, `crypto/internal/hash.h`, `crypto/utils.h`, `linux/err.h`, `linux/kernel.h`, `linux/module.h`, `linux/slab.h`, `linux/string.h`.
- Detected declarations: `struct cmac_tfm_ctx`, `function crypto_cmac_digest_setkey`, `function crypto_cmac_digest_init`, `function crypto_cmac_digest_update`, `function crypto_cmac_digest_finup`, `function cmac_init_tfm`, `function cmac_exit_tfm`, `function cmac_create`, `function crypto_cmac_module_init`, `function crypto_cmac_module_exit`.
- Atlas domain: Kernel Services / crypto.
- Implementation status: integration 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.