Documentation
¶
Index ¶
- func Advance(prevBundle keybase1.StellarBundle) keybase1.StellarBundle
- func Decrypt(encBundle keybase1.EncryptedStellarBundle, puk libkb.PerUserKeySeed) (res keybase1.StellarBundleSecretVersioned, err error)
- func Encrypt(bundle keybase1.StellarBundleSecretVersioned, ...) (res keybase1.EncryptedStellarBundle, resB64 string, err error)
- func NewInitialBundle() (res keybase1.StellarBundle, err error)
- func Unbox(decodeRes DecodeResult, visibleBundleB64 string, puk libkb.PerUserKeySeed) (res keybase1.StellarBundle, version keybase1.StellarBundleVersion, err error)
- type BoxResult
- type DecodeResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Advance ¶
func Advance(prevBundle keybase1.StellarBundle) keybase1.StellarBundle
Create the next bundle given a decrypted bundle.
func Decrypt ¶
func Decrypt(encBundle keybase1.EncryptedStellarBundle, puk libkb.PerUserKeySeed) (res keybase1.StellarBundleSecretVersioned, err error)
Decrypt decrypts the stellar key bundle. Does not check invariants.
func Encrypt ¶
func Encrypt(bundle keybase1.StellarBundleSecretVersioned, pukGen keybase1.PerUserKeyGeneration, puk libkb.PerUserKeySeed) (res keybase1.EncryptedStellarBundle, resB64 string, err error)
Encrypt encrypts the stellar key bundle for the PUK. Returns the encrypted struct and a base64 encoding for posting to the server. Does not check invariants.
func NewInitialBundle ¶
func NewInitialBundle() (res keybase1.StellarBundle, err error)
func Unbox ¶
func Unbox(decodeRes DecodeResult, visibleBundleB64 string, puk libkb.PerUserKeySeed) (res keybase1.StellarBundle, version keybase1.StellarBundleVersion, err error)
Unbox decrypts the stellar key bundle. And decodes and verifies the visible bundle. Does not check the prev hash.
Types ¶
type BoxResult ¶
type BoxResult struct {
Enc keybase1.EncryptedStellarBundle
EncB64 string // base64 msgpack'd Enc
VisB64 string // base64 msgpack'd Vis
FormatVersion keybase1.StellarBundleVersion
}
func Box ¶
func Box(bundle keybase1.StellarBundle, pukGen keybase1.PerUserKeyGeneration, puk libkb.PerUserKeySeed) (res BoxResult, err error)
Box encrypts a stellar key bundle for a PUK.
type DecodeResult ¶
type DecodeResult struct {
Enc keybase1.EncryptedStellarBundle
EncHash keybase1.Hash
}
func Decode ¶
func Decode(encryptedBundleB64 string) (res DecodeResult, err error)
Decode decodes but does not decrypt the bundle. Returns `res` which is needed to decrypt and `res.Gen` specifies the decryption PUK.
Click to show internal directories.
Click to hide internal directories.