kem

package
v0.0.0-...-2514748 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package kem implements Family 14: kem_encap(), kem_decap(). Supports ECDH-P256, ECDH-P384, X25519.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func KEMDecapsulate

func KEMDecapsulate(privateKeyStr string, encapsulation []byte, algorithm string, keyFormat types.KeyFormat) ([]byte, error)

KEMDecapsulate recovers the shared secret from the encapsulation using the private key.

Types

type KEMResult

type KEMResult = types.KEMResult

KEMResult holds the output of key encapsulation.

func KEMEncapsulate

func KEMEncapsulate(publicKeyStr string, algorithm string, keyFormat types.KeyFormat) (KEMResult, error)

KEMEncapsulate generates a shared secret and encapsulation using the public key.

Jump to

Keyboard shortcuts

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