sshkey

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2026 License: MIT Imports: 21 Imported by: 0

Documentation

Overview

Package sshkey implements a provider that derives a 32-byte secret from an SSH private key. The key material is parsed, canonically marshaled, and run through HKDF-SHA256 to produce a deterministic secret.

Supported key types: Ed25519, ECDSA, RSA. Passphrase-protected keys are supported (prompts for passphrase).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ProbeKeyFile

func ProbeKeyFile(path string) (bool, error)

ProbeKeyFile checks if an SSH key file exists and whether it needs a passphrase. Returns (needsPassphrase, error). Error is non-nil if the file can't be read or parsed.

Types

type SSHKey

type SSHKey struct{}

SSHKey is the SSH key provider.

func (*SSHKey) Derive

func (s *SSHKey) Derive(ctx context.Context, params map[string]string) ([]byte, error)

func (*SSHKey) Description

func (s *SSHKey) Description() string

func (*SSHKey) Enroll

func (s *SSHKey) Enroll(ctx context.Context, id string) (*provider.EnrollResult, error)

func (*SSHKey) InteractiveDerive

func (s *SSHKey) InteractiveDerive() bool

func (*SSHKey) Type

func (s *SSHKey) Type() string

Jump to

Keyboard shortcuts

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