crypto/sha1.c
Source file repositories/reference/linux-study-clean/crypto/sha1.c
File Facts
- System
- Linux kernel
- Corpus path
crypto/sha1.c- Extension
.c- Size
- 6717 bytes
- Lines
- 241
- 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/sha1.hlinux/kernel.hlinux/module.h
Detected Declarations
function __crypto_sha1_exportfunction __crypto_sha1_importfunction __crypto_sha1_export_corefunction __crypto_sha1_import_corefunction crypto_sha1_initfunction crypto_sha1_updatefunction crypto_sha1_finalfunction crypto_sha1_digestfunction crypto_sha1_exportfunction crypto_sha1_importfunction crypto_sha1_export_corefunction crypto_sha1_import_corefunction crypto_hmac_sha1_setkeyfunction crypto_hmac_sha1_initfunction crypto_hmac_sha1_updatefunction crypto_hmac_sha1_finalfunction crypto_hmac_sha1_digestfunction crypto_hmac_sha1_exportfunction crypto_hmac_sha1_importfunction crypto_hmac_sha1_export_corefunction crypto_hmac_sha1_import_corefunction crypto_sha1_mod_initfunction crypto_sha1_mod_exitmodule init crypto_sha1_mod_initexport sha1_zero_message_hash
Annotated Snippet
module_init(crypto_sha1_mod_init);
static void __exit crypto_sha1_mod_exit(void)
{
crypto_unregister_shashes(algs, ARRAY_SIZE(algs));
}
module_exit(crypto_sha1_mod_exit);
MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("Crypto API support for SHA-1 and HMAC-SHA1");
MODULE_ALIAS_CRYPTO("sha1");
MODULE_ALIAS_CRYPTO("sha1-lib");
MODULE_ALIAS_CRYPTO("hmac(sha1)");
MODULE_ALIAS_CRYPTO("hmac-sha1-lib");
Annotation
- Immediate include surface: `crypto/internal/hash.h`, `crypto/sha1.h`, `linux/kernel.h`, `linux/module.h`.
- Detected declarations: `function __crypto_sha1_export`, `function __crypto_sha1_import`, `function __crypto_sha1_export_core`, `function __crypto_sha1_import_core`, `function crypto_sha1_init`, `function crypto_sha1_update`, `function crypto_sha1_final`, `function crypto_sha1_digest`, `function crypto_sha1_export`, `function crypto_sha1_import`.
- 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.