keyderiv

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2026 License: AGPL-3.0, AGPL-3.0 Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package keyderiv owns suite-0x02 HKDF-SHA256 derivation.

Every branch uses ASCII(label)||0x00||context with an empty salt so Go and TypeScript implementations align on a single info parameter.

Index

Constants

View Source
const (
	V2ReadSecretBytes = 16
	V2IdentityBytes   = 16
	V2PKHashBytes     = 16
)
View Source
const (
	V2DescriptorLabel  = "windshare/v2 descriptor"
	V2SessionAuthLabel = "windshare/v2 session-auth"
)
View Source
const KeyBytes = 32

KeyBytes is the uniform output length (AES-256 key) for all derived keys.

Variables

View Source
var ErrV2KeyMaterial = errors.New("keyderiv: invalid suite-0x02 key material")

Functions

func V2DescriptorKey

func V2DescriptorKey(readSecret, pkHash []byte) ([]byte, error)

V2DescriptorKey binds the bootstrap object key to the sender public-key hash.

func V2SessionAuthKey

func V2SessionAuthKey(readSecret, shareInstance []byte) ([]byte, error)

V2SessionAuthKey authenticates the transcript before sender resource admission.

Types

This section is empty.

Jump to

Keyboard shortcuts

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