adding documentation/analysis of key format

This commit is contained in:
2020-09-11 23:06:51 -04:00
parent 456284a697
commit 6e032d8969
11 changed files with 267 additions and 124 deletions

View File

@@ -1,11 +1,21 @@
package sshkeys
type SSHPubkey struct {
// Raw ???
B64 string
Comment string
// EncryptedSSHKeyV1 represents an encrypted private key.
type EncryptedSSHKeyV1 struct {
SSHKeyV1
Salt string
Rounds uint32
Passphrase string
}
type SSHPrivateKey struct {
// SSHKeyV1 represents an unencrypted private key.
// We don't bother with the legacy (pre v1) keys. Sorry not sorry.
// Patch your shit.
type SSHKeyV1 struct {
CipherName string
KDFName string
KDFOpts string
NumKeys uint32
Publickey string
Privatekey string
}