crypto/hctr2.c
Source file repositories/reference/linux-study-clean/crypto/hctr2.c
File Facts
- System
- Linux kernel
- Corpus path
crypto/hctr2.c- Extension
.c- Size
- 14285 bytes
- Lines
- 482
- 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/gf128hash.hcrypto/internal/cipher.hcrypto/internal/skcipher.hcrypto/scatterwalk.hlinux/module.h
Detected Declarations
struct hctr2_instance_ctxstruct hctr2_tfm_ctxstruct hctr2_request_ctxfunction hctr2_hash_tweaklensfunction hctr2_setkeyfunction hctr2_hash_tweakfunction hctr2_hash_messagefunction hctr2_finishfunction hctr2_xctr_donefunction hctr2_cryptfunction hctr2_encryptfunction hctr2_decryptfunction hctr2_init_tfmfunction hctr2_exit_tfmfunction hctr2_free_instancefunction hctr2_create_commonfunction hctr2_create_basefunction hctr2_createfunction hctr2_module_initfunction hctr2_module_exitmodule init hctr2_module_init
Annotated Snippet
module_init(hctr2_module_init);
module_exit(hctr2_module_exit);
MODULE_DESCRIPTION("HCTR2 length-preserving encryption mode");
MODULE_LICENSE("GPL v2");
MODULE_ALIAS_CRYPTO("hctr2");
MODULE_IMPORT_NS("CRYPTO_INTERNAL");
Annotation
- Immediate include surface: `crypto/gf128hash.h`, `crypto/internal/cipher.h`, `crypto/internal/skcipher.h`, `crypto/scatterwalk.h`, `linux/module.h`.
- Detected declarations: `struct hctr2_instance_ctx`, `struct hctr2_tfm_ctx`, `struct hctr2_request_ctx`, `function hctr2_hash_tweaklens`, `function hctr2_setkey`, `function hctr2_hash_tweak`, `function hctr2_hash_message`, `function hctr2_finish`, `function hctr2_xctr_done`, `function hctr2_crypt`.
- 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.