include/crypto/des.h
Source file repositories/reference/linux-study-clean/include/crypto/des.h
File Facts
- System
- Linux kernel
- Corpus path
include/crypto/des.h- Extension
.h- Size
- 1732 bytes
- Lines
- 58
- Domain
- Repository Root And Misc
- Bucket
- include
- Inferred role
- Repository Root And Misc: implementation source
- Status
- source implementation candidate
Why This File Exists
Top-level or miscellaneous repository surface. Use this as map coverage unless a later manual pass promotes the file into a deeper subsystem dossier.
- Top-level or miscellaneous repository surface. Use this as map coverage unless a later manual pass promotes the file into a deeper subsystem dossier.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/types.h
Detected Declarations
struct des_ctxstruct des3_ede_ctx
Annotated Snippet
struct des_ctx {
u32 expkey[DES_EXPKEY_WORDS];
};
struct des3_ede_ctx {
u32 expkey[DES3_EDE_EXPKEY_WORDS];
};
void des_encrypt(const struct des_ctx *ctx, u8 *dst, const u8 *src);
void des_decrypt(const struct des_ctx *ctx, u8 *dst, const u8 *src);
void des3_ede_encrypt(const struct des3_ede_ctx *dctx, u8 *dst, const u8 *src);
void des3_ede_decrypt(const struct des3_ede_ctx *dctx, u8 *dst, const u8 *src);
/**
* des_expand_key - Expand a DES input key into a key schedule
* @ctx: the key schedule
* @key: buffer containing the input key
* @keylen: size of the buffer contents
*
* Returns: 0 on success, -EINVAL if the input key is rejected and -ENOKEY if
* the key is accepted but has been found to be weak.
*/
int des_expand_key(struct des_ctx *ctx, const u8 *key, unsigned int keylen);
/**
* des3_ede_expand_key - Expand a triple DES input key into a key schedule
* @ctx: the key schedule
* @key: buffer containing the input key
* @keylen: size of the buffer contents
*
* Returns: 0 on success, -EINVAL if the input key is rejected and -ENOKEY if
* the key is accepted but has been found to be weak. Note that weak keys will
* be rejected (and -EINVAL will be returned) when running in FIPS mode.
*/
int des3_ede_expand_key(struct des3_ede_ctx *ctx, const u8 *key,
unsigned int keylen);
#endif /* __CRYPTO_DES_H */
Annotation
- Immediate include surface: `linux/types.h`.
- Detected declarations: `struct des_ctx`, `struct des3_ede_ctx`.
- Atlas domain: Repository Root And Misc / include.
- Implementation status: source 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.