crypto/chacha.c
Source file repositories/reference/linux-study-clean/crypto/chacha.c
File Facts
- System
- Linux kernel
- Corpus path
crypto/chacha.c- Extension
.c- Size
- 4722 bytes
- Lines
- 176
- 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
linux/unaligned.hcrypto/algapi.hcrypto/chacha.hcrypto/internal/skcipher.hlinux/module.h
Detected Declarations
struct chacha_ctxfunction chacha_setkeyfunction chacha20_setkeyfunction chacha12_setkeyfunction chacha_stream_xorfunction crypto_chacha_cryptfunction crypto_xchacha_cryptfunction crypto_chacha_mod_initfunction crypto_chacha_mod_finimodule init crypto_chacha_mod_init
Annotated Snippet
module_init(crypto_chacha_mod_init);
module_exit(crypto_chacha_mod_fini);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Martin Willi <martin@strongswan.org>");
MODULE_DESCRIPTION("Crypto API wrappers for the ChaCha20, XChaCha20, and XChaCha12 stream ciphers");
MODULE_ALIAS_CRYPTO("chacha20");
MODULE_ALIAS_CRYPTO("chacha20-lib");
MODULE_ALIAS_CRYPTO("xchacha20");
MODULE_ALIAS_CRYPTO("xchacha20-lib");
MODULE_ALIAS_CRYPTO("xchacha12");
MODULE_ALIAS_CRYPTO("xchacha12-lib");
Annotation
- Immediate include surface: `linux/unaligned.h`, `crypto/algapi.h`, `crypto/chacha.h`, `crypto/internal/skcipher.h`, `linux/module.h`.
- Detected declarations: `struct chacha_ctx`, `function chacha_setkey`, `function chacha20_setkey`, `function chacha12_setkey`, `function chacha_stream_xor`, `function crypto_chacha_crypt`, `function crypto_xchacha_crypt`, `function crypto_chacha_mod_init`, `function crypto_chacha_mod_fini`, `module init crypto_chacha_mod_init`.
- 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.