Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DigestsForSSH

func DigestsForSSH(sshPK ssh.PublicKey, v23PK, purpose, message []byte) ([]byte, security.Hash, error)

DigestsForSSH returns a concatenation of the hashes of the public key, the message and the purpose. The openSSH and openSSL ECDSA code will hash this message again internally and hence these hashes must not be themselves hashed here to ensure compatibility with the Vanadium signature verification which uses the go crypto code so that a messages signed by the SSH agent/ssl code can be verified by the Vanadium code.

func FromECDSAKey

func FromECDSAKey(key ssh.PublicKey) (security.PublicKey, error)

FromECDSAKey creates a security.PublicKey from an ssh ECDSA key.

func FromED25512Key

func FromED25512Key(key ssh.PublicKey) (security.PublicKey, error)

FromECDSAKey creates a security.PublicKey from an ssh ED25519 key.

func HashedDigestsForSSH

func HashedDigestsForSSH(sshPK ssh.PublicKey, v23PK, purpose, message []byte) ([]byte, security.Hash, error)

HashedDigestsForSSH hashes the digests returned by DigestsForSSH using an appropriate hash function for the ssh key. The ED25519 implementation in openSSH does not rehash internally and consequently this is needed for compatibility with the Vanadium code.

func IsSupported

func IsSupported(key ssh.PublicKey) bool

IsSupported returns true if the suplied ssh key type is supported.

func UnmarshalSSHECDSASignature

func UnmarshalSSHECDSASignature(sig *ssh.Signature) (r, s []byte, err error)

UnmarshalSSHECDSASignature unmarshals the R and S signature components from the returned signature.

Types

This section is empty.

Source Files