chacha20

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 24, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BlockSize = 64
	Rounds    = 20
	KeySize   = 32
	NonceSize = 12
)

Variables

This section is empty.

Functions

func DerivePoly1305Key

func DerivePoly1305Key(out *[32]byte, key, nonce []byte)

DerivePoly1305Key derives the Poly1305 key for ChaCha20-Poly1305.

func HChaCha20

func HChaCha20(out *[32]byte, key, nonce []byte)

HChaCha20 derives a subkey from key and 16-byte nonce, as defined in RFC 8439.

func XORKeyStream

func XORKeyStream(dst, src, key, nonce []byte, counter uint32)

XORKeyStream XORs src with the ChaCha20 keystream and writes the result to dst.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL