crypto/aes.c
Source file repositories/reference/linux-study-clean/crypto/aes.c
File Facts
- System
- Linux kernel
- Corpus path
crypto/aes.c- Extension
.c- Size
- 6832 bytes
- Lines
- 248
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
crypto/aes-cbc-macs.hcrypto/aes.hcrypto/algapi.hcrypto/internal/hash.hlinux/module.h
Detected Declarations
function crypto_aes_setkeyfunction crypto_aes_encryptfunction crypto_aes_decryptfunction crypto_aes_cmac_setkeyfunction crypto_aes_xcbc_setkeyfunction crypto_aes_cmac_initfunction crypto_aes_cmac_updatefunction crypto_aes_cmac_finalfunction crypto_aes_cmac_digestfunction crypto_aes_cbcmac_setkeyfunction crypto_aes_cbcmac_initfunction crypto_aes_cbcmac_updatefunction crypto_aes_cbcmac_finalfunction crypto_aes_cbcmac_digestfunction xcbcfunction crypto_aes_mod_initfunction crypto_aes_mod_exitmodule init crypto_aes_mod_init
Annotated Snippet
module_init(crypto_aes_mod_init);
static void __exit crypto_aes_mod_exit(void)
{
if (ARRAY_SIZE(mac_algs) > 0)
crypto_unregister_shashes(mac_algs, ARRAY_SIZE(mac_algs));
crypto_unregister_alg(&alg);
}
module_exit(crypto_aes_mod_exit);
MODULE_DESCRIPTION("Crypto API support for AES block cipher");
MODULE_IMPORT_NS("CRYPTO_INTERNAL");
MODULE_LICENSE("GPL");
MODULE_ALIAS_CRYPTO("aes");
MODULE_ALIAS_CRYPTO("aes-lib");
#if IS_ENABLED(CONFIG_CRYPTO_CMAC)
MODULE_ALIAS_CRYPTO("cmac(aes)");
MODULE_ALIAS_CRYPTO("cmac-aes-lib");
#endif
#if IS_ENABLED(CONFIG_CRYPTO_XCBC)
MODULE_ALIAS_CRYPTO("xcbc(aes)");
MODULE_ALIAS_CRYPTO("xcbc-aes-lib");
#endif
#if IS_ENABLED(CONFIG_CRYPTO_CCM)
MODULE_ALIAS_CRYPTO("cbcmac(aes)");
MODULE_ALIAS_CRYPTO("cbcmac-aes-lib");
#endif
Annotation
- Immediate include surface: `crypto/aes-cbc-macs.h`, `crypto/aes.h`, `crypto/algapi.h`, `crypto/internal/hash.h`, `linux/module.h`.
- Detected declarations: `function crypto_aes_setkey`, `function crypto_aes_encrypt`, `function crypto_aes_decrypt`, `function crypto_aes_cmac_setkey`, `function crypto_aes_xcbc_setkey`, `function crypto_aes_cmac_init`, `function crypto_aes_cmac_update`, `function crypto_aes_cmac_final`, `function crypto_aes_cmac_digest`, `function crypto_aes_cbcmac_setkey`.
- 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.