crypto/sm3.c
Source file repositories/reference/linux-study-clean/crypto/sm3.c
File Facts
- System
- Linux kernel
- Corpus path
crypto/sm3.c- Extension
.c- Size
- 2201 bytes
- Lines
- 90
- 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/internal/hash.hcrypto/sm3.hlinux/kernel.hlinux/module.h
Detected Declarations
function Copyrightfunction crypto_sm3_updatefunction crypto_sm3_finalfunction crypto_sm3_digestfunction crypto_sm3_export_corefunction crypto_sm3_import_corefunction crypto_sm3_mod_initfunction crypto_sm3_mod_exitmodule init crypto_sm3_mod_init
Annotated Snippet
module_init(crypto_sm3_mod_init);
static void __exit crypto_sm3_mod_exit(void)
{
crypto_unregister_shash(&sm3_alg);
}
module_exit(crypto_sm3_mod_exit);
MODULE_LICENSE("GPL v2");
MODULE_DESCRIPTION("Crypto API support for SM3");
MODULE_ALIAS_CRYPTO("sm3");
MODULE_ALIAS_CRYPTO("sm3-lib");
Annotation
- Immediate include surface: `crypto/internal/hash.h`, `crypto/sm3.h`, `linux/kernel.h`, `linux/module.h`.
- Detected declarations: `function Copyright`, `function crypto_sm3_update`, `function crypto_sm3_final`, `function crypto_sm3_digest`, `function crypto_sm3_export_core`, `function crypto_sm3_import_core`, `function crypto_sm3_mod_init`, `function crypto_sm3_mod_exit`, `module init crypto_sm3_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.