2020-09-03 19:11:42 -04:00
|
|
|
package sshkeys
|
|
|
|
|
2020-09-11 23:06:51 -04:00
|
|
|
// Needed for V1 key format.
|
2020-09-03 19:11:42 -04:00
|
|
|
const (
|
2020-09-11 23:06:51 -04:00
|
|
|
KeyV1Magic string = "openssh-key-v1"
|
2020-09-03 19:11:42 -04:00
|
|
|
)
|
|
|
|
|
2020-09-11 23:53:55 -04:00
|
|
|
// Cipher names. I believe only AES256-CTR is supported upstream currently.
|
2020-09-11 23:06:51 -04:00
|
|
|
const (
|
2020-09-12 00:58:58 -04:00
|
|
|
CIPHER_NULL string = "none"
|
|
|
|
CIPHER_AES256_CTR string = "aes256-ctr"
|
2020-09-11 23:53:55 -04:00
|
|
|
)
|
|
|
|
|
2020-09-12 00:58:58 -04:00
|
|
|
var allowed_ciphers = [...]string{CIPHER_NULL, CIPHER_AES256_CTR}
|
|
|
|
|
2020-09-11 23:53:55 -04:00
|
|
|
// Key types.
|
|
|
|
const (
|
|
|
|
KEY_ED25519 string = "ssh-ed25519"
|
|
|
|
KEY_RSA string = "ssh-rsa"
|
|
|
|
)
|
|
|
|
|
2020-09-12 00:58:58 -04:00
|
|
|
var allowed_keytypes = [...]string{KEY_ED25519, KEY_RSA}
|
|
|
|
|
2020-09-11 23:53:55 -04:00
|
|
|
// KDF names. I believe only bcrypt is supported upstream currently.
|
|
|
|
const (
|
2020-09-12 00:58:58 -04:00
|
|
|
KDF_NULL string = "none"
|
2020-09-11 23:53:55 -04:00
|
|
|
KDF_BCRYPT string = "bcrypt"
|
2020-09-11 23:06:51 -04:00
|
|
|
)
|
2020-09-12 00:58:58 -04:00
|
|
|
|
|
|
|
var allowed_kdfnames = [...]string{KDF_NULL, KDF_BCRYPT}
|