include/crypto/krb5.h
Source file repositories/reference/linux-study-clean/include/crypto/krb5.h
File Facts
- System
- Linux kernel
- Corpus path
include/crypto/krb5.h- Extension
.h- Size
- 5994 bytes
- Lines
- 169
- 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/crypto.hcrypto/aead.hcrypto/hash.h
Detected Declarations
struct crypto_shashstruct scatterliststruct krb5_bufferstruct krb5_enctypeenum krb5_crypto_mode
Annotated Snippet
struct krb5_buffer {
unsigned int len;
void *data;
};
/*
* Kerberos encoding type definition.
*/
struct krb5_enctype {
int etype; /* Encryption (key) type */
int ctype; /* Checksum type */
const char *name; /* "Friendly" name */
const char *encrypt_name; /* Crypto encrypt+checksum name */
const char *cksum_name; /* Crypto checksum name */
const char *hash_name; /* Crypto hash name */
const char *derivation_enc; /* Cipher used in key derivation */
u16 block_len; /* Length of encryption block */
u16 conf_len; /* Length of confounder (normally == block_len) */
u16 cksum_len; /* Length of checksum */
u16 key_bytes; /* Length of raw key, in bytes */
u16 key_len; /* Length of final key, in bytes */
u16 hash_len; /* Length of hash in bytes */
u16 prf_len; /* Length of PRF() result in bytes */
u16 Kc_len; /* Length of Kc in bytes */
u16 Ke_len; /* Length of Ke in bytes */
u16 Ki_len; /* Length of Ki in bytes */
bool keyed_cksum; /* T if a keyed cksum */
const struct krb5_crypto_profile *profile;
int (*random_to_key)(const struct krb5_enctype *krb5,
const struct krb5_buffer *in,
struct krb5_buffer *out); /* complete key generation */
};
/*
* krb5_api.c
*/
const struct krb5_enctype *crypto_krb5_find_enctype(u32 enctype);
size_t crypto_krb5_how_much_buffer(const struct krb5_enctype *krb5,
enum krb5_crypto_mode mode,
size_t data_size, size_t *_offset);
size_t crypto_krb5_how_much_data(const struct krb5_enctype *krb5,
enum krb5_crypto_mode mode,
size_t *_buffer_size, size_t *_offset);
int crypto_krb5_where_is_the_data(const struct krb5_enctype *krb5,
enum krb5_crypto_mode mode,
size_t *_offset, size_t *_len);
int crypto_krb5_check_data_len(const struct krb5_enctype *krb5,
enum krb5_crypto_mode mode,
size_t len, size_t min_content);
struct crypto_aead *crypto_krb5_prepare_encryption(const struct krb5_enctype *krb5,
const struct krb5_buffer *TK,
u32 usage, gfp_t gfp);
struct crypto_shash *crypto_krb5_prepare_checksum(const struct krb5_enctype *krb5,
const struct krb5_buffer *TK,
u32 usage, gfp_t gfp);
ssize_t crypto_krb5_encrypt(const struct krb5_enctype *krb5,
struct crypto_aead *aead,
struct scatterlist *sg, unsigned int nr_sg,
size_t sg_len,
size_t data_offset, size_t data_len,
bool preconfounded);
int crypto_krb5_decrypt(const struct krb5_enctype *krb5,
struct crypto_aead *aead,
struct scatterlist *sg, unsigned int nr_sg,
size_t *_offset, size_t *_len);
ssize_t crypto_krb5_get_mic(const struct krb5_enctype *krb5,
struct crypto_shash *shash,
const struct krb5_buffer *metadata,
struct scatterlist *sg, unsigned int nr_sg,
size_t sg_len,
size_t data_offset, size_t data_len);
int crypto_krb5_verify_mic(const struct krb5_enctype *krb5,
struct crypto_shash *shash,
const struct krb5_buffer *metadata,
struct scatterlist *sg, unsigned int nr_sg,
size_t *_offset, size_t *_len);
/*
* krb5_kdf.c
*/
int crypto_krb5_calc_PRFplus(const struct krb5_enctype *krb5,
const struct krb5_buffer *K,
unsigned int L,
const struct krb5_buffer *S,
struct krb5_buffer *result,
gfp_t gfp);
#endif /* _CRYPTO_KRB5_H */
Annotation
- Immediate include surface: `linux/crypto.h`, `crypto/aead.h`, `crypto/hash.h`.
- Detected declarations: `struct crypto_shash`, `struct scatterlist`, `struct krb5_buffer`, `struct krb5_enctype`, `enum krb5_crypto_mode`.
- 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.