include/crypto/internal/poly1305.h
Source file repositories/reference/linux-study-clean/include/crypto/internal/poly1305.h
File Facts
- System
- Linux kernel
- Corpus path
include/crypto/internal/poly1305.h- Extension
.h- Size
- 1737 bytes
- Lines
- 57
- 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
crypto/poly1305.hlinux/types.h
Detected Declarations
function poly1305_core_initfunction poly1305_block_init_genericfunction poly1305_blocks_genericfunction poly1305_emit_generic
Annotated Snippet
#ifndef _CRYPTO_INTERNAL_POLY1305_H
#define _CRYPTO_INTERNAL_POLY1305_H
#include <crypto/poly1305.h>
#include <linux/types.h>
/*
* Poly1305 core functions. These only accept whole blocks; the caller must
* handle any needed block buffering and padding. 'hibit' must be 1 for any
* full blocks, or 0 for the final block if it had to be padded. If 'nonce' is
* non-NULL, then it's added at the end to compute the Poly1305 MAC. Otherwise,
* only the ε-almost-∆-universal hash function (not the full MAC) is computed.
*/
void poly1305_core_setkey(struct poly1305_core_key *key,
const u8 raw_key[POLY1305_BLOCK_SIZE]);
static inline void poly1305_core_init(struct poly1305_state *state)
{
*state = (struct poly1305_state){};
}
void poly1305_core_blocks(struct poly1305_state *state,
const struct poly1305_core_key *key, const void *src,
unsigned int nblocks, u32 hibit);
void poly1305_core_emit(const struct poly1305_state *state, const u32 nonce[4],
void *dst);
static inline void
poly1305_block_init_generic(struct poly1305_block_state *desc,
const u8 raw_key[POLY1305_BLOCK_SIZE])
{
poly1305_core_init(&desc->h);
poly1305_core_setkey(&desc->core_r, raw_key);
}
static inline void poly1305_blocks_generic(struct poly1305_block_state *state,
const u8 *src, unsigned int len,
u32 padbit)
{
poly1305_core_blocks(&state->h, &state->core_r, src,
len / POLY1305_BLOCK_SIZE, padbit);
}
static inline void poly1305_emit_generic(const struct poly1305_state *state,
u8 digest[POLY1305_DIGEST_SIZE],
const u32 nonce[4])
{
poly1305_core_emit(state, nonce, digest);
}
#endif
Annotation
- Immediate include surface: `crypto/poly1305.h`, `linux/types.h`.
- Detected declarations: `function poly1305_core_init`, `function poly1305_block_init_generic`, `function poly1305_blocks_generic`, `function poly1305_emit_generic`.
- 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.