package core:crypto/aegis
Overview
package aegis implements the AEGIS-128L and AEGIS-256 Authenticated Encryption with Additional Data algorithms.
See: https://www.ietf.org/archive/id/draft-irtf-cfrg-aegis-aead-12.txt
Index
Types (1)
Constants (6)
Variables (0)
This section is empty.
Procedures (5)
Procedure Groups (0)
This section is empty.
Types
Context ¶
Context :: struct { _key: [32]u8, _key_len: int, _impl: aes.Implementation, _is_initialized: bool, }
Context is a keyed AEGIS-128L or AEGIS-256 instance.
Related Procedures With Parameters
Constants
TAG_SIZE_128 ¶
TAG_SIZE_128: int : 16
TAG_SIZE_128 is the AEGIS-128L or AEGIS-256 128-bit tag size in bytes.
TAG_SIZE_256 ¶
TAG_SIZE_256: int : 32
TAG_SIZE_256 is the AEGIS-128L or AEGIS-256 256-bit tag size in bytes.
Variables
This section is empty.
Procedures
init ¶
init :: proc(ctx: ^Context, key: []u8, impl: aes.Implementation = aes.DEFAULT_IMPLEMENTATION) {…}
init initializes a Context with the provided key, for AEGIS-128L or AEGIS-256.
is_hardware_accelerated ¶
is_hardware_accelerated :: proc "contextless" () -> bool {…}
is_hardware_accelerated returns true iff hardware accelerated AEGIS is supported.
open ¶
open authenticates the aad and ciphertext, and decrypts the ciphertext, with the provided Context, iv, and tag, and stores the output in dst, returning true iff the authentication was successful. If authentication fails, the destination buffer will be zeroed.
dst and plaintext MUST alias exactly or not at all.
reset ¶
reset :: proc "contextless" (ctx: ^Context) {…}
reset sanitizes the Context. The Context must be re-initialized to be used again.
seal ¶
seal encrypts the plaintext and authenticates the aad and ciphertext, with the provided Context and iv, stores the output in dst and tag.
dst and plaintext MUST alias exactly or not at all.
Procedure Groups
This section is empty.
Source Files
Generation Information
Generated with odin version dev-2025-03 (vendor "odin") Windows_amd64 @ 2025-03-25 21:11:15.149517300 +0000 UTC