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,21 +1,12 @@
package sshkeys
// https://github.com/openssh/openssh-portable/blob/master/PROTOCOL.key
// Needed for V1 key format.
const (
AuthMagic string = "openssh-key-v1"
KeyV1Magic string = "openssh-key-v1"
)
type EncryptedSSHKey2 struct {
SSHKey2
Salt string
Rounds uint32
}
type SSHKey2 struct {
CipherName string
KDFName string
KDFOpts string
NumKeys int
Keys []string
Encrypted []string
}
// Key cipher names.
const (
CipherED25519 = iota
CipherRSA = iota
)