checking in some more research and primitive functions. i cannot, for the life of me, figure out why i can't (seemingly) properly decrypt private keys.
This commit is contained in:
@@ -4,9 +4,8 @@ package sshkeys
|
||||
type EncryptedSSHKeyV1 struct {
|
||||
SSHKeyV1
|
||||
CipherName string
|
||||
KDFName string
|
||||
KDFOpts SSHKDFOpts
|
||||
Passphrase string
|
||||
Passphrase []byte
|
||||
}
|
||||
|
||||
// SSHKDFOpts contains a set of KDF options.
|
||||
@@ -20,19 +19,26 @@ type SSHKDFOpts struct {
|
||||
// Patch your shit.
|
||||
type SSHKeyV1 struct {
|
||||
Magic string
|
||||
BitSize uint32
|
||||
DefKeyType string
|
||||
KDFName string
|
||||
KeySize uint32
|
||||
BlockSize uint32
|
||||
PublicKeys []SSHPubKey
|
||||
PrivateKeys []SSHPrivKey
|
||||
}
|
||||
|
||||
// SSHPubKey contains the Public key of an SSH Keypair.
|
||||
type SSHPubKey struct {
|
||||
KeyType string
|
||||
PrivateKey *SSHPrivKey
|
||||
KeyType string
|
||||
Key []byte
|
||||
}
|
||||
|
||||
// SSHPrivKey contains the Private key of an SSH Keypair.
|
||||
type SSHPrivKey struct {
|
||||
PublicKey *SSHPubKey
|
||||
Checksum uint32
|
||||
Key []byte
|
||||
Checksum []byte
|
||||
Comment string
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user