updating refs, finished key gen buffer
This commit is contained in:
15 files changed
+567
-550
No files matched your search
+5
-5
@@ -31,14 +31,14 @@ type EncryptedSSHKeyV1 struct {
|
||||
Passphrase []byte
|
||||
}
|
||||
|
||||
// SSHEncryptionKey contains the PublicKey and PrivateKey bytes (as derived by KDF, different from the actual SSH keypair),
|
||||
// SSHCrypt contains the encryption object Stream, the cipher object Cipher, the ephemeral salt (CryptSalt), and the ephemeral key (CryptKey).
|
||||
// the Cipher, and the stream.
|
||||
type SSHCrypt struct {
|
||||
Stream cipher.Stream
|
||||
Cipher cipher.Block
|
||||
CryptSalt []byte
|
||||
PrivateKey []byte
|
||||
CryptKey []byte
|
||||
PrivateKey []byte // encryption key
|
||||
CryptSalt []byte // ephemeral salt
|
||||
CryptKey []byte // ephemeral key (not really used)
|
||||
}
|
||||
|
||||
// SSHKDFOpts contains a set of KDF options.
|
||||
@@ -56,7 +56,6 @@ type SSHKeyV1 struct {
|
||||
KDFName string
|
||||
CipherName string
|
||||
KeySize uint32
|
||||
BlockSize uint32
|
||||
Keys []SSHPrivKey // 1 by default.
|
||||
Buffer bytes.Buffer
|
||||
}
|
||||
@@ -71,6 +70,7 @@ type SSHPubKey struct {
|
||||
type SSHPrivKey struct {
|
||||
PublicKey *SSHPubKey
|
||||
BitSize uint32
|
||||
BlockSize int
|
||||
Key interface{}
|
||||
// ED25519 keys are actually "sk + pk", where sk is the secret key and pk is the pubkey.
|
||||
// We store that here.
|
||||
|
||||
Reference in new issue
Block a user