ppk

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NoPassphrase = []byte("")

Functions

func LoadKeypair

func LoadKeypair(file string, passphrase []byte) (putty.Keypair, error)

Types

type Argon2Flavor

type Argon2Flavor string
const (
	Argon2d  Argon2Flavor = "Argon2d"
	Argon2i  Argon2Flavor = "Argon2i"
	Argon2id Argon2Flavor = "Argon2id"
)

type Encryption

type Encryption string
const (
	NoEncryption Encryption = "none"
	AES256CBC    Encryption = "aes256-cbc"
)

type PPK

type PPK struct {
	Version           int
	Type              string
	Encryption        Encryption
	Comment           string
	PublicBytes       []byte
	KeyDerivation     Argon2Flavor
	Argon2Memory      int
	Argon2Passes      int
	Argon2Parallelism int
	Argon2Salt        []byte
	PrivateBytes      []byte
	MAC               []byte
}

https://the.earth.li/~sgtatham/putty/0.78/htmldoc/AppendixC.html#ppk

func InsecureParse

func InsecureParse(b []byte) (*PPK, error)

func InsecureParseFile

func InsecureParseFile(file string) (*PPK, error)

func (PPK) Decrypt

func (ppk PPK) Decrypt(passphrase []byte) (putty.Keypair, error)

Jump to

Keyboard shortcuts

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