Documentation
¶
Index ¶
- func AESGCMDecrypt(key, encrypted, iv, additionalData, tag []byte) ([]byte, error)
- func AESGCMEncrypt(key, plaintext, iv, additionalData []byte) ([]byte, error)
- func EnHash(key []byte) []byte
- func RescueCode(rand io.Reader) (string, error)
- type AEADEncrypted
- type EnscryptResult
- type S4Data
- type S4Type1
- type S4Type2
- type S4Type3
- type SqrlIdentity
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AESGCMDecrypt ¶
func AESGCMEncrypt ¶
Types ¶
type AEADEncrypted ¶
func AESGCMEncryptOld ¶
type S4Data ¶
type S4Type1 ¶
type S4Type1 struct {
Length uint16 // == 125
Type uint16 // == 1
PlainLength uint16 // == 45
AESGCMIV [12]byte // 12
ScryptSalt [16]byte // 16
ScryptN byte
ScryptIterations uint32
OptionFlags uint16
HintLength byte
PasswordVerifySeconds byte
IdleTimeoutMinutes uint16
EncryptedIdentityMasterKey [32]byte // 32
EncryptedIdentityLockKey [32]byte // 32
VerificationTag [16]byte // 16
}
S4Type1 Password encrypted data
func S4Type1Decode ¶
func (*S4Type1) AdditionalData ¶
type S4Type2 ¶
type S4Type2 struct {
Length uint16 // == 73
Type uint16 // == 2
ScryptSalt [16]byte // 16
ScryptN byte
ScryptIterations uint32
EncryptedIdentityUnlockKey [32]byte // 32
VerificationTag [16]byte // 16
}
S4Type2 RescueCode encrypted data
func S4Type2Decode ¶
func (*S4Type2) AdditionalData ¶
type S4Type3 ¶
type S4Type3 struct {
Length uint16 // == 54,86,118,150 (+32 for each previous key)
Type uint16 // == 2
Edition uint16
// array of previous keys sorted with oldest last
EncryptedIdentityPreviousUnlockKey [][32]byte
VerificationTag [16]byte // 16
}
S4Type3 Previous identities encrypted data
func S4Type3Decode ¶
type SqrlIdentity ¶
type SqrlIdentity struct {
IdentityUnlockKey []byte
IdentityLockKey []byte
IdentityMasterKey []byte
RescueCode string
}
func CreateIdentity ¶
func CreateIdentity(rand io.Reader, password string) (*SqrlIdentity, error)
func (*SqrlIdentity) GenerateUnlockPublicKeys ¶
func (*SqrlIdentity) GenerateUnlockRequestSigningKey ¶
func (si *SqrlIdentity) GenerateUnlockRequestSigningKey(serverUnlockKey []byte) ed25519.PrivateKey
func (*SqrlIdentity) IdentityUnlockAccessCode ¶
func (i *SqrlIdentity) IdentityUnlockAccessCode() []byte
Click to show internal directories.
Click to hide internal directories.