lib/crypto/sha1.c
Source file repositories/reference/linux-study-clean/lib/crypto/sha1.c
File Facts
- System
- Linux kernel
- Corpus path
lib/crypto/sha1.c- Extension
.c- Size
- 9569 bytes
- Lines
- 337
- Domain
- Kernel Services
- Bucket
- lib
- 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/hmac.hcrypto/sha1.hlinux/bitops.hlinux/export.hlinux/kernel.hlinux/module.hlinux/string.hlinux/unaligned.hlinux/wordpart.hfips.hsha1.h
Detected Declarations
function sha1_block_genericfunction sha1_blocks_genericfunction sha1_initfunction sha1_updatefunction __sha1_finalfunction sha1_finalfunction sha1function __hmac_sha1_preparekeyfunction hmac_sha1_preparekeyfunction hmac_sha1_initfunction hmac_sha1_init_usingrawkeyfunction hmac_sha1_finalfunction hmac_sha1function hmac_sha1_usingrawkeyfunction sha1_mod_initfunction sha1_mod_exitmodule init sha1_mod_initexport sha1_initexport sha1_updateexport sha1_finalexport sha1export hmac_sha1_preparekeyexport hmac_sha1_initexport hmac_sha1_init_usingrawkeyexport hmac_sha1_finalexport hmac_sha1export hmac_sha1_usingrawkey
Annotated Snippet
subsys_initcall(sha1_mod_init);
static void __exit sha1_mod_exit(void)
{
}
module_exit(sha1_mod_exit);
#endif
MODULE_DESCRIPTION("SHA-1 and HMAC-SHA1 library functions");
MODULE_LICENSE("GPL");
Annotation
- Immediate include surface: `crypto/hmac.h`, `crypto/sha1.h`, `linux/bitops.h`, `linux/export.h`, `linux/kernel.h`, `linux/module.h`, `linux/string.h`, `linux/unaligned.h`.
- Detected declarations: `function sha1_block_generic`, `function sha1_blocks_generic`, `function sha1_init`, `function sha1_update`, `function __sha1_final`, `function sha1_final`, `function sha1`, `function __hmac_sha1_preparekey`, `function hmac_sha1_preparekey`, `function hmac_sha1_init`.
- Atlas domain: Kernel Services / lib.
- 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.