crypto/aegis128-neon.c
Source file repositories/reference/linux-study-clean/crypto/aegis128-neon.c
File Facts
- System
- Linux kernel
- Corpus path
crypto/aegis128-neon.c- Extension
.c- Size
- 1450 bytes
- Lines
- 61
- Domain
- Kernel Services
- Bucket
- crypto
- Inferred role
- Kernel Services: implementation source
- Status
- source 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
asm/cpufeature.hasm/simd.haegis.haegis-neon.h
Detected Declarations
function crypto_aegis128_have_simdfunction crypto_aegis128_init_simdfunction crypto_aegis128_update_simdfunction crypto_aegis128_encrypt_chunk_simdfunction crypto_aegis128_decrypt_chunk_simdfunction crypto_aegis128_final_simd
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Copyright (C) 2019 Linaro Ltd <ard.biesheuvel@linaro.org>
*/
#include <asm/cpufeature.h>
#include <asm/simd.h>
#include "aegis.h"
#include "aegis-neon.h"
int aegis128_have_aes_insn __ro_after_init;
bool crypto_aegis128_have_simd(void)
{
if (cpu_have_feature(cpu_feature(AES))) {
aegis128_have_aes_insn = 1;
return true;
}
return IS_ENABLED(CONFIG_ARM64);
}
void crypto_aegis128_init_simd(struct aegis_state *state,
const union aegis_block *key,
const u8 *iv)
{
scoped_ksimd()
crypto_aegis128_init_neon(state, key, iv);
}
void crypto_aegis128_update_simd(struct aegis_state *state, const void *msg)
{
scoped_ksimd()
crypto_aegis128_update_neon(state, msg);
}
void crypto_aegis128_encrypt_chunk_simd(struct aegis_state *state, u8 *dst,
const u8 *src, unsigned int size)
{
scoped_ksimd()
crypto_aegis128_encrypt_chunk_neon(state, dst, src, size);
}
void crypto_aegis128_decrypt_chunk_simd(struct aegis_state *state, u8 *dst,
const u8 *src, unsigned int size)
{
scoped_ksimd()
crypto_aegis128_decrypt_chunk_neon(state, dst, src, size);
}
int crypto_aegis128_final_simd(struct aegis_state *state,
union aegis_block *tag_xor,
unsigned int assoclen,
unsigned int cryptlen,
unsigned int authsize)
{
scoped_ksimd()
return crypto_aegis128_final_neon(state, tag_xor, assoclen,
cryptlen, authsize);
}
Annotation
- Immediate include surface: `asm/cpufeature.h`, `asm/simd.h`, `aegis.h`, `aegis-neon.h`.
- Detected declarations: `function crypto_aegis128_have_simd`, `function crypto_aegis128_init_simd`, `function crypto_aegis128_update_simd`, `function crypto_aegis128_encrypt_chunk_simd`, `function crypto_aegis128_decrypt_chunk_simd`, `function crypto_aegis128_final_simd`.
- Atlas domain: Kernel Services / crypto.
- 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.