package core:crypto/streebog

Types

Streebog_Context ¶

Streebog_Context :: struct {
	buffer:    [64]u8,
	h:         [64]u8,
	n:         [64]u8,
	sigma:     [64]u8,
	v_0:       [64]u8,
	v_512:     [64]u8,
	buf_size:  u64,
	hash_size: int,
	is256:     bool,
}

Constants

DIGEST_SIZE_256 ¶

DIGEST_SIZE_256 :: 32

DIGEST_SIZE_512 ¶

DIGEST_SIZE_512 :: 64

Variables

PI ¶

PI: [256]u8 = …

STREEBOG_A ¶

STREEBOG_A: [64]u64 = …

STREEBOG_C ¶

STREEBOG_C: [12][64]u8 = …

TAU ¶

TAU: [64]u8 = …

Procedures

E ¶

E :: proc "odin" (dst, key, nonce: []u8) {…}

G ¶

G :: proc "odin" (dst, key, nonce: []u8) {…}

L ¶

L :: proc "odin" (dst: []u8) {…}

P ¶

P :: proc "odin" (dst: []u8) {…}

S ¶

S :: proc "odin" (dst: []u8) {…}

X ¶

X :: proc "odin" (dst, key, nonce: []u8) {…}

add_mod_512 ¶

add_mod_512 :: proc "odin" (dst, key, nonce: []u8) {…}

final ¶

final :: proc "odin" (ctx: ^Streebog_Context, data: []u8) {…}

get_key ¶

get_key :: proc "odin" (K: []u8, i: i32) {…}

hash_bytes_256 ¶

hash_bytes_256 :: proc "odin" (data: []u8) -> [32]u8 {…}
 

hash_bytes_256 will hash the given input and return the computed hash

hash_bytes_512 ¶

hash_bytes_512 :: proc "odin" (data: []u8) -> [64]u8 {…}
 

hash_bytes_512 will hash the given input and return the computed hash

hash_bytes_to_buffer_256 ¶

hash_bytes_to_buffer_256 :: proc "odin" (data, hash: []u8) {…}
 

hash_bytes_to_buffer_256 will hash the given input and write the computed hash into the second parameter. It requires that the destination buffer is at least as big as the digest size

hash_bytes_to_buffer_512 ¶

hash_bytes_to_buffer_512 :: proc "odin" (data, hash: []u8) {…}
 

hash_bytes_to_buffer_512 will hash the given input and write the computed hash into the second parameter. It requires that the destination buffer is at least as big as the digest size

hash_file_256 ¶

hash_file_256 :: proc "odin" (hd: os.Handle, load_at_once: bool = false) -> ([32]u8, bool) {…}
 

hash_file_256 will read the file provided by the given handle and compute a hash

hash_file_512 ¶

hash_file_512 :: proc "odin" (hd: os.Handle, load_at_once: bool = false) -> ([64]u8, bool) {…}
 

hash_file_512 will read the file provided by the given handle and compute a hash

hash_stream_256 ¶

hash_stream_256 :: proc "odin" (s: io.Stream) -> ([32]u8, bool) {…}
 

hash_stream_256 will read the stream in chunks and compute a hash from its contents

hash_stream_512 ¶

hash_stream_512 :: proc "odin" (s: io.Stream) -> ([64]u8, bool) {…}
 

hash_stream_512 will read the stream in chunks and compute a hash from its contents

hash_string_256 ¶

hash_string_256 :: proc "odin" (data: string) -> [32]u8 {…}
 

hash_string_256 will hash the given input and return the computed hash

hash_string_512 ¶

hash_string_512 :: proc "odin" (data: string) -> [64]u8 {…}
 

hash_string_512 will hash the given input and return the computed hash

hash_string_to_buffer_256 ¶

hash_string_to_buffer_256 :: proc "odin" (data: string, hash: []u8) {…}
 

hash_string_to_buffer_256 will hash the given input and assign the computed hash to the second parameter. It requires that the destination buffer is at least as big as the digest size

hash_string_to_buffer_512 ¶

hash_string_to_buffer_512 :: proc "odin" (data: string, hash: []u8) {…}
 

hash_string_to_buffer_512 will hash the given input and assign the computed hash to the second parameter. It requires that the destination buffer is at least as big as the digest size

init ¶

init :: proc "odin" (ctx: ^Streebog_Context) {…}

padding ¶

padding :: proc "odin" (ctx: ^Streebog_Context) {…}

stage2 ¶

stage2 :: proc "odin" (ctx: ^Streebog_Context, data: []u8) {…}

update ¶

update :: proc "odin" (ctx: ^Streebog_Context, data: []u8) {…}

Procedure Groups

Source Files

Generation Information

Generated with odin version dev-2022-12 (vendor "odin") Windows_amd64 @ 2022-12-06 21:08:55.196297000 +0000 UTC