package core:crypto/poly1305
Overview
package poly1305 implements the Poly1305 one-time MAC algorithm.
Types
Context ¶
Context :: struct { _r: field_poly1305.Tight_Field_Element, _a: field_poly1305.Tight_Field_Element, _s: [2]u64, _buffer: [16]u8, _leftover: int, _is_initialized: bool, }
Context is a Poly1305 instance.
Related Procedures With Parameters
Constants
Variables
This section is empty.
Procedures
final ¶
final finalizes the Context, writes the tag to dst, and calls reset on the Context.
init ¶
init initializes a Context with the specified key. The key SHOULD be unique and MUST be unpredictable for each invocation.
reset ¶
reset :: proc(ctx: ^Context) {…}
reset sanitizes the Context. The Context must be re-initialized to be used again.
sum ¶
sum :: proc(dst, msg, key: []u8) {…}
sum will compute the Poly1305 MAC with the key over msg, and write the computed tag to dst. It requires that the dst buffer is the tag size.
The key SHOULD be unique and MUST be unpredictable for each invocation.
verify ¶
verify will verify the Poly1305 tag computed with the key over msg and return true iff the tag is valid. It requires that the tag is correctly sized.
Procedure Groups
This section is empty.
Source Files
Generation Information
Generated with odin version dev-2024-12 (vendor "odin") Windows_amd64 @ 2024-12-06 21:12:12.401686600 +0000 UTC