libkb

package
v0.0.0-...-5e4fb97 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 23, 2015 License: BSD-3-Clause Imports: 57 Imported by: 0

Documentation

Overview

Code used in populating JSON objects to generating Keybase-style signatures.

A KeyFamily is a group of sibling keys that have equal power for a user. A family can consist of 1 PGP keys, and arbitrarily many NaCl Sibkeys. There also can be some subkeys dangling off for ECDH.

A module for syncing secrets with the server, such as P3SKB PGP keys, and server-halves of our various secret keys.

Index

Constants

View Source
const (
	XAPI_RES_JSON = iota
	XAPI_RES_HTML = iota
	XAPI_RES_TEXT = iota
)
View Source
const (
	NONE   = iota
	OR     = iota
	AND    = iota
	LPAREN = iota
	RPAREN = iota
	URL    = iota
	EOF    = iota
	ERROR  = iota
)
View Source
const (
	SC_OK                        = 0
	SC_BAD_SESSION               = 202
	SC_BAD_LOGIN_PASSWORD        = 204
	SC_GENERIC                   = 218
	SC_BAD_SIGNUP_USERNAME_TAKEN = 701
	SC_KEY_BAD_GEN               = 913
	SC_BAD_TRACK_SESSION         = 1301
)
View Source
const (
	MERKLE_TREE_NODE = 1
	MERKLE_TREE_LEAF = 2
)
View Source
const (
	PROOF_STATE_NONE         = 0
	PROOF_STATE_OK           = 1
	PROOF_STATE_TEMP_FAILURE = 2
	PROOF_STATE_PERM_FAILURE = 3
	PROOF_STATE_LOOKING      = 4
	PROOF_STATE_SUPERSEDED   = 5
	PROOF_STATE_POSTED       = 6
	PROOF_STATE_REVOKED      = 7
)

Taken from node-client/src/constants.iced

View Source
const (
	SIG_TYPE_NONE           = 0
	SIG_TYPE_SELF_SIG       = 1
	SIG_TYPE_REMOTE_PROOF   = 2
	SIG_TYPE_TRACK          = 3
	SIG_TYPE_UNTRACK        = 4
	SIG_TYPE_REVOKE         = 5
	SIG_TYPE_CRYPTOCURRENCY = 6
	SIG_TYPE_ANNOUNCEMENT   = 7
)
View Source
const (
	DB_USER                       = 0x00
	DB_SIG                        = 0x0f
	DB_LINK                       = 0xe0
	DB_LOCAL_TRACK                = 0xe1
	DB_PGP_KEY                    = 0xe3
	DB_SIG_HINTS                  = 0xe4
	DB_PROOF_CHECK                = 0xe5
	DB_USER_SECRET_KEYS           = 0xe6
	DB_SIG_CHAIN_TAIL_PUBLIC      = 0xe7
	DB_SIG_CHAIN_TAIL_SEMIPRIVATE = 0xe8
	DB_SIG_CHAIN_TAIL_ENCRYPTED   = 0xe9
	DB_MERKLE_ROOT                = 0xf0
)
View Source
const (
	DB_LOOKUP_USERNAME    = 0x00
	DB_LOOKUP_MERKLE_ROOT = 0x01
)
View Source
const (
	DEVICE_ID_LEN    = 32
	DEVICE_ID_SUFFIX = 0x18
)
View Source
const (
	KEYGEN_PHASE_NONE      = iota
	KEYGEN_PHASE_CHECKED   = iota
	KEYGEN_PHASE_GENERATED = iota
	KEYGEN_PHASE_POSTED    = iota
)
View Source
const (
	NODE_HASH_LEN_LONG  = sha512.Size // = 64
	NODE_HASH_LEN_SHORT = sha256.Size // = 32
)
View Source
const (
	PROOF_NONE  = 0
	PROOF_OK    = 1
	PROOF_LOCAL = 2
	PROOF_FOUND = 3 // It's been found in the hunt, but not proven yet

	// Retryable =soft errors
	PROOF_BASE_ERROR        = 100
	PROOF_HOST_UNREACHABLE  = 101
	PROOF_PERMISSION_DENIED = 103 // # Since the user might fix it
	PROOF_FAILED_PARSE      = 106
	PROOF_DNS_ERROR         = 107
	PROOF_AUTH_FAILED       = 108
	PROOF_HTTP_500          = 150
	PROOF_TIMEOUT           = 160
	PROOF_INTERNAL_ERROR    = 170

	// Likely will result in a hard error, if repeated enough
	PROOF_BASE_HARD_ERROR  = 200
	PROOF_NOT_FOUND        = 201
	PROOF_CONTENT_FAILURE  = 202
	PROOF_BAD_USERNAME     = 203
	PROOF_BAD_REMOTE_ID    = 204
	PROOF_TEXT_NOT_FOUND   = 205
	PROOF_BAD_ARGS         = 206
	PROOF_CONTENT_MISSING  = 207
	PROOF_TITLE_NOT_FOUND  = 208
	PROOF_SERVICE_ERROR    = 209
	PROOF_TOR_SKIPPED      = 210
	PROOF_TOR_INCOMPATIBLE = 211
	PROOF_HTTP_300         = 230
	PROOF_HTTP_400         = 240
	PROOF_HTTP_OTHER       = 260
	PROOF_EMPTY_JSON       = 270

	// Hard final errors
	PROOF_DELETED       = 301
	PROOF_SERVICE_DEAD  = 302
	PROOF_BAD_SIGNATURE = 303
	PROOF_BAD_API_URL   = 304
	PROOF_UNKNOWN_TYPE  = 305
	PROOF_NO_HINT       = 306
	PROOF_BAD_HINT_TEXT = 307
)
View Source
const (
	SIG_ID_LEN    = 32
	SIG_ID_SUFFIX = 0x0f
)
View Source
const (
	UID_LEN    = 16
	UID_SUFFIX = 0x00
)
View Source
const (
	HTTP_DEFAULT_TIMEOUT = 10 * time.Second
)
View Source
const (
	ID_SUFFIX_KID = 0x0a
)
View Source
const (
	LINK_ID_LEN = 32
)
View Source
const NACL_DH_KEYSIZE = 32
View Source
const (
	PGP_FINGERPRINT_LEN = 20
)
View Source
const SharedSecretLen = 32

Variables

View Source
var (
	KEYBASE_PACKET_V1 = 1
	TAG_P3SKB         = 513
	TAG_SIGNATURE     = 514
)

Packet tags for OpenPGP and also Keybase packets

View Source
var (
	KID_PGP_BASE    = 0x00
	KID_PGP_RSA     = 0x1
	KID_PGP_ELGAMAL = 0x10
	KID_PGP_DSA     = 0x11
	KID_PGP_ECDH    = 0x12
	KID_PGP_ECDSA   = 0x13
	KID_NACL_EDDSA  = 0x20
	KID_NACL_DH     = 0x21
)
View Source
var (
	HASH_PGP_MD5       = 1
	HASH_PGP_SHA1      = 2
	HASH_PGP_RIPEMD160 = 3
	HASH_PGP_SHA256    = 8
	HASH_PGP_SHA384    = 9
	HASH_PGP_SHA512    = 10
	HASH_PGP_SHA224    = 11
)

OpenPGP hash IDs, taken from http://tools.ietf.org/html/rfc4880#section-9.4

View Source
var (
	PROOF_TYPE_NONE             = 0
	PROOF_TYPE_KEYBASE          = 1
	PROOF_TYPE_TWITTER          = 2
	PROOF_TYPE_GITHUB           = 3
	PROOF_TYPE_REDDIT           = 4
	PROOF_TYPE_COINBASE         = 5
	PROOF_TYPE_HACKERNEWS       = 6
	PROOF_TYPE_GENERIC_WEB_SITE = 1000
	PROOF_TYPE_DNS              = 1001
)
View Source
var (
	REV_SIMPLE_DELETE = 0
	REV_FULL          = 1
	REV_DATED         = 2
)

key_revocation_types

View Source
var (
	KEY_LIVE       = 0
	KEY_REVOKED    = 1
	KEY_DELETED    = 2
	KEY_SUPERSEDED = 3
)

key_status

View Source
var API_URI_PATH_PREFIX = "/_/api/" + API_VERSION
View Source
var API_VERSION = "1.0"
View Source
var BundledCAs = map[string]string{

	"api.keybase.io": `-----BEGIN CERTIFICATE-----
MIIGmzCCBIOgAwIBAgIJAPzhpcIBaOeNMA0GCSqGSIb3DQEBBQUAMIGPMQswCQYD
VQQGEwJVUzELMAkGA1UECBMCTlkxETAPBgNVBAcTCE5ldyBZb3JrMRQwEgYDVQQK
EwtLZXliYXNlIExMQzEXMBUGA1UECxMOQ2VydCBBdXRob3JpdHkxEzARBgNVBAMT
CmtleWJhc2UuaW8xHDAaBgkqhkiG9w0BCQEWDWNhQGtleWJhc2UuaW8wHhcNMTQw
MTAyMTY0MjMzWhcNMjMxMjMxMTY0MjMzWjCBjzELMAkGA1UEBhMCVVMxCzAJBgNV
BAgTAk5ZMREwDwYDVQQHEwhOZXcgWW9yazEUMBIGA1UEChMLS2V5YmFzZSBMTEMx
FzAVBgNVBAsTDkNlcnQgQXV0aG9yaXR5MRMwEQYDVQQDEwprZXliYXNlLmlvMRww
GgYJKoZIhvcNAQkBFg1jYUBrZXliYXNlLmlvMIICIjANBgkqhkiG9w0BAQEFAAOC
Ag8AMIICCgKCAgEA3sLA6ZG8uOvmlFvFLVIOURmcQrZyMFKbVu9/TeDiemls3w3/
JzVTduD+7KiUi9R7QcCW/V1ZpReTfunm7rfACiJ1fpIkjSQrgsvKDLghIzxIS5FM
I8utet5p6QtuJhaAwmmXn8xX05FvqWNbrcXRdpL4goFdigPsFK2xhTUiWatLMste
oShI7+zmrgkx75LeLMD0bL2uOf87JjOzbY8x2sUIZLGwPoATyG8WS38ey6KkJxRj
AhG3p+OTYEjYSrsAtQA6ImbeDpfSHKOB8HF3nVp//Eb4HEiEsWwBRbQXvAWh3DYL
GukFW0wiO0HVCoWY+bHL/Mqa0NdRGOlLsbL4Z4pLrhqKgSDU8umX9YuNRRaB0P5n
TkzyU6axHqzq990Gep/I62bjsBdYYp+DjSPK43mXRrfWJl2NTcl8xKAyfsOW+9hQ
9vwK0tpSicNxfYuUZs0BhfjSZ/Tc6Z1ERdgUYRiXTtohl+SRA2IgZMloHCllVMNj
EjXhguvHgLAOrcuyhVBupiUQGUHQvkMsr1Uz8VPNDFOJedwucRU2AaR881bknnSb
ds9+zNLsvUFV+BK7Qdnt/WkFpYL78rGwY47msi9Ooddx6fPyeg3qkJGM6cwn/boy
w9lQeleYDq8kyJdixIAxtAskNzRPJ4nDu2izTfByQoM8epwAWboc/gNFObMCAwEA
AaOB9zCB9DAdBgNVHQ4EFgQURqpATOw1gVVrzlqqFKbkfaKXvwowgcQGA1UdIwSB
vDCBuYAURqpATOw1gVVrzlqqFKbkfaKXvwqhgZWkgZIwgY8xCzAJBgNVBAYTAlVT
MQswCQYDVQQIEwJOWTERMA8GA1UEBxMITmV3IFlvcmsxFDASBgNVBAoTC0tleWJh
c2UgTExDMRcwFQYDVQQLEw5DZXJ0IEF1dGhvcml0eTETMBEGA1UEAxMKa2V5YmFz
ZS5pbzEcMBoGCSqGSIb3DQEJARYNY2FAa2V5YmFzZS5pb4IJAPzhpcIBaOeNMAwG
A1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggIBAA3Z5FIhulYghMuHdcHYTYWc
7xT5WD4hXQ0WALZs4p5Y+b2Af54o6v1wUE1Au97FORq5CsFXX/kGl/JzzTimeucn
YJwGuXMpilrlHCBAL5/lSQjA7qbYIolQ3SB9ON+LYuF1jKB9k8SqNp7qzucxT3tO
b8ZMDEPNsseC7NE2uwNtcW3yrTh6WZnSqg/jwswiWjHYDdG7U8FjMYlRol3wPux2
PizGbSgiR+ztI2OthxtxNWMrT9XKxNQTpcxOXnLuhiSwqH8PoY17ecP8VPpaa0K6
zym0zSkbroqydazaxcXRk3eSlc02Ktk7HzRzuqQQXhRMkxVnHbFHgGsz03L533pm
mlIEgBMggZkHwNvs1LR7f3v2McdKulDH7Mv8yyfguuQ5Jxxt7RJhUuqSudbEhoaM
6jAJwBkMFxsV2YnyFEd3eZ/qBYPf7TYHhyzmHW6WkSypGqSnXd4gYpJ8o7LxSf4F
inLjxRD+H9Xn1UVXWLM0gaBB7zZcXd2zjMpRsWgezf5IR5vyakJsc7fxzgor3Qeq
Ri6LvdEkhhFVl5rHMQBwNOPngySrq8cs/ikTLTfQVTYXXA4Ba1YyiMOlfaR1LhKw
If1AkUV0tfCTNRZ01EotKSK77+o+k214n+BAu+7mO+9B5Kb7lMFQcuWCHXKYB2Md
cT7Yh09F0QpFUd0ymEfv
-----END CERTIFICATE-----`,
}
View Source
var CANONICAL_HOST = "keybase.io"
View Source
var CLIENT_VERSION = "1.0.0"
View Source
var CONFIG_FILE = "config.json"
View Source
var CheckEmail = Checker{
	F: func(s string) bool {
		re := regexp.MustCompile(`^\S+@\S+\.\S+$`)
		return len(s) > 3 && re.MatchString(s)
	},
	Hint: "must be a valid email address",
}
View Source
var CheckEmailOrUsername = Checker{
	F: func(s string) bool {
		return CheckEmail.F(s) || CheckUsername.F(s)
	},
	Hint: "valid usernames are 2-12 letters long",
}
View Source
var CheckInviteCode = Checker{
	F: func(s string) bool {
		if b, err := hex.DecodeString(s); err != nil {
			return false
		} else {
			return len(b) == 12
		}
	},
	Hint: "Invite codes are 24-digit hex strings",
}
View Source
var CheckPassphraseNew = Checker{

	F: func(s string) bool {
		r := []rune(s)
		if len(r) > 0 && unicode.IsSpace(r[0]) {
			return false
		} else {
			return len(s) >= 12
		}
	},
	Hint:          "passphrase must be 12 or more characters",
	PreserveSpace: true,
}
View Source
var CheckPassphraseSimple = Checker{
	F: func(s string) bool {
		return len(s) > 0
	},
	Hint: "passphrase cannot be empty",
}
View Source
var CheckUsername = Checker{
	F: func(s string) bool {
		re := regexp.MustCompile(`^([a-z0-9][a-z0-9_]?)+$`)
		return len(s) >= 2 && len(s) <= 16 && re.MatchString(s)
	},
	Hint: "between 2 and 16 characters long",
}
View Source
var CheckYesNo = Checker{
	F: func(s string) bool {
		return IsYes(s) || IsNo(s)
	},
	Hint: "'yes' or 'no'",
}
View Source
var DAEMON_PORT = 40933
View Source
var DB_FILE = "keybase.leveldb"
View Source
var ErrKeyGenArgNoDefNoCustom = stderrors.New("invalid args:  NoDefPGPUid set, but no custom PGPUids.")
View Source
var GO_CLIENT_ID = "keybase.io go client"
View Source
var IDENTIFY_AS = GO_CLIENT_ID + " v" + CLIENT_VERSION + " " + runtime.GOOS
View Source
var KEYBASE_KID_V1 = 1 // Uses SHA-256
View Source
var KEYBASE_KID_V2 = 2 // Uses Shake256
View Source
var KEYBASE_SIGNATURE_V1 = 1
View Source
var MERKLE_PROD_KEY = "03E146CDAF8136680AD566912A32340CEC8C9492"
View Source
var MERKLE_TEST_KEY = "A05161510EE696601BA0EC7B3FD53B4871528CEF"
View Source
var NACL_DH_EXPIRE_IN = 24 * 60 * 60 * 365 * 3 // 3 years
View Source
var NACL_EDDSA_EXPIRE_IN = 24 * 60 * 60 * 365 * 3 // 3 years
View Source
var PERM_DIR os.FileMode = 0700
View Source
var PERM_FILE os.FileMode = 0600
View Source
var PGP_FINGERPRINT_HEX_LEN = 40
View Source
var PGP_VERSION = "Keybase Go CLI " + CLIENT_VERSION + " (" + runtime.GOOS + ")"
View Source
var PROOF_CACHE_SIZE = 0x10000
View Source
var REDDIT_PREFIX = "https://www.reddit.com"
View Source
var REDDIT_SUB = REDDIT_PREFIX + "/r/keybaseproofs"
View Source
var REMOTE_SERVICE_TYPES = map[string]int{
	"keybase":    PROOF_TYPE_KEYBASE,
	"twitter":    PROOF_TYPE_TWITTER,
	"github":     PROOF_TYPE_GITHUB,
	"reddit":     PROOF_TYPE_REDDIT,
	"coinbase":   PROOF_TYPE_COINBASE,
	"hackernews": PROOF_TYPE_HACKERNEWS,
	"https":      PROOF_TYPE_GENERIC_WEB_SITE,
	"http":       PROOF_TYPE_GENERIC_WEB_SITE,
	"dns":        PROOF_TYPE_DNS,
}
View Source
var SECRET_KEYRING = "secretkeys.mpack"
View Source
var (
	SERVER_UPDATE_LAG = time.Minute
)
View Source
var SERVER_URL = "https://api.keybase.io:443"
View Source
var SESSION_FILE = "session.json"
View Source
var SHA256_CODE int = 8
View Source
var SIG_EXPIRE_IN = 24 * 60 * 60 * 365 * 10 // 10 years
View Source
var (
	SIG_KB_EDDSA = KID_NACL_EDDSA
)
View Source
var SIG_SHORT_ID_BYTES = 27
View Source
var SOCKET_FILE = "keybased.sock"
View Source
var TRACK_SESSION_TIMEOUT = time.Minute
View Source
var UMASKABLE_PERM_FILE os.FileMode = 0666
View Source
var USER_AGENT = ("Keybase-Go-CLI/" + CLIENT_VERSION +
	" (" + runtime.Version() + " on " + runtime.GOOS + ")")
View Source
var USER_CACHE_SIZE = 0x1000

Functions

func ApiBase

func ApiBase(un string) string

func AttachedSign

func AttachedSign(out io.WriteCloser, signed openpgp.Entity, hints *openpgp.FileHints,
	config *packet.Config) (in io.WriteCloser, err error)

AttachedSign is like openpgp.Encrypt (as in p.crypto/openpgp/write.go), but don't encrypt at all, just sign the literal unencrypted data. Unfortunately we need to duplicate some code here that's already in write.go

func AttachedSignWrapper

func AttachedSignWrapper(out io.WriteCloser, key PgpKeyBundle, armored bool) (
	in io.WriteCloser, err error)

func BindToSocket

func BindToSocket(info SocketInfo) (ret net.Listener, err error)

func BtcAddrCheck

func BtcAddrCheck(s string, opts *BtcOpts) (version int, pkhash []byte, err error)

func CheckKarma

func CheckKarma(un string) (int, error)

func CheckPosted

func CheckPosted(proofId string) (found bool, status int, err error)

func CheckUsernameAvailable

func CheckUsernameAvailable(s string) (err error)

func Cicmp

func Cicmp(s1, s2 string) bool

func ClientId

func ClientId() *jsonw.Wrapper

func CodecHandle

func CodecHandle() *codec.MsgpackHandle

func Decode58

func Decode58(inp string) (outp []byte, err error)

func DeletePrimary

func DeletePrimary() (err error)

func DialSocket

func DialSocket(info SocketInfo) (ret net.Conn, err error)

func DisplayTrackArg

func DisplayTrackArg(sessionID int, stmt string) *keybase_1.DisplayTrackStatementArg

func DrainPipe

func DrainPipe(rc io.Reader, sink func(string)) error

func Encode58

func Encode58(inp []byte) string

func ErrToOk

func ErrToOk(err error) string

func ExportAsFOKID

func ExportAsFOKID(fp *PgpFingerprint, kid KID) (ret keybase_1.FOKID)

func ExportErrorAsStatus

func ExportErrorAsStatus(e error) (ret *keybase_1.Status)

func ExportProofError

func ExportProofError(pe ProofError) (ret keybase_1.ProofStatus)

func ExportRemoteProof

func ExportRemoteProof(p RemoteProofChainLink) keybase_1.RemoteProof

func ExportTrackDiff

func ExportTrackDiff(d TrackDiff) (res *keybase_1.TrackDiff)

func ExportTrackSummary

func ExportTrackSummary(l *TrackLookup) *keybase_1.TrackSummary

func FastByteArrayEq

func FastByteArrayEq(a, b []byte) bool

func FileExists

func FileExists(path string) (bool, error)

exists returns whether the given file or directory exists or not

func FindBase64Block

func FindBase64Block(s string, pattern []byte, url bool) bool

func FindBase64Blocks

func FindBase64Blocks(s string) []string

func FindBase64Snippets

func FindBase64Snippets(s string) []string

func FindFirstBase64Block

func FindFirstBase64Block(s string) string

func FindPinentry

func FindPinentry() (string, error)

func FormatTime

func FormatTime(tm time.Time) string

func GetLinkIdVoid

func GetLinkIdVoid(w *jsonw.Wrapper, l *LinkId, e *error)

func GetNodeHashVoid

func GetNodeHashVoid(w *jsonw.Wrapper, nhp *NodeHash, errp *error)

func GetPgpFingerprintVoid

func GetPgpFingerprintVoid(w *jsonw.Wrapper, p *PgpFingerprint, e *error)

func GetSigIdVoid

func GetSigIdVoid(jw *jsonw.Wrapper, suffix bool, p *SigId, e *error)

func GetUidVoid

func GetUidVoid(w *jsonw.Wrapper, u *UID, e *error)

func GiveMeAnS

func GiveMeAnS(i int) string

func ImportStatusAsError

func ImportStatusAsError(s *keybase_1.Status) error

func IsEmpty

func IsEmpty(s string) bool

func IsIn

func IsIn(needle string, haystack []string, ci bool) bool

func IsNo

func IsNo(s string) bool

func IsPgpAlgo

func IsPgpAlgo(algo int) bool

func IsValidHostname

func IsValidHostname(s string) bool

func IsYes

func IsYes(s string) bool

func KarmaUrl

func KarmaUrl(un string) string

func KeyToProofJson

func KeyToProofJson(key GenericKey) *jsonw.Wrapper

func KeybaseEmailAddress

func KeybaseEmailAddress(s string) string

func LockPIDFile

func LockPIDFile(filename string) error

LockPIDFile writes the pid to filename after acquiring a lock on the file. When the process exits, the lock will be released.

func LoginAndIdentify

func LoginAndIdentify(arg LoginAndIdentifyArg) error

func MakeParentDirs

func MakeParentDirs(filename string) error

func NewApiEngines

func NewApiEngines(e Env) (*InternalApiEngine, *ExternalApiEngine, error)

Make a new InternalApiEngine and a new ExternalApiEngine, which share the same network config (i.e., TOR and Proxy parameters)

func NewDnsChecker

func NewDnsChecker(p RemoteProofChainLink) (*DnsChecker, ProofError)
func NewTypedChainLink(cl *ChainLink) (ret TypedChainLink, w Warning)

func NewWebChecker

func NewWebChecker(p RemoteProofChainLink) (*WebChecker, ProofError)

func PacketArmoredEncode

func PacketArmoredEncode(p Packetable) (ret string, err error)

func ParseCA

func ParseCA(raw string) (*x509.CertPool, error)

func ParseDns

func ParseDns(s string) (ret string, err error)

func ParseGpgIndexStream

func ParseGpgIndexStream(stream io.Reader) (ki *GpgKeyIndex, err error, w Warnings)

func ParseWeb

func ParseWeb(s string) (hostname string, prot string, err error)

func PgpArmorHeaders

func PgpArmorHeaders() map[string]string

func PickFirstError

func PickFirstError(errors ...error) error

func PostInviteRequest

func PostInviteRequest(arg InviteRequestArg) (err error)

func PostNewKey

func PostNewKey(arg PostNewKeyArg) error

func PromptForNewTsec

func PromptForNewTsec(arg keybase_1.GetNewPassphraseArg, ui SecretUI) (tsec *triplesec.Cipher, err error)

func ProofErrorIsSoft

func ProofErrorIsSoft(pe ProofError) bool

func ProofErrorToState

func ProofErrorToState(pe ProofError) int

func RegisterProofCheckHook

func RegisterProofCheckHook(s string, h ProofCheckHook)

func RegisterServiceType

func RegisterServiceType(st ServiceType)

func RegisterSocialNetwork

func RegisterSocialNetwork(s string)

func SafeWriteToFile

func SafeWriteToFile(t SafeWriter) error

func SecureByteArrayEq

func SecureByteArrayEq(a, b []byte) bool

func ShortCA

func ShortCA(raw string) string

func ShowKeys

func ShowKeys(ui LogUI) (err error)

ShowKeys shows the status of your current KeyFamily. For now, something very simple, just dump the info to the Log. Eventually we'll want many more features here.

func SignJson

func SignJson(jw *jsonw.Wrapper, key GenericKey) (out string, id *SigId, lid LinkId, err error)

SimpleSignJson marshals the given Json structure and then signs it.

func SplitHost

func SplitHost(joined string) (host string, port int, err error)

func StoreLocalTrack

func StoreLocalTrack(id UID, statement *jsonw.Wrapper) error

func Tablify

func Tablify(writer io.Writer, headings []string, rowfunc func() []string)

func TempFile

func TempFile(prefix string, mode os.FileMode) (string, *os.File, error)

func TrackStatementJSON

func TrackStatementJSON(me, them *User) (string, error)

func Uniquify

func Uniquify(inp []string) []string

func UnwrapError

func UnwrapError(nxt rpc2.DecodeNext) (app error, dispatch error)

func VersionMessage

func VersionMessage(linefn func(string))

func WrapError

func WrapError(e error) interface{}

Types

type API

type API interface {
	Get(ApiArg) (*ApiRes, error)
	Post(ApiArg) (*ApiRes, error)
}

type AlreadyRegisteredError

type AlreadyRegisteredError struct {
	// contains filtered or unexported fields
}

func (AlreadyRegisteredError) Error

func (u AlreadyRegisteredError) Error() string

type ApiArg

type ApiArg struct {
	Endpoint string

	Args        HttpArgs
	NeedSession bool
	HttpStatus  []int
	AppStatus   []string
	DecodeTo    interface{}
	// contains filtered or unexported fields
}

type ApiError

type ApiError struct {
	Msg  string
	Code int
}

func NewApiErrorFromError

func NewApiErrorFromError(err error) ApiError

func NewApiErrorFromHttpResponse

func NewApiErrorFromHttpResponse(r *http.Response) *ApiError

func (*ApiError) Error

func (a *ApiError) Error() string

type ApiRes

type ApiRes struct {
	Status     *jsonw.Wrapper
	Body       *jsonw.Wrapper
	HttpStatus int
	AppStatus  string
}

type ApiStatus

type ApiStatus struct {
	Code int    `json:"code"`
	Name string `json:"name"`
}

type AppStatusError

type AppStatusError struct {
	Code   int
	Name   string
	Desc   string
	Fields map[string]bool
}

func NewAppStatusError

func NewAppStatusError(jw *jsonw.Wrapper) AppStatusError

func (AppStatusError) Error

func (a AppStatusError) Error() string

func (AppStatusError) IsBadField

func (a AppStatusError) IsBadField(s string) bool

func (AppStatusError) ToStatus

func (a AppStatusError) ToStatus() keybase_1.Status

type AssertionAnd

type AssertionAnd struct {
	// contains filtered or unexported fields
}

func NewAssertionAnd

func NewAssertionAnd(left, right AssertionExpression) AssertionAnd

func (AssertionAnd) CollectUrls

func (a AssertionAnd) CollectUrls(v []AssertionUrl) []AssertionUrl

func (AssertionAnd) HasOr

func (a AssertionAnd) HasOr() bool

func (AssertionAnd) MatchSet

func (a AssertionAnd) MatchSet(ps ProofSet) bool

func (AssertionAnd) String

func (a AssertionAnd) String() string

type AssertionDns

type AssertionDns struct{ AssertionUrlBase }

func (AssertionDns) Check

func (a AssertionDns) Check() (err error)

func (AssertionDns) CollectUrls

func (a AssertionDns) CollectUrls(v []AssertionUrl) []AssertionUrl

func (AssertionDns) MatchSet

func (a AssertionDns) MatchSet(ps ProofSet) bool

func (AssertionDns) ToLookup

func (k AssertionDns) ToLookup() (key, value string, err error)

type AssertionExpression

type AssertionExpression interface {
	String() string
	MatchSet(ps ProofSet) bool
	HasOr() bool
	CollectUrls([]AssertionUrl) []AssertionUrl
}

func AssertionParse

func AssertionParse(s string) (AssertionExpression, error)

func AssertionParseAndOnly

func AssertionParseAndOnly(s string) (AssertionExpression, error)

type AssertionFingerprint

type AssertionFingerprint struct{ AssertionUrlBase }

func (AssertionFingerprint) CollectUrls

func (a AssertionFingerprint) CollectUrls(v []AssertionUrl) []AssertionUrl

func (AssertionFingerprint) IsFingerprint

func (k AssertionFingerprint) IsFingerprint() bool

func (AssertionFingerprint) MatchProof

func (a AssertionFingerprint) MatchProof(proof Proof) bool

Fingerprint matching is on the suffixes. If the assertion matches any suffix of the proof, then we're OK

func (AssertionFingerprint) MatchSet

func (a AssertionFingerprint) MatchSet(ps ProofSet) bool

func (AssertionFingerprint) ToLookup

func (k AssertionFingerprint) ToLookup() (key, value string, err error)

type AssertionHttp

type AssertionHttp struct{ AssertionUrlBase }

func (AssertionHttp) Check

func (a AssertionHttp) Check() (err error)

func (AssertionHttp) CollectUrls

func (a AssertionHttp) CollectUrls(v []AssertionUrl) []AssertionUrl

func (AssertionHttp) Keys

func (a AssertionHttp) Keys() []string

func (AssertionHttp) MatchSet

func (a AssertionHttp) MatchSet(ps ProofSet) bool

func (AssertionHttp) ToLookup

func (k AssertionHttp) ToLookup() (key, value string, err error)

type AssertionHttps

type AssertionHttps struct{ AssertionUrlBase }

func (AssertionHttps) Check

func (a AssertionHttps) Check() (err error)

func (AssertionHttps) CollectUrls

func (a AssertionHttps) CollectUrls(v []AssertionUrl) []AssertionUrl

func (AssertionHttps) MatchSet

func (a AssertionHttps) MatchSet(ps ProofSet) bool

func (AssertionHttps) ToLookup

func (k AssertionHttps) ToLookup() (key, value string, err error)

type AssertionKeybase

type AssertionKeybase struct{ AssertionUrlBase }

func (AssertionKeybase) CollectUrls

func (a AssertionKeybase) CollectUrls(v []AssertionUrl) []AssertionUrl

func (AssertionKeybase) IsKeybase

func (k AssertionKeybase) IsKeybase() bool

func (AssertionKeybase) MatchSet

func (a AssertionKeybase) MatchSet(ps ProofSet) bool

func (AssertionKeybase) ToLookup

func (k AssertionKeybase) ToLookup() (key, value string, err error)

type AssertionOr

type AssertionOr struct {
	// contains filtered or unexported fields
}

func NewAssertionOr

func NewAssertionOr(left, right AssertionExpression) AssertionOr

func (AssertionOr) CollectUrls

func (a AssertionOr) CollectUrls(v []AssertionUrl) []AssertionUrl

func (AssertionOr) HasOr

func (a AssertionOr) HasOr() bool

func (AssertionOr) MatchSet

func (a AssertionOr) MatchSet(ps ProofSet) bool

func (AssertionOr) String

func (a AssertionOr) String() string

type AssertionParseError

type AssertionParseError struct {
	// contains filtered or unexported fields
}

func NewAssertionParseError

func NewAssertionParseError(s string, a ...interface{}) AssertionParseError

func NewNeedInputError

func NewNeedInputError(s string, a ...interface{}) AssertionParseError

func (AssertionParseError) Error

func (e AssertionParseError) Error() string

type AssertionSocial

type AssertionSocial struct{ AssertionUrlBase }

func (AssertionSocial) Check

func (s AssertionSocial) Check() (err error)

func (AssertionSocial) CollectUrls

func (a AssertionSocial) CollectUrls(v []AssertionUrl) []AssertionUrl

func (AssertionSocial) IsSocial

func (k AssertionSocial) IsSocial() bool

func (AssertionSocial) MatchSet

func (a AssertionSocial) MatchSet(ps ProofSet) bool

func (AssertionSocial) ToLookup

func (k AssertionSocial) ToLookup() (key, value string, err error)

type AssertionUid

type AssertionUid struct {
	AssertionUrlBase
	// contains filtered or unexported fields
}

func (AssertionUid) Check

func (u AssertionUid) Check() (err error)

func (AssertionUid) CollectUrls

func (a AssertionUid) CollectUrls(v []AssertionUrl) []AssertionUrl

func (AssertionUid) IsUid

func (k AssertionUid) IsUid() bool

func (AssertionUid) MatchSet

func (a AssertionUid) MatchSet(ps ProofSet) bool

func (AssertionUid) ToLookup

func (k AssertionUid) ToLookup() (key, value string, err error)

func (AssertionUid) ToUid

func (u AssertionUid) ToUid() *UID

type AssertionUrl

type AssertionUrl interface {
	AssertionExpression
	Keys() []string
	Check() error
	IsKeybase() bool
	IsUid() bool
	ToUid() *UID
	IsSocial() bool
	IsFingerprint() bool
	MatchProof(p Proof) bool
	ToKeyValuePair() (string, string)
	CacheKey() string
	GetValue() string
	ToLookup() (string, string, error)
}

func ParseAssertionUrl

func ParseAssertionUrl(s string, strict bool) (ret AssertionUrl, err error)

func ParseAssertionUrlKeyValue

func ParseAssertionUrlKeyValue(key, val string,
	strict bool) (ret AssertionUrl, err error)

type AssertionUrlBase

type AssertionUrlBase struct {
	Key, Value string
}

func (AssertionUrlBase) CacheKey

func (b AssertionUrlBase) CacheKey() string

func (AssertionUrlBase) Check

func (a AssertionUrlBase) Check() (err error)

func (AssertionUrlBase) CheckHost

func (a AssertionUrlBase) CheckHost() (err error)

func (AssertionUrlBase) GetValue

func (b AssertionUrlBase) GetValue() string

func (AssertionUrlBase) HasOr

func (a AssertionUrlBase) HasOr() bool

func (AssertionUrlBase) IsFingerprint

func (a AssertionUrlBase) IsFingerprint() bool

func (AssertionUrlBase) IsKeybase

func (a AssertionUrlBase) IsKeybase() bool

func (AssertionUrlBase) IsSocial

func (a AssertionUrlBase) IsSocial() bool

func (AssertionUrlBase) IsUid

func (a AssertionUrlBase) IsUid() bool

func (AssertionUrlBase) Keys

func (a AssertionUrlBase) Keys() []string

func (AssertionUrlBase) MatchProof

func (a AssertionUrlBase) MatchProof(proof Proof) bool

func (AssertionUrlBase) String

func (a AssertionUrlBase) String() string

func (AssertionUrlBase) ToKeyValuePair

func (b AssertionUrlBase) ToKeyValuePair() (string, string)

func (AssertionUrlBase) ToUid

func (a AssertionUrlBase) ToUid() *UID

type AssertionWeb

type AssertionWeb struct{ AssertionUrlBase }

func (AssertionWeb) Check

func (a AssertionWeb) Check() (err error)

func (AssertionWeb) CollectUrls

func (a AssertionWeb) CollectUrls(v []AssertionUrl) []AssertionUrl

func (AssertionWeb) Keys

func (a AssertionWeb) Keys() []string

func (AssertionWeb) MatchSet

func (a AssertionWeb) MatchSet(ps ProofSet) bool

func (AssertionWeb) ToLookup

func (k AssertionWeb) ToLookup() (key, value string, err error)

type B

type B struct {
	Val bool
}

func (B) String

func (b B) String() string

type BadFingerprintError

type BadFingerprintError struct {
	// contains filtered or unexported fields
}

func (BadFingerprintError) Error

func (b BadFingerprintError) Error() string

type BadKeyError

type BadKeyError struct {
	// contains filtered or unexported fields
}

func (BadKeyError) Error

func (p BadKeyError) Error() string

type BadRevocationError

type BadRevocationError struct {
	// contains filtered or unexported fields
}

func (BadRevocationError) Error

func (e BadRevocationError) Error() string

type BadServiceError

type BadServiceError struct {
	// contains filtered or unexported fields
}

func (BadServiceError) Error

func (e BadServiceError) Error() string

type BadSigError

type BadSigError struct {
	// contains filtered or unexported fields
}

func (BadSigError) Error

func (e BadSigError) Error() string

type BadUsernameError

type BadUsernameError struct {
	// contains filtered or unexported fields
}

func (BadUsernameError) Error

func (e BadUsernameError) Error() string

type Base

type Base struct {
	// contains filtered or unexported fields
}

func (Base) Join

func (b Base) Join(elem ...string) string

func (Base) Unsplit

func (b Base) Unsplit(v []string) string

type Base64Finder

type Base64Finder struct {
	// contains filtered or unexported fields
}

func NewBase64Finder

func NewBase64Finder(i string) *Base64Finder

func (*Base64Finder) Run

func (s *Base64Finder) Run() []string

type BaseApiEngine

type BaseApiEngine struct {
	// contains filtered or unexported fields
}

Shared code across Internal and External APIs

func (*BaseApiEngine) PrepareGet

func (base *BaseApiEngine) PrepareGet(url url.URL, arg ApiArg) (*http.Request, error)

func (*BaseApiEngine) PreparePost

func (base *BaseApiEngine) PreparePost(url url.URL, arg ApiArg) (*http.Request, error)

type BaseServiceType

type BaseServiceType struct{}

func (BaseServiceType) BaseAllStringKeys

func (t BaseServiceType) BaseAllStringKeys(st ServiceType) []string

func (BaseServiceType) BaseCheckProofForUrl

func (t BaseServiceType) BaseCheckProofForUrl(text string, id SigId) (err error)

func (BaseServiceType) BaseCheckProofTextFull

func (t BaseServiceType) BaseCheckProofTextFull(text string, id SigId, sig string) (err error)

func (BaseServiceType) BaseCheckProofTextShort

func (t BaseServiceType) BaseCheckProofTextShort(text string, id SigId, med bool) (err error)

func (BaseServiceType) BaseGetProofType

func (t BaseServiceType) BaseGetProofType(st ServiceType) string

func (BaseServiceType) BasePrimaryStringKeys

func (t BaseServiceType) BasePrimaryStringKeys(st ServiceType) []string

func (BaseServiceType) BaseRecheckProofPosting

func (t BaseServiceType) BaseRecheckProofPosting(tryNumber, status int) (warning *Markup, err error)

func (BaseServiceType) BaseToChecker

func (t BaseServiceType) BaseToChecker(st ServiceType, hint string) Checker

func (BaseServiceType) BaseToServiceJson

func (t BaseServiceType) BaseToServiceJson(st ServiceType, un string) *jsonw.Wrapper

func (BaseServiceType) FormatProofText

func (t BaseServiceType) FormatProofText(ppr *PostProofRes) (string, error)

func (BaseServiceType) GetApiArgKey

func (t BaseServiceType) GetApiArgKey() string

func (BaseServiceType) LastWriterWins

func (t BaseServiceType) LastWriterWins() bool

func (BaseServiceType) NormalizeUsername

func (t BaseServiceType) NormalizeUsername(s string) (string, error)

func (BaseServiceType) PreProofCheck

func (t BaseServiceType) PreProofCheck(string) (*Markup, error)

func (BaseServiceType) PreProofWarning

func (t BaseServiceType) PreProofWarning(remotename string) *Markup

type BtcOpts

type BtcOpts struct {
	// contains filtered or unexported fields
}

type BucketDict

type BucketDict struct {
	// contains filtered or unexported fields
}

func NewBuckDict

func NewBuckDict() *BucketDict

func (*BucketDict) Add

func (bd *BucketDict) Add(k string, v *GpgPrimaryKey)

func (BucketDict) Get

func (bd BucketDict) Get(k string) []*GpgPrimaryKey

func (BucketDict) Get0Or1

func (bd BucketDict) Get0Or1(k string) (ret *GpgPrimaryKey, err error)

type ByMtime

type ByMtime []keybase_1.IdentifyRow

func (ByMtime) Len

func (x ByMtime) Len() int

func (ByMtime) Less

func (x ByMtime) Less(a, b int) bool

func (ByMtime) Swap

func (x ByMtime) Swap(a, b int)
type ChainLink struct {
	// contains filtered or unexported fields
}

func ImportLinkFromServer

func ImportLinkFromServer(parent *SigChain, jw *jsonw.Wrapper) (ret *ChainLink, err error)

func ImportLinkFromStorage

func ImportLinkFromStorage(id LinkId) (*ChainLink, error)
func NewChainLink(parent *SigChain, id LinkId, jw *jsonw.Wrapper) *ChainLink

func (*ChainLink) CheckNameAndId

func (c *ChainLink) CheckNameAndId(s string, i UID) error

func (*ChainLink) GetFOKID

func (c *ChainLink) GetFOKID() FOKID

func (*ChainLink) GetKid

func (c *ChainLink) GetKid() KID

func (ChainLink) GetMerkleSeqno

func (c ChainLink) GetMerkleSeqno() int

func (*ChainLink) GetPayloadJson

func (c *ChainLink) GetPayloadJson() *jsonw.Wrapper

func (*ChainLink) GetPgpFingerprint

func (c *ChainLink) GetPgpFingerprint() *PgpFingerprint

func (ChainLink) GetPrev

func (c ChainLink) GetPrev() LinkId

func (*ChainLink) GetProofState0

func (c *ChainLink) GetProofState0() int

func (ChainLink) GetRevocations

func (c ChainLink) GetRevocations() []*SigId

func (ChainLink) GetRevokeKids

func (c ChainLink) GetRevokeKids() []KID

func (ChainLink) GetSeqno

func (c ChainLink) GetSeqno() Seqno

func (*ChainLink) GetSigCheckCache

func (c *ChainLink) GetSigCheckCache() (cki *ComputedKeyInfos)

func (ChainLink) GetSigId

func (c ChainLink) GetSigId() *SigId

func (*ChainLink) IsInCurrentFamily

func (c *ChainLink) IsInCurrentFamily(u *User) bool

========================================================================= IsInCurrentFamily checks to see if the given chainlink was signed by a key in the current family.

func (*ChainLink) MarkChecked

func (c *ChainLink) MarkChecked(err ProofError)

func (*ChainLink) MatchEldestFOKID

func (c *ChainLink) MatchEldestFOKID(fokid FOKID) bool

MatchFOKID checks if the given ChainLink matches the given FOKID using standard FOKID equality.

func (ChainLink) MatchFingerprint

func (c ChainLink) MatchFingerprint(fp PgpFingerprint) bool

func (ChainLink) MatchUidAndUsername

func (c ChainLink) MatchUidAndUsername(uid UID, username string) bool

func (*ChainLink) Pack

func (c *ChainLink) Pack() error

func (*ChainLink) PutSigCheckCache

func (c *ChainLink) PutSigCheckCache(cki *ComputedKeyInfos)

func (*ChainLink) Store

func (l *ChainLink) Store() (didStore bool, err error)

func (*ChainLink) ToEldestFOKID

func (c *ChainLink) ToEldestFOKID() (ret FOKID)

ToEldestFOKID takes the current chain link and extracts the eldest FOKID from it. Legacy links don't specify it, so we'll have to infer

func (*ChainLink) ToFOKID

func (c *ChainLink) ToFOKID() (ret FOKID)

ToFOKID takes the current chain link and extracts the current (signing) FOKID

func (ChainLink) ToLinkSummary

func (l ChainLink) ToLinkSummary() *LinkSummary

func (ChainLink) ToMerkleTriple

func (l ChainLink) ToMerkleTriple() (ret MerkleTriple)

func (*ChainLink) Unpack

func (c *ChainLink) Unpack(trusted bool) (err error)

func (*ChainLink) UnpackComputedKeyInfos

func (c *ChainLink) UnpackComputedKeyInfos(jw *jsonw.Wrapper) (err error)

func (*ChainLink) UnpackLocal

func (c *ChainLink) UnpackLocal() (err error)

func (*ChainLink) UnpackPayloadJson

func (c *ChainLink) UnpackPayloadJson(tmp *ChainLinkUnpacked) (err error)

func (*ChainLink) VerifyHash

func (c *ChainLink) VerifyHash() error
func (l *ChainLink) VerifyLink() error

func (*ChainLink) VerifyPayload

func (c *ChainLink) VerifyPayload() error

func (*ChainLink) VerifySig

func (c *ChainLink) VerifySig(k PgpKeyBundle) (cached bool, err error)

func (*ChainLink) VerifySigWithKeyFamily

func (c *ChainLink) VerifySigWithKeyFamily(ckf ComputedKeyFamily) (cached bool, err error)

type ChainLinkUnpacked

type ChainLinkUnpacked struct {
	// contains filtered or unexported fields
}

type ChainType

type ChainType struct {
	DbType          ObjType
	Private         bool
	Encrypted       bool
	GetMerkleTriple func(u *MerkleUserLeaf) *MerkleTriple
}
var PublicChain *ChainType = &ChainType{
	DbType:          DB_SIG_CHAIN_TAIL_PUBLIC,
	Private:         false,
	Encrypted:       false,
	GetMerkleTriple: func(u *MerkleUserLeaf) *MerkleTriple { return u.public },
}

type CheckResult

type CheckResult struct {
	Status ProofError // Or nil if it was a success
	Time   time.Time  // When the last check was
}

func NewCheckResult

func NewCheckResult(jw *jsonw.Wrapper) (res *CheckResult, err error)

func NewNowCheckResult

func NewNowCheckResult(pe ProofError) *CheckResult

func (CheckResult) Export

func (cr CheckResult) Export() *keybase_1.CheckResult

func (CheckResult) IsFresh

func (cr CheckResult) IsFresh() bool

func (CheckResult) Pack

func (cr CheckResult) Pack() *jsonw.Wrapper

func (CheckResult) ToDisplayString

func (cr CheckResult) ToDisplayString() string

type Checker

type Checker struct {
	F             func(string) bool
	Hint          string
	PreserveSpace bool
}

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(config *ClientConfig, needCookie bool) *Client

type ClientConfig

type ClientConfig struct {
	Host       string
	Port       int
	UseTls     bool
	Url        *url.URL
	RootCAs    *x509.CertPool
	Prefix     string
	UseCookies bool
	Timeout    time.Duration
}

type CoinbaseChecker

type CoinbaseChecker struct {
	// contains filtered or unexported fields
}

func (*CoinbaseChecker) CheckHint

func (rc *CoinbaseChecker) CheckHint(h SigHint) ProofError

func (*CoinbaseChecker) CheckStatus

func (rc *CoinbaseChecker) CheckStatus(h SigHint) ProofError

func (*CoinbaseChecker) ProfileUrl

func (rc *CoinbaseChecker) ProfileUrl() string

type CoinbaseServiceType

type CoinbaseServiceType struct{ BaseServiceType }

func (CoinbaseServiceType) AllStringKeys

func (t CoinbaseServiceType) AllStringKeys() []string

func (CoinbaseServiceType) CheckProofText

func (t CoinbaseServiceType) CheckProofText(text string, id SigId, sig string) (err error)

func (CoinbaseServiceType) CheckUsername

func (t CoinbaseServiceType) CheckUsername(s string) (err error)

func (CoinbaseServiceType) DisplayName

func (t CoinbaseServiceType) DisplayName(un string) string

func (CoinbaseServiceType) GetPrompt

func (t CoinbaseServiceType) GetPrompt() string

func (CoinbaseServiceType) GetProofType

func (t CoinbaseServiceType) GetProofType() string

func (CoinbaseServiceType) GetTypeName

func (t CoinbaseServiceType) GetTypeName() string

func (CoinbaseServiceType) PostInstructions

func (t CoinbaseServiceType) PostInstructions(un string) *Markup

func (CoinbaseServiceType) PrimaryStringKeys

func (t CoinbaseServiceType) PrimaryStringKeys() []string

func (CoinbaseServiceType) RecheckProofPosting

func (t CoinbaseServiceType) RecheckProofPosting(tryNumber, status int) (warning *Markup, err error)

func (CoinbaseServiceType) ToChecker

func (t CoinbaseServiceType) ToChecker() Checker

func (CoinbaseServiceType) ToServiceJson

func (t CoinbaseServiceType) ToServiceJson(un string) *jsonw.Wrapper

type Command

type Command interface {
	GetUsage() Usage
}

type CommandLine

type CommandLine interface {
	GetHome() string
	GetServerUri() string
	GetConfigFilename() string
	GetSessionFilename() string
	GetDbFilename() string
	GetDebug() (bool, bool)
	GetUsername() string
	GetUid() *UID
	GetProxy() string
	GetPlainLogging() (bool, bool)
	GetPgpDir() string
	GetEmail() string
	GetApiDump() (bool, bool)
	GetUserCacheSize() (int, bool)
	GetProofCacheSize() (int, bool)
	GetMerkleKeyFingerprints() []string
	GetPinentry() string
	GetGpg() string
	GetGpgOptions() []string
	GetPgpFingerprint() *PgpFingerprint
	GetSecretKeyring() string
	GetSocketFile() string
	GetDaemonPort() (int, bool)
	GetStandalone() (bool, bool)
	GetLocalRpcDebug() string
	GetPerDeviceKID() string
	GetDeviceId() string
}

type ComputedKeyFamily

type ComputedKeyFamily struct {
	// contains filtered or unexported fields
}

func (*ComputedKeyFamily) Delegate

func (ckf *ComputedKeyFamily) Delegate(tcl TypedChainLink) (err error)

Delegate performs a delegation to the key described in the given TypedChainLink. This maybe be a sub- or sibkey delegation.

func (ComputedKeyFamily) DumpToLog

func (ckf ComputedKeyFamily) DumpToLog(ui LogUI)

DumpToLog dumps info about the current KeyFamily to the given log UI

func (ComputedKeyFamily) FindActiveSibkey

func (ckf ComputedKeyFamily) FindActiveSibkey(f FOKID) (key GenericKey, err error)

func (ComputedKeyFamily) FindKeybaseName

func (ckf ComputedKeyFamily) FindKeybaseName(s string) bool

FindKeybaseName looks at all PGP keys in this key family that are active sibkeys to find a key with a signed identity of <name@keybase.io>. IF found return true, and otherwise false.

func (ComputedKeyFamily) GetActivePgpKeys

func (ckf ComputedKeyFamily) GetActivePgpKeys(sibkey bool) (ret []*PgpKeyBundle)

GetActivePgpKeys gets the active PGP keys from the ComputedKeyFamily. If sibkey is False it will return all active PGP keys. Otherwise, it will return only the Sibkeys.

func (ComputedKeyFamily) GetAllActiveSibkeys

func (ckf ComputedKeyFamily) GetAllActiveSibkeys() (ret []GenericKey)

GetAllActiveSibkeys gets all active Sibkeys from given ComputedKeyFamily, sorted from oldest to newest.

func (ComputedKeyFamily) GetAllActiveSibkeysKIDs

func (ckf ComputedKeyFamily) GetAllActiveSibkeysKIDs() (ret []KID)

GetAllActiveSibkeyKIDs gets all active Sibkeys from given ComputedKeyFamily, sorted from oldest to newest, and returns their KIDs

func (ComputedKeyFamily) HasActiveKey

func (ckf ComputedKeyFamily) HasActiveKey() bool

HasActiveKey returns if the given ComputeKeyFamily has any active keys. The key has to be in the server-given KeyFamily and also in our ComputedKeyFamily. The former check is so that we can handle the case nuked sigchains.

func (ComputedKeyFamily) IsFOKIDActive

func (ckf ComputedKeyFamily) IsFOKIDActive(f FOKID) (ret KeyStatus)

IsFOKIDActive computes whether this FOKID is currently active, and whether as a sibkey or a subkey

func (ComputedKeyFamily) IsKidActive

func (ckf ComputedKeyFamily) IsKidActive(kid KID) (ret KeyStatus)

IsKidActive computes whether the given KID is active, and if so, whether it's a sib or subkey

func (*ComputedKeyFamily) Revoke

func (ckf *ComputedKeyFamily) Revoke(tcl TypedChainLink) (err error)

func (*ComputedKeyFamily) RevokeKid

func (ckf *ComputedKeyFamily) RevokeKid(kid KID, tcl TypedChainLink) (err error)

func (*ComputedKeyFamily) RevokeKids

func (ckf *ComputedKeyFamily) RevokeKids(kids []KID, tcl TypedChainLink) (err error)

func (*ComputedKeyFamily) RevokeSig

func (ckf *ComputedKeyFamily) RevokeSig(sig SigId, tcl TypedChainLink) (err error)

func (*ComputedKeyFamily) RevokeSigs

func (ckf *ComputedKeyFamily) RevokeSigs(sigs []*SigId, tcl TypedChainLink) (err error)

type ComputedKeyInfo

type ComputedKeyInfo struct {
	Status int
	Eldest bool
	Sibkey bool

	// Map of SigId -> KID, both as hex strings
	// (since we can't unmarhsal into KIDs)
	Delegations map[string]string
	DelegatedAt *KeybaseTime
	RevokedAt   *KeybaseTime
}

func (ComputedKeyInfo) Copy

func (cki ComputedKeyInfo) Copy() ComputedKeyInfo

type ComputedKeyInfos

type ComputedKeyInfos struct {

	// Map of KID (in HEX) to a computed info
	Infos map[string]*ComputedKeyInfo

	// Map of a SigId (in Binary) to the ComputedKeyInfo describing when the key was
	// delegated.
	Sigs map[string]*ComputedKeyInfo
	// contains filtered or unexported fields
}

When we play a sigchain forward, it yields ComputedKeyInfos (CKIs). We're going to store CKIs separately from the keys, since the server can clobber the former. We should rewrite CKIs every time we (re)check a user's SigChain

func (ComputedKeyInfos) Copy

func (cki ComputedKeyInfos) Copy() *ComputedKeyInfos

func (*ComputedKeyInfos) Delegate

func (cki *ComputedKeyInfos) Delegate(kid_s string, tm *KeybaseTime, sigid SigId, signingKid KID, isSibkey bool) (err error)

Delegate marks the given ComputedKeyInfos object that the given kid_s is now delegated, as of time tm, in sigid, as signed by signingKid, etc.

func (ComputedKeyInfos) HasActiveKey

func (cki ComputedKeyInfos) HasActiveKey() bool

HasActiveKey returns if the given ComputeKeyInfos has any active keys.

func (*ComputedKeyInfos) Insert

func (cki *ComputedKeyInfos) Insert(f *FOKID, i *ComputedKeyInfo)

Insert inserts the given ComputedKeyInfo object 1 or 2 times, depending on if a KID or PgpFingerprint or both are available.

type ConfigReader

type ConfigReader interface {
	GetHome() string
	GetServerUri() string
	GetConfigFilename() string
	GetSessionFilename() string
	GetDbFilename() string
	GetDebug() (bool, bool)
	GetUsername() string
	GetUid() *UID
	GetProxy() string
	GetPlainLogging() (bool, bool)
	GetPgpDir() string
	GetBundledCA(host string) string
	GetEmail() string
	GetStringAtPath(string) (string, bool)
	GetBoolAtPath(string) (bool, bool)
	GetIntAtPath(string) (int, bool)
	GetNullAtPath(string) bool
	GetUserCacheSize() (int, bool)
	GetProofCacheSize() (int, bool)
	GetMerkleKeyFingerprints() []string
	GetPinentry() string
	GetNoPinentry() (bool, bool)
	GetGpg() string
	GetGpgOptions() []string
	GetPgpFingerprint() *PgpFingerprint
	GetSecretKeyring() string
	GetSalt() []byte
	GetSocketFile() string
	GetDaemonPort() (int, bool)
	GetStandalone() (bool, bool)
	GetLocalRpcDebug() string
	GetPerDeviceKID() string
	GetDeviceId() string
}

type ConfigWriter

type ConfigWriter interface {
	SetUsername(string)
	SetUid(UID)
	SetPgpFingerprint(*PgpFingerprint)
	SetSalt([]byte)
	SetPerDeviceKID(KID) error
	SetDeviceId(*DeviceId) error
	SetStringAtPath(string, string) error
	SetBoolAtPath(string, bool) error
	SetIntAtPath(string, int) error
	SetNullAtPath(string) error
	DeleteAtPath(string)
	Reset()
	Write() error
}
type CryptocurrencyChainLink struct {
	GenericChainLink
	// contains filtered or unexported fields
}
func ParseCryptocurrencyChainLink(b GenericChainLink) (
	cl *CryptocurrencyChainLink, err error)

func (CryptocurrencyChainLink) Display

func (l CryptocurrencyChainLink) Display(ui IdentifyUI)

func (CryptocurrencyChainLink) Export

func (c CryptocurrencyChainLink) Export() (ret keybase_1.Cryptocurrency)

func (CryptocurrencyChainLink) GetAddress

func (c CryptocurrencyChainLink) GetAddress() string

func (*CryptocurrencyChainLink) ToDisplayString

func (r *CryptocurrencyChainLink) ToDisplayString() string

func (*CryptocurrencyChainLink) Type

func (r *CryptocurrencyChainLink) Type() string

type CurrentStatus

type CurrentStatus struct {
	Configured        bool
	Registered        bool
	LoggedIn          bool
	PublicKeySelected bool
	HasPrivateKey     bool
	User              *User
}

func GetCurrentStatus

func GetCurrentStatus() (res CurrentStatus, err error)

func (CurrentStatus) Export

func (c CurrentStatus) Export() (ret keybase_1.GetCurrentStatusRes)

type DbKey

type DbKey struct {
	Typ ObjType
	Key string
}

func DbKeyParse

func DbKeyParse(s string) (string, *DbKey, error)

func (DbKey) ToBytes

func (k DbKey) ToBytes(table string) []byte

func (DbKey) ToString

func (k DbKey) ToString(table string) string

type DeviceId

type DeviceId [DEVICE_ID_LEN]byte

func ImportDeviceId

func ImportDeviceId(s string) (d *DeviceId, err error)

func (DeviceId) String

func (d DeviceId) String() string

type DeviceStatus

type DeviceStatus struct {
	Provisioned  bool
	Keyed        bool
	KeyAvailable bool
}

type DnsChecker

type DnsChecker struct {
	// contains filtered or unexported fields
}

func (*DnsChecker) CheckDomain

func (rc *DnsChecker) CheckDomain(sig string, domain string) ProofError

func (*DnsChecker) CheckHint

func (rc *DnsChecker) CheckHint(h SigHint) ProofError

func (*DnsChecker) CheckStatus

func (rc *DnsChecker) CheckStatus(h SigHint) ProofError

type DnsServiceType

type DnsServiceType struct{ BaseServiceType }

func (DnsServiceType) AllStringKeys

func (t DnsServiceType) AllStringKeys() []string

func (DnsServiceType) CheckProofText

func (t DnsServiceType) CheckProofText(text string, id SigId, sig string) (err error)

func (DnsServiceType) CheckUsername

func (t DnsServiceType) CheckUsername(s string) error

func (DnsServiceType) DisplayName

func (t DnsServiceType) DisplayName(un string) string

func (DnsServiceType) FormatProofText

func (t DnsServiceType) FormatProofText(ppr *PostProofRes) (string, error)

func (DnsServiceType) GetApiArgKey

func (t DnsServiceType) GetApiArgKey() string

func (DnsServiceType) GetPrompt

func (t DnsServiceType) GetPrompt() string

func (DnsServiceType) GetProofType

func (t DnsServiceType) GetProofType() string

func (DnsServiceType) GetTypeName

func (t DnsServiceType) GetTypeName() string

func (DnsServiceType) LastWriterWins

func (t DnsServiceType) LastWriterWins() bool

func (DnsServiceType) NormalizeUsername

func (t DnsServiceType) NormalizeUsername(s string) (string, error)

func (DnsServiceType) PostInstructions

func (t DnsServiceType) PostInstructions(un string) *Markup

func (DnsServiceType) PrimaryStringKeys

func (t DnsServiceType) PrimaryStringKeys() []string

func (DnsServiceType) RecheckProofPosting

func (t DnsServiceType) RecheckProofPosting(tryNumber, status int) (warning *Markup, err error)

func (DnsServiceType) ToChecker

func (t DnsServiceType) ToChecker() Checker

func (DnsServiceType) ToServiceJson

func (t DnsServiceType) ToServiceJson(un string) *jsonw.Wrapper

type EmptyKeyRing

type EmptyKeyRing struct{}

func (EmptyKeyRing) DecryptionKeys

func (k EmptyKeyRing) DecryptionKeys() []openpgp.Key

func (EmptyKeyRing) KeysById

func (k EmptyKeyRing) KeysById(id uint64) []openpgp.Key

func (EmptyKeyRing) KeysByIdUsage

func (k EmptyKeyRing) KeysByIdUsage(id uint64, usage byte) []openpgp.Key

type Env

type Env struct {
	Test TestParameters
	// contains filtered or unexported fields
}

func NewEnv

func NewEnv(cmd CommandLine, config ConfigReader) *Env

func (Env) GenClientConfig

func (e Env) GenClientConfig() (*ClientConfig, error)

Pull the information out of the environment configuration, and build a Client config that will be used in all API server requests

func (Env) GetApiDump

func (e Env) GetApiDump() bool

func (Env) GetBool

func (e Env) GetBool(def bool, flist ...func() (bool, bool)) bool

func (Env) GetBundledCA

func (e Env) GetBundledCA(host string) string

func (Env) GetCacheDir

func (e Env) GetCacheDir() string

func (*Env) GetCommandLine

func (e *Env) GetCommandLine() CommandLine

func (*Env) GetConfig

func (e *Env) GetConfig() ConfigReader

func (Env) GetConfigDir

func (e Env) GetConfigDir() string

func (Env) GetConfigFilename

func (e Env) GetConfigFilename() string

func (*Env) GetConfigWriter

func (e *Env) GetConfigWriter() ConfigWriter

func (Env) GetDaemonPort

func (e Env) GetDaemonPort() int

func (Env) GetDataDir

func (e Env) GetDataDir() string

func (Env) GetDbFilename

func (e Env) GetDbFilename() string

func (Env) GetDebug

func (e Env) GetDebug() bool

func (Env) GetDeviceId

func (e Env) GetDeviceId() (ret *DeviceId)

func (Env) GetEmail

func (e Env) GetEmail() string

func (Env) GetEmailOrUsername

func (e Env) GetEmailOrUsername() string

func (Env) GetGpg

func (e Env) GetGpg() string

func (Env) GetGpgOptions

func (e Env) GetGpgOptions() []string

func (Env) GetHome

func (e Env) GetHome() string

func (Env) GetInt

func (e Env) GetInt(def int, flist ...func() (int, bool)) int

func (Env) GetLocalRpcDebug

func (e Env) GetLocalRpcDebug() string

func (Env) GetMerkleKeyFingerprints

func (e Env) GetMerkleKeyFingerprints() []PgpFingerprint

func (Env) GetNoPinentry

func (e Env) GetNoPinentry() bool

func (Env) GetPerDeviceKID

func (e Env) GetPerDeviceKID() (ret KID)

func (Env) GetPgpDir

func (e Env) GetPgpDir() string

func (Env) GetPgpFingerprint

func (e Env) GetPgpFingerprint() *PgpFingerprint

func (Env) GetPgpSecretKeyrings

func (e Env) GetPgpSecretKeyrings() []string

func (Env) GetPinentry

func (e Env) GetPinentry() string

func (Env) GetPlainLogging

func (e Env) GetPlainLogging() bool

func (Env) GetProofCacheSize

func (e Env) GetProofCacheSize() int

func (Env) GetProxy

func (e Env) GetProxy() string

func (Env) GetPublicKeyrings

func (e Env) GetPublicKeyrings() []string

func (Env) GetRuntimeDir

func (e Env) GetRuntimeDir() (string, error)

func (Env) GetSalt

func (e Env) GetSalt() []byte

func (Env) GetSecretKeyring

func (e Env) GetSecretKeyring() string

func (Env) GetServerUri

func (e Env) GetServerUri() string

func (Env) GetSessionFilename

func (e Env) GetSessionFilename() string

func (Env) GetSocketFile

func (e Env) GetSocketFile() (ret string, err error)

func (Env) GetStandalone

func (e Env) GetStandalone() bool

func (Env) GetString

func (e Env) GetString(flist ...(func() string)) string

func (Env) GetStringList

func (e Env) GetStringList(list ...(func() []string)) []string

func (Env) GetTestMode

func (e Env) GetTestMode() bool

XXX implement me

func (Env) GetUid

func (e Env) GetUid() *UID

func (Env) GetUserCacheSize

func (e Env) GetUserCacheSize() int

func (Env) GetUsername

func (e Env) GetUsername() string

func (*Env) SetCommandLine

func (e *Env) SetCommandLine(cmd CommandLine)

func (*Env) SetConfig

func (e *Env) SetConfig(config ConfigReader)

func (*Env) SetConfigWriter

func (e *Env) SetConfigWriter(writer ConfigWriter)

type ExportableError

type ExportableError interface {
	error
	ToStatus() keybase_1.Status
}

type ExternalAPI

type ExternalAPI interface {
	Get(ApiArg) (*ExternalApiRes, error)
	Post(ApiArg) (*ExternalApiRes, error)
	GetHtml(ApiArg) (*ExternalHtmlRes, error)
	GetText(ApiArg) (*ExternalTextRes, error)
	PostHtml(ApiArg) (*ExternalHtmlRes, error)
}

type ExternalApiEngine

type ExternalApiEngine struct {
	BaseApiEngine
}

func (*ExternalApiEngine) DoRequest

func (api *ExternalApiEngine) DoRequest(
	arg ApiArg, req *http.Request, restype int) (
	ar *ExternalApiRes, hr *ExternalHtmlRes, tr *ExternalTextRes, err error)

func (*ExternalApiEngine) Get

func (api *ExternalApiEngine) Get(arg ApiArg) (res *ExternalApiRes, err error)

func (*ExternalApiEngine) GetHtml

func (api *ExternalApiEngine) GetHtml(arg ApiArg) (res *ExternalHtmlRes, err error)

func (*ExternalApiEngine) GetText

func (api *ExternalApiEngine) GetText(arg ApiArg) (res *ExternalTextRes, err error)

func (*ExternalApiEngine) Post

func (api *ExternalApiEngine) Post(arg ApiArg) (res *ExternalApiRes, err error)

func (*ExternalApiEngine) PostHtml

func (api *ExternalApiEngine) PostHtml(arg ApiArg) (res *ExternalHtmlRes, err error)

type ExternalApiRes

type ExternalApiRes struct {
	HttpStatus int
	Body       *jsonw.Wrapper
}

type ExternalHtmlRes

type ExternalHtmlRes struct {
	HttpStatus int
	GoQuery    *goquery.Document
}

type ExternalTextRes

type ExternalTextRes struct {
	HttpStatus int
	Body       string
}

type FOKID

type FOKID struct {
	Kid KID
	Fp  *PgpFingerprint
}

FOKID is a "Fingerprint Or a KID" or both, or neither. We have different things in different sigchains, so we have this layer to abstract away the differences.

func GenericKeyToFOKID

func GenericKeyToFOKID(key GenericKey) FOKID

func (FOKID) Eq

func (f FOKID) Eq(f2 FOKID) (ret bool)

Eq checks that two FOKIDs are equal. Two FOKIDs are equal if (their KIDs match OR the Fingerprints match) AND they don't have any mismatches.

func (FOKID) EqKid

func (f FOKID) EqKid(k2 KID) bool

EqKid checks if the KID portion of the FOKID is equal to the given KID

func (*FOKID) Export

func (f *FOKID) Export() (ret keybase_1.FOKID)

func (FOKID) String

func (f FOKID) String() string

func (FOKID) ToStrings

func (f FOKID) ToStrings() (ret []string)

type FailedAssertionError

type FailedAssertionError struct {
	// contains filtered or unexported fields
}

func (FailedAssertionError) Error

func (u FailedAssertionError) Error() string

type FirstErrorPicker

type FirstErrorPicker struct {
	// contains filtered or unexported fields
}

func (*FirstErrorPicker) Error

func (p *FirstErrorPicker) Error() error

func (*FirstErrorPicker) Push

func (p *FirstErrorPicker) Push(e error)
type GenericChainLink struct {
	*ChainLink
}

func (*GenericChainLink) BaseToTrackingStatement

func (g *GenericChainLink) BaseToTrackingStatement() *jsonw.Wrapper

func (*GenericChainLink) GetArmoredSig

func (g *GenericChainLink) GetArmoredSig() string

func (*GenericChainLink) GetCTime

func (g *GenericChainLink) GetCTime() time.Time

func (*GenericChainLink) GetDelegatedKid

func (g *GenericChainLink) GetDelegatedKid() KID

func (*GenericChainLink) GetPgpFingerprint

func (g *GenericChainLink) GetPgpFingerprint() *PgpFingerprint

func (*GenericChainLink) GetProofState

func (g *GenericChainLink) GetProofState() int

func (*GenericChainLink) GetSeqno

func (g *GenericChainLink) GetSeqno() Seqno

func (*GenericChainLink) GetSigId

func (b *GenericChainLink) GetSigId() SigId

func (*GenericChainLink) GetUID

func (g *GenericChainLink) GetUID() UID

func (*GenericChainLink) GetUsername

func (g *GenericChainLink) GetUsername() string

func (*GenericChainLink) IsDelegation

func (g *GenericChainLink) IsDelegation() KeyStatus

func (*GenericChainLink) IsRevocationIsh

func (g *GenericChainLink) IsRevocationIsh() bool

func (*GenericChainLink) IsRevoked

func (g *GenericChainLink) IsRevoked() bool

func (*GenericChainLink) IsSibkey

func (g *GenericChainLink) IsSibkey() bool

func (*GenericChainLink) ToDebugString

func (b *GenericChainLink) ToDebugString() string

func (*GenericChainLink) ToDisplayString

func (b *GenericChainLink) ToDisplayString() string

func (*GenericChainLink) Type

func (b *GenericChainLink) Type() string

type GenericKey

type GenericKey interface {
	GetKid() KID
	GetFingerprintP() *PgpFingerprint
	GetAlgoType() int
	SignToString([]byte) (string, *SigId, error)
	Verify(string, []byte) (*SigId, error)
	ToP3SKB(ts *triplesec.Cipher) (*P3SKB, error)
	VerboseDescription() string
	CheckSecretKey() error
	Encode() (string, error) // encode public key to string
}

type GithubChecker

type GithubChecker struct {
	// contains filtered or unexported fields
}

func (*GithubChecker) CheckHint

func (rc *GithubChecker) CheckHint(h SigHint) ProofError

func (*GithubChecker) CheckStatus

func (rc *GithubChecker) CheckStatus(h SigHint) ProofError

type GithubServiceType

type GithubServiceType struct{ BaseServiceType }

func (GithubServiceType) AllStringKeys

func (t GithubServiceType) AllStringKeys() []string

func (GithubServiceType) CheckProofText

func (t GithubServiceType) CheckProofText(text string, id SigId, sig string) (err error)

func (GithubServiceType) CheckUsername

func (t GithubServiceType) CheckUsername(s string) (err error)

func (GithubServiceType) DisplayName

func (t GithubServiceType) DisplayName(un string) string

func (GithubServiceType) GetPrompt

func (t GithubServiceType) GetPrompt() string

func (GithubServiceType) GetProofType

func (t GithubServiceType) GetProofType() string

func (GithubServiceType) GetTypeName

func (t GithubServiceType) GetTypeName() string

func (GithubServiceType) PostInstructions

func (t GithubServiceType) PostInstructions(un string) *Markup

func (GithubServiceType) PrimaryStringKeys

func (t GithubServiceType) PrimaryStringKeys() []string

func (GithubServiceType) RecheckProofPosting

func (t GithubServiceType) RecheckProofPosting(tryNumber, status int) (warning *Markup, err error)

func (GithubServiceType) ToChecker

func (t GithubServiceType) ToChecker() Checker

func (GithubServiceType) ToServiceJson

func (t GithubServiceType) ToServiceJson(un string) *jsonw.Wrapper

type Global

type Global struct {
	Log           *Logger        // Handles all logging
	Session       *Session       // The user's session cookie, &c
	SessionWriter SessionWriter  // To write the session back out
	LoginState    *LoginState    // What phase of login the user's in
	Env           *Env           // Env variables, cmdline args & config
	Keyrings      *Keyrings      // Gpg Keychains holding keys
	API           API            // How to make a REST call to the server
	UserCache     *UserCache     // LRU cache of users in memory
	LocalDb       *JsonLocalDb   // Local DB for cache
	MerkleClient  *MerkleClient  // client for querying server's merkle sig tree
	XAPI          ExternalAPI    // for contacting Twitter, Github, etc.
	Output        io.Writer      // where 'Stdout'-style output goes
	ProofCache    *ProofCache    // where to cache proof results
	GpgClient     GpgClient      // A standard GPG-client (optional)
	ShutdownHooks []ShutdownHook // on shutdown, fire these...
	SocketInfo    SocketInfo     // which socket to bind/connect to
	SocketWrapper *SocketWrapper // only need one connection per
	SecretSyncer  *SecretSyncer  // For syncing secrets between the server and client
	UI            UI             // Interact with the UI
	Daemon        bool           // whether we're in daemon mode
	// contains filtered or unexported fields
}
var G Global = Global{
	Log:           NewDefaultLogger(),
	ShutdownHooks: make([]ShutdownHook, 0, 0),
}

func (*Global) BindToSocket

func (g *Global) BindToSocket() (net.Listener, error)

func (*Global) ConfigureAPI

func (g *Global) ConfigureAPI() error

func (*Global) ConfigureAll

func (g *Global) ConfigureAll(line CommandLine, cmd Command) error

func (*Global) ConfigureCaches

func (g *Global) ConfigureCaches() (err error)

func (*Global) ConfigureConfig

func (g *Global) ConfigureConfig() error

func (*Global) ConfigureKeyring

func (g *Global) ConfigureKeyring(usage Usage) error

func (*Global) ConfigureLogging

func (g *Global) ConfigureLogging() error

func (*Global) ConfigureMerkleClient

func (g *Global) ConfigureMerkleClient() error

func (*Global) ConfigureSecretSyncer

func (g *Global) ConfigureSecretSyncer() error

func (*Global) ConfigureSocketInfo

func (g *Global) ConfigureSocketInfo() (err error)

func (*Global) GetGpgClient

func (g *Global) GetGpgClient() GpgClient

func (*Global) GetMyUid

func (g *Global) GetMyUid() (ret *UID)

func (*Global) GetSocket

func (g *Global) GetSocket() (net.Conn, *rpc2.Transport, error)

func (*Global) Init

func (g *Global) Init()

func (*Global) OutputBytes

func (g *Global) OutputBytes(b []byte)

func (*Global) OutputString

func (g *Global) OutputString(s string)

func (*Global) PushShutdownHook

func (g *Global) PushShutdownHook(sh ShutdownHook)

func (*Global) SetCommandLine

func (g *Global) SetCommandLine(cmd CommandLine)

func (*Global) SetUI

func (g *Global) SetUI(u UI)

func (*Global) Shutdown

func (g *Global) Shutdown() error

func (Global) StartupMessage

func (g Global) StartupMessage()

type GpgBaseKey

type GpgBaseKey struct {
	Type    string
	Trust   string
	Bits    int
	Algo    int
	Id64    string
	Created int
	Expires int
	// contains filtered or unexported fields
}

func (GpgBaseKey) AlgoString

func (k GpgBaseKey) AlgoString() string

func (GpgBaseKey) ExpirationString

func (k GpgBaseKey) ExpirationString() string

func (*GpgBaseKey) ParseBase

func (k *GpgBaseKey) ParseBase(line *GpgIndexLine) (err error)

func (*GpgBaseKey) SetFingerprint

func (k *GpgBaseKey) SetFingerprint(pgp *PgpFingerprint)

type GpgCLI

type GpgCLI struct {
	// contains filtered or unexported fields
}

func NewGpgCLI

func NewGpgCLI() *GpgCLI

func (*GpgCLI) Configure

func (g *GpgCLI) Configure() (configExplicit bool, err error)

func (*GpgCLI) ExportKey

func (g *GpgCLI) ExportKey(k PgpKeyBundle) (err error)

func (*GpgCLI) ImportKey

func (g *GpgCLI) ImportKey(secret bool, fp PgpFingerprint) (ret *PgpKeyBundle, err error)

func (*GpgCLI) Index

func (g *GpgCLI) Index(secret bool, query string) (ki *GpgKeyIndex, err error, w Warnings)

func (*GpgCLI) MakeCmd

func (g *GpgCLI) MakeCmd(args []string) *exec.Cmd

func (*GpgCLI) Run

func (g *GpgCLI) Run(arg RunGpgArg) (res RunGpgRes)

func (*GpgCLI) Run2

func (g *GpgCLI) Run2(arg RunGpg2Arg) (res RunGpg2Res)

type GpgClient

type GpgClient interface {
	Configure() (bool, error)                                        // bool = Whether the error is fatal or not
	ExportKey(k PgpKeyBundle) error                                  // Import a key into the GPG keyring
	Index(secret bool, query string) (*GpgKeyIndex, error, Warnings) // Index the keychain
	ImportKey(bool, PgpFingerprint) (*PgpKeyBundle, error)
}

A minimal access to the GPG client.

type GpgError

type GpgError struct {
	// contains filtered or unexported fields
}

func ErrorToGpgError

func ErrorToGpgError(e error) GpgError

func (GpgError) Error

func (e GpgError) Error() string

type GpgFingerprinter

type GpgFingerprinter interface {
	SetFingerprint(pgp *PgpFingerprint)
}

type GpgIndexElement

type GpgIndexElement interface {
	ToKey() *GpgPrimaryKey
}

type GpgIndexError

type GpgIndexError struct {
	// contains filtered or unexported fields
}

func ErrorToGpgIndexError

func ErrorToGpgIndexError(l int, e error) GpgIndexError

func (GpgIndexError) Error

func (e GpgIndexError) Error() string

type GpgIndexLine

type GpgIndexLine struct {
	// contains filtered or unexported fields
}

func ParseLine

func ParseLine(s string, i int) (ret *GpgIndexLine, err error)

func (GpgIndexLine) At

func (g GpgIndexLine) At(i int) string

func (GpgIndexLine) IsNewKey

func (l GpgIndexLine) IsNewKey() bool

func (GpgIndexLine) Len

func (g GpgIndexLine) Len() int

type GpgIndexParser

type GpgIndexParser struct {
	// contains filtered or unexported fields
}

func NewGpgIndexParser

func NewGpgIndexParser() *GpgIndexParser

func (*GpgIndexParser) GetLine

func (p *GpgIndexParser) GetLine() (ret *GpgIndexLine, err error)

func (*GpgIndexParser) Parse

func (p *GpgIndexParser) Parse(stream io.Reader) (ki *GpgKeyIndex, err error)

func (*GpgIndexParser) ParseElement

func (p *GpgIndexParser) ParseElement() (ret GpgIndexElement, err error)

func (*GpgIndexParser) ParseKey

func (p *GpgIndexParser) ParseKey(l *GpgIndexLine) (ret *GpgPrimaryKey, err error)

func (*GpgIndexParser) PutbackLine

func (p *GpgIndexParser) PutbackLine(line *GpgIndexLine)

func (*GpgIndexParser) Warn

func (p *GpgIndexParser) Warn(w Warning)

type GpgKeyIndex

type GpgKeyIndex struct {
	Keys                        []*GpgPrimaryKey
	Emails, Fingerprints, Id64s *BucketDict
}

func NewGpgKeyIndex

func NewGpgKeyIndex() *GpgKeyIndex

func (*GpgKeyIndex) AllFingerprints

func (ki *GpgKeyIndex) AllFingerprints() []PgpFingerprint

func (*GpgKeyIndex) GetRowFunc

func (p *GpgKeyIndex) GetRowFunc() func() []string

func (*GpgKeyIndex) IndexKey

func (ki *GpgKeyIndex) IndexKey(k *GpgPrimaryKey)

func (*GpgKeyIndex) Len

func (ki *GpgKeyIndex) Len() int

func (*GpgKeyIndex) Less

func (ki *GpgKeyIndex) Less(i, j int) bool

func (*GpgKeyIndex) PushElement

func (k *GpgKeyIndex) PushElement(e GpgIndexElement)

func (*GpgKeyIndex) Sort

func (ki *GpgKeyIndex) Sort()

func (*GpgKeyIndex) Swap

func (ki *GpgKeyIndex) Swap(i, j int)

type GpgPrimaryKey

type GpgPrimaryKey struct {
	GpgBaseKey
	// contains filtered or unexported fields
}

func NewGpgPrimaryKey

func NewGpgPrimaryKey() *GpgPrimaryKey

func ParseGpgPrimaryKey

func ParseGpgPrimaryKey(l *GpgIndexLine) (key *GpgPrimaryKey, err error)

func (*GpgPrimaryKey) AddFingerprint

func (k *GpgPrimaryKey) AddFingerprint(l *GpgIndexLine) (err error)

func (*GpgPrimaryKey) AddLine

func (p *GpgPrimaryKey) AddLine(l *GpgIndexLine) (err error)

func (*GpgPrimaryKey) AddSubkey

func (g *GpgPrimaryKey) AddSubkey(l *GpgIndexLine) (err error)

func (*GpgPrimaryKey) AddUid

func (k *GpgPrimaryKey) AddUid(l *GpgIndexLine) (err error)

func (*GpgPrimaryKey) GetAllId64s

func (k *GpgPrimaryKey) GetAllId64s() []string

func (*GpgPrimaryKey) GetEmails

func (k *GpgPrimaryKey) GetEmails() []string

func (*GpgPrimaryKey) GetFingerprint

func (k *GpgPrimaryKey) GetFingerprint() *PgpFingerprint

func (*GpgPrimaryKey) IsValid

func (k *GpgPrimaryKey) IsValid() bool

func (*GpgPrimaryKey) Parse

func (k *GpgPrimaryKey) Parse(l *GpgIndexLine) (err error)

func (*GpgPrimaryKey) ToKey

func (g *GpgPrimaryKey) ToKey() *GpgPrimaryKey

func (*GpgPrimaryKey) ToRow

func (k *GpgPrimaryKey) ToRow(i int) []string

type GpgSubKey

type GpgSubKey struct {
	GpgBaseKey
}

func ParseGpgSubKey

func ParseGpgSubKey(l *GpgIndexLine) (sk *GpgSubKey, err error)

type HackerNewsChecker

type HackerNewsChecker struct {
	// contains filtered or unexported fields
}

func (*HackerNewsChecker) ApiBase

func (h *HackerNewsChecker) ApiBase() string

func (*HackerNewsChecker) ApiUrl

func (h *HackerNewsChecker) ApiUrl() string

func (*HackerNewsChecker) CheckHint

func (rc *HackerNewsChecker) CheckHint(h SigHint) ProofError

func (*HackerNewsChecker) CheckStatus

func (rc *HackerNewsChecker) CheckStatus(h SigHint) ProofError

func (*HackerNewsChecker) HumanUrl

func (h *HackerNewsChecker) HumanUrl() string

func (*HackerNewsChecker) KarmaUrl

func (h *HackerNewsChecker) KarmaUrl() string

type HackerNewsServiceType

type HackerNewsServiceType struct{ BaseServiceType }

func (HackerNewsServiceType) AllStringKeys

func (t HackerNewsServiceType) AllStringKeys() []string

func (HackerNewsServiceType) CheckProofText

func (t HackerNewsServiceType) CheckProofText(text string, id SigId, sig string) (err error)

func (HackerNewsServiceType) CheckUsername

func (t HackerNewsServiceType) CheckUsername(s string) (err error)

func (HackerNewsServiceType) DisplayName

func (t HackerNewsServiceType) DisplayName(un string) string

func (HackerNewsServiceType) GetPrompt

func (t HackerNewsServiceType) GetPrompt() string

func (HackerNewsServiceType) GetProofType

func (t HackerNewsServiceType) GetProofType() string

func (HackerNewsServiceType) GetTypeName

func (t HackerNewsServiceType) GetTypeName() string

func (HackerNewsServiceType) NormalizeUsername

func (t HackerNewsServiceType) NormalizeUsername(s string) (string, error)

HackerNews names are case-sensitive

func (HackerNewsServiceType) PostInstructions

func (t HackerNewsServiceType) PostInstructions(un string) *Markup

func (HackerNewsServiceType) PreProofCheck

func (t HackerNewsServiceType) PreProofCheck(un string) (markup *Markup, err error)

func (HackerNewsServiceType) PrimaryStringKeys

func (t HackerNewsServiceType) PrimaryStringKeys() []string

func (HackerNewsServiceType) RecheckProofPosting

func (t HackerNewsServiceType) RecheckProofPosting(tryNumber, status int) (warning *Markup, err error)

func (HackerNewsServiceType) ToChecker

func (t HackerNewsServiceType) ToChecker() Checker

func (HackerNewsServiceType) ToServiceJson

func (t HackerNewsServiceType) ToServiceJson(un string) *jsonw.Wrapper

type HashSummer

type HashSummer func() []byte

func ArmoredAttachedSign

func ArmoredAttachedSign(out io.WriteCloser, signed openpgp.Entity, hints *openpgp.FileHints,
	config *packet.Config) (in io.WriteCloser, err error, h HashSummer)

type HashingWriteCloser

type HashingWriteCloser struct {
	// contains filtered or unexported fields
}

func (HashingWriteCloser) Close

func (h HashingWriteCloser) Close() error

func (HashingWriteCloser) Write

func (h HashingWriteCloser) Write(buf []byte) (int, error)

type HomeFinder

type HomeFinder interface {
	CacheDir() string
	ConfigDir() string
	Home(emptyOk bool) string
	DataDir() string
	RuntimeDir() (string, error)
	Normalize(s string) string
}

func NewHomeFinder

func NewHomeFinder(appName string, getHome HomeGetter) HomeFinder

type HomeGetter

type HomeGetter func() string

type HttpArgs

type HttpArgs map[string]HttpValue

func HttpArgsFromKeyValuePair

func HttpArgsFromKeyValuePair(key string, val HttpValue) HttpArgs

func NewHttpArgs

func NewHttpArgs() HttpArgs

func (*HttpArgs) Add

func (a *HttpArgs) Add(s string, v HttpValue)

func (HttpArgs) EncodeToString

func (a HttpArgs) EncodeToString() string

func (HttpArgs) ToValues

func (a HttpArgs) ToValues() url.Values

type HttpRequest

type HttpRequest interface {
	SetEnvironment(env Env)
}

type HttpValue

type HttpValue interface {
	String() string
}

type I

type I struct {
	Val int
}

func (I) String

func (i I) String() string

type IdentifyArg

type IdentifyArg struct {
	Me *User // The user who's doing the tracking
	Ui IdentifyUI
}

func (IdentifyArg) MeSet

func (i IdentifyArg) MeSet() bool

type IdentifyArgPrime

type IdentifyArgPrime struct {
	Uid            *UID
	User           string
	TrackStatement bool
	Luba           bool
	LoadSelf       bool
	LogUI          LogUI
}

func ImportIdentifyArg

func ImportIdentifyArg(a keybase_1.IdentifyArg) (ret IdentifyArgPrime)

func (IdentifyArgPrime) Export

func (a IdentifyArgPrime) Export() (res keybase_1.IdentifyArg)

type IdentifyEng

type IdentifyEng struct {
	// contains filtered or unexported fields
}

IdentifyEng is the type used by cmd_id Run, daemon id handler.

func NewIdentifyEng

func NewIdentifyEng(arg *IdentifyArgPrime, ui IdentifyUI) *IdentifyEng

func (*IdentifyEng) Run

func (e *IdentifyEng) Run() (*IdentifyRes, error)

func (*IdentifyEng) RunLuba

func (e *IdentifyEng) RunLuba() (*IdentifyRes, error)

func (*IdentifyEng) RunStandard

func (e *IdentifyEng) RunStandard() (*IdentifyRes, error)

type IdentifyOutcome

type IdentifyOutcome struct {
	Error       error
	KeyDiff     TrackDiff
	Deleted     []TrackDiffDeleted
	ProofChecks []*LinkCheckResult
	Warnings    []Warning
	TrackUsed   *TrackLookup
	TrackEqual  bool // Whether the track statement was equal to what we saw
	MeSet       bool // whether me was set at the time
}

func NewIdentifyOutcome

func NewIdentifyOutcome(m bool) *IdentifyOutcome

func (*IdentifyOutcome) Export

func (ir *IdentifyOutcome) Export() *keybase_1.IdentifyOutcome

func (IdentifyOutcome) ExportToUncheckedIdentity

func (ir IdentifyOutcome) ExportToUncheckedIdentity() *keybase_1.Identity

func (IdentifyOutcome) GetError

func (i IdentifyOutcome) GetError() error

func (IdentifyOutcome) GetErrorAndWarnings

func (i IdentifyOutcome) GetErrorAndWarnings(strict bool) (err error, warnings Warnings)

func (IdentifyOutcome) GetErrorLax

func (i IdentifyOutcome) GetErrorLax() (error, Warnings)

func (IdentifyOutcome) NumDeleted

func (i IdentifyOutcome) NumDeleted() int

func (IdentifyOutcome) NumProofFailures

func (i IdentifyOutcome) NumProofFailures() int

func (IdentifyOutcome) NumProofSuccesses

func (i IdentifyOutcome) NumProofSuccesses() int

func (IdentifyOutcome) NumTrackChanges

func (i IdentifyOutcome) NumTrackChanges() int

func (IdentifyOutcome) NumTrackFailures

func (i IdentifyOutcome) NumTrackFailures() int

type IdentifyRes

type IdentifyRes struct {
	Outcome *IdentifyOutcome
	User    *User
}

func (*IdentifyRes) Export

func (ir *IdentifyRes) Export() *keybase_1.IdentifyRes

type IdentifyState

type IdentifyState struct {
	// contains filtered or unexported fields
}

func NewIdentifyState

func NewIdentifyState(arg *IdentifyArg, res *IdentifyOutcome, u *User) IdentifyState

func (*IdentifyState) ComputeDeletedProofs

func (s *IdentifyState) ComputeDeletedProofs()

func (*IdentifyState) ComputeTrackDiffs

func (s *IdentifyState) ComputeTrackDiffs()

func (IdentifyState) GetUI

func (s IdentifyState) GetUI() IdentifyUI

func (*IdentifyState) InitResultList

func (s *IdentifyState) InitResultList()

type IdentifyUI

type IdentifyUI interface {
	FinishWebProofCheck(keybase_1.RemoteProof, keybase_1.LinkCheckResult)
	FinishSocialProofCheck(keybase_1.RemoteProof, keybase_1.LinkCheckResult)
	FinishAndPrompt(*keybase_1.IdentifyOutcome) (keybase_1.FinishAndPromptRes, error)
	DisplayCryptocurrency(keybase_1.Cryptocurrency)
	DisplayKey(keybase_1.FOKID, *keybase_1.TrackDiff)
	ReportLastTrack(*keybase_1.TrackSummary)
	Start()
	LaunchNetworkChecks(*keybase_1.Identity)
	DisplayTrackStatement(string) error
	SetUsername(username string)
}

type Identities

type Identities []Identity

func ImportPgpIdentities

func ImportPgpIdentities(ids []keybase_1.PgpIdentity) (ret Identities)

func (Identities) Export

func (ids Identities) Export() (res []keybase_1.PgpIdentity)

type Identity

type Identity struct {
	Username string
	Comment  string
	Email    string
}

func ImportPgpIdentity

func ImportPgpIdentity(arg keybase_1.PgpIdentity) (ret Identity)

func KeybaseIdentity

func KeybaseIdentity(un string) Identity

func ParseIdentity

func ParseIdentity(s string) (*Identity, error)

func (Identity) Export

func (id Identity) Export() (ret keybase_1.PgpIdentity)

func (Identity) Format

func (i Identity) Format() string

func (Identity) String

func (i Identity) String() string

func (Identity) ToPgpUserId

func (i Identity) ToPgpUserId() *packet.UserId

type IdentityTable

type IdentityTable struct {
	Order []TypedChainLink
	// contains filtered or unexported fields
}

func NewIdentityTable

func NewIdentityTable(eldest FOKID, sc *SigChain, h *SigHints) *IdentityTable

func (*IdentityTable) ActiveCryptocurrency

func (idt *IdentityTable) ActiveCryptocurrency() *CryptocurrencyChainLink

func (*IdentityTable) CollectAndDedupeActiveProofs

func (idt *IdentityTable) CollectAndDedupeActiveProofs()

func (*IdentityTable) GetActiveProofsFor

func (tab *IdentityTable) GetActiveProofsFor(st ServiceType) (ret []RemoteProofChainLink)

func (*IdentityTable) GetTrackList

func (idt *IdentityTable) GetTrackList() (ret []*TrackChainLink)

func (*IdentityTable) GetTrackMap

func (tab *IdentityTable) GetTrackMap() map[string][]*TrackChainLink

func (*IdentityTable) GetTrackingStatementFor

func (idt *IdentityTable) GetTrackingStatementFor(s string, uid UID) (
	ret *TrackChainLink, err error)

func (*IdentityTable) Identify

func (idt *IdentityTable) Identify(is IdentifyState)

func (*IdentityTable) IdentifyActiveProof

func (idt *IdentityTable) IdentifyActiveProof(lcr *LinkCheckResult, is IdentifyState)

func (*IdentityTable) Len

func (idt *IdentityTable) Len() int

func (*IdentityTable) MakeTrackSet

func (idt *IdentityTable) MakeTrackSet() *TrackSet

func (*IdentityTable) MarkCheckResult

func (tab *IdentityTable) MarkCheckResult(err ProofError)

func (*IdentityTable) Populate

func (idt *IdentityTable) Populate()

func (*IdentityTable) ProofRemoteCheck

func (idt *IdentityTable) ProofRemoteCheck(track *TrackLookup, res *LinkCheckResult)

func (*IdentityTable) ToOkProofs

func (idt *IdentityTable) ToOkProofs(proofs []Proof) []Proof

func (*IdentityTable) ToTrackingStatement

func (idt *IdentityTable) ToTrackingStatement() *jsonw.Wrapper

func (*IdentityTable) VerifySelfSig

func (idt *IdentityTable) VerifySelfSig(s string, uid UID) bool

type InsufficientKarmaError

type InsufficientKarmaError struct {
	// contains filtered or unexported fields
}

func (InsufficientKarmaError) Error

func (e InsufficientKarmaError) Error() string

type InternalApiEngine

type InternalApiEngine struct {
	BaseApiEngine
}

func (*InternalApiEngine) DoRequest

func (api *InternalApiEngine) DoRequest(
	arg ApiArg, req *http.Request) (*ApiRes, error)

func (*InternalApiEngine) Get

func (api *InternalApiEngine) Get(arg ApiArg) (*ApiRes, error)

func (*InternalApiEngine) Post

func (api *InternalApiEngine) Post(arg ApiArg) (*ApiRes, error)

type InternalError

type InternalError struct {
	// contains filtered or unexported fields
}

func (InternalError) Error

func (e InternalError) Error() string

type InvalidHostnameError

type InvalidHostnameError struct {
	// contains filtered or unexported fields
}

func (InvalidHostnameError) Error

func (e InvalidHostnameError) Error() string

type InviteRequestArg

type InviteRequestArg struct {
	Email    string
	Fullname string
	Notes    string
}

type JsonConfigFile

type JsonConfigFile struct {
	*JsonFile
}

func NewJsonConfigFile

func NewJsonConfigFile(s string) *JsonConfigFile

func (*JsonConfigFile) DeleteAtPath

func (f *JsonConfigFile) DeleteAtPath(p string)

func (*JsonConfigFile) DeleteUserField

func (f *JsonConfigFile) DeleteUserField(k string)

func (JsonConfigFile) GetBoolAtPath

func (f JsonConfigFile) GetBoolAtPath(p string) (ret bool, is_set bool)

func (JsonConfigFile) GetBundledCA

func (f JsonConfigFile) GetBundledCA(host string) (ret string)

func (JsonConfigFile) GetCacheSize

func (f JsonConfigFile) GetCacheSize(w string) (ret int, ok bool)

func (JsonConfigFile) GetConfigFilename

func (f JsonConfigFile) GetConfigFilename() (ret string)

func (JsonConfigFile) GetDaemonPort

func (f JsonConfigFile) GetDaemonPort() (int, bool)

func (JsonConfigFile) GetDbFilename

func (f JsonConfigFile) GetDbFilename() (ret string)

func (JsonConfigFile) GetDebug

func (f JsonConfigFile) GetDebug() (bool, bool)

func (JsonConfigFile) GetDeviceId

func (f JsonConfigFile) GetDeviceId() (ret string)

func (JsonConfigFile) GetEmail

func (f JsonConfigFile) GetEmail() (ret string)

func (JsonConfigFile) GetGpg

func (f JsonConfigFile) GetGpg() string

func (JsonConfigFile) GetGpgOptions

func (f JsonConfigFile) GetGpgOptions() []string

func (JsonConfigFile) GetHome

func (f JsonConfigFile) GetHome() (ret string)

func (JsonConfigFile) GetIntAtPath

func (f JsonConfigFile) GetIntAtPath(p string) (ret int, is_set bool)

func (JsonConfigFile) GetLocalRpcDebug

func (f JsonConfigFile) GetLocalRpcDebug() string

func (JsonConfigFile) GetMerkleKeyFingerprints

func (f JsonConfigFile) GetMerkleKeyFingerprints() []string

func (JsonConfigFile) GetNoPinentry

func (f JsonConfigFile) GetNoPinentry() (bool, bool)

func (JsonConfigFile) GetNullAtPath

func (f JsonConfigFile) GetNullAtPath(p string) (is_set bool)

func (JsonConfigFile) GetPerDeviceKID

func (f JsonConfigFile) GetPerDeviceKID() (ret string)

func (JsonConfigFile) GetPgpDir

func (f JsonConfigFile) GetPgpDir() (ret string)

func (JsonConfigFile) GetPgpFingerprint

func (f JsonConfigFile) GetPgpFingerprint() *PgpFingerprint

func (JsonConfigFile) GetPinentry

func (f JsonConfigFile) GetPinentry() string

func (JsonConfigFile) GetPlainLogging

func (f JsonConfigFile) GetPlainLogging() (bool, bool)

func (JsonConfigFile) GetProofCacheSize

func (f JsonConfigFile) GetProofCacheSize() (ret int, ok bool)

func (JsonConfigFile) GetProxy

func (f JsonConfigFile) GetProxy() (ret string)

func (JsonConfigFile) GetSalt

func (f JsonConfigFile) GetSalt() []byte

func (JsonConfigFile) GetSecretKeyring

func (f JsonConfigFile) GetSecretKeyring() string

func (JsonConfigFile) GetServerUri

func (f JsonConfigFile) GetServerUri() (ret string)

func (JsonConfigFile) GetSessionFilename

func (f JsonConfigFile) GetSessionFilename() (ret string)

func (JsonConfigFile) GetSocketFile

func (f JsonConfigFile) GetSocketFile() string

func (JsonConfigFile) GetStandalone

func (f JsonConfigFile) GetStandalone() (bool, bool)

func (JsonConfigFile) GetStringAtPath

func (f JsonConfigFile) GetStringAtPath(p string) (ret string, is_set bool)

func (JsonConfigFile) GetTopLevelBool

func (f JsonConfigFile) GetTopLevelBool(s string) (res bool, is_set bool)

func (JsonConfigFile) GetTopLevelString

func (f JsonConfigFile) GetTopLevelString(s string) (ret string)

func (JsonConfigFile) GetUid

func (f JsonConfigFile) GetUid() *UID

func (JsonConfigFile) GetUserCacheSize

func (f JsonConfigFile) GetUserCacheSize() (ret int, ok bool)

func (JsonConfigFile) GetUserField

func (f JsonConfigFile) GetUserField(s string) string

func (JsonConfigFile) GetUsername

func (f JsonConfigFile) GetUsername() string

func (*JsonConfigFile) Reset

func (f *JsonConfigFile) Reset()

func (*JsonConfigFile) SetBoolAtPath

func (f *JsonConfigFile) SetBoolAtPath(p string, v bool) (err error)

func (*JsonConfigFile) SetDeviceId

func (f *JsonConfigFile) SetDeviceId(did *DeviceId) (err error)

func (*JsonConfigFile) SetIntAtPath

func (f *JsonConfigFile) SetIntAtPath(p string, v int) (err error)

func (*JsonConfigFile) SetNullAtPath

func (f *JsonConfigFile) SetNullAtPath(p string) (err error)

func (*JsonConfigFile) SetPerDeviceKID

func (f *JsonConfigFile) SetPerDeviceKID(kid KID) (err error)

func (*JsonConfigFile) SetPgpFingerprint

func (f *JsonConfigFile) SetPgpFingerprint(fp *PgpFingerprint)

func (*JsonConfigFile) SetSalt

func (f *JsonConfigFile) SetSalt(b []byte)

func (*JsonConfigFile) SetStringAtPath

func (f *JsonConfigFile) SetStringAtPath(p string, v string) (err error)

func (*JsonConfigFile) SetUid

func (f *JsonConfigFile) SetUid(u UID)

func (*JsonConfigFile) SetUserField

func (f *JsonConfigFile) SetUserField(k, v string)

func (*JsonConfigFile) SetUsername

func (f *JsonConfigFile) SetUsername(s string)

func (*JsonConfigFile) UserDict

func (f *JsonConfigFile) UserDict() *jsonw.Wrapper

func (*JsonConfigFile) Write

func (f *JsonConfigFile) Write() error

type JsonFile

type JsonFile struct {
	// contains filtered or unexported fields
}

func NewJsonFile

func NewJsonFile(filename, which string) *JsonFile

func (*JsonFile) Exists

func (f *JsonFile) Exists() bool

func (*JsonFile) Load

func (f *JsonFile) Load(warnOnNotFound bool) error

func (*JsonFile) MaybeSave

func (f *JsonFile) MaybeSave(pretty bool, mode os.FileMode) (err error)

func (*JsonFile) Nuke

func (f *JsonFile) Nuke() error

func (*JsonFile) Save

func (f *JsonFile) Save(pretty bool, mode os.FileMode) (err error)

type JsonLocalDb

type JsonLocalDb struct {
	// contains filtered or unexported fields
}

func NewJsonLocalDb

func NewJsonLocalDb(e LocalDb) *JsonLocalDb

func (*JsonLocalDb) Close

func (j *JsonLocalDb) Close() error

func (*JsonLocalDb) Delete

func (j *JsonLocalDb) Delete(id DbKey) error

func (*JsonLocalDb) Get

func (j *JsonLocalDb) Get(id DbKey) (*jsonw.Wrapper, error)

func (*JsonLocalDb) GetInto

func (j *JsonLocalDb) GetInto(obj interface{}, id DbKey) (found bool, err error)

func (*JsonLocalDb) Lookup

func (j *JsonLocalDb) Lookup(id DbKey) (*jsonw.Wrapper, error)

func (*JsonLocalDb) Nuke

func (j *JsonLocalDb) Nuke() error

func (*JsonLocalDb) Open

func (j *JsonLocalDb) Open() error

func (*JsonLocalDb) Put

func (j *JsonLocalDb) Put(id DbKey, aliases []DbKey, val *jsonw.Wrapper) error

func (*JsonLocalDb) PutObj

func (j *JsonLocalDb) PutObj(id DbKey, aliases []DbKey, obj interface{}) (err error)

type KID

type KID []byte

func GetKID

func GetKID(w *jsonw.Wrapper) (kid KID, err error)

func ImportKID

func ImportKID(s string) (ret KID, err error)

func (KID) Eq

func (k KID) Eq(k2 KID) bool

func (KID) IsValid

func (k KID) IsValid() bool

func (KID) String

func (k KID) String() string

func (KID) ToBytes

func (k KID) ToBytes() []byte

func (KID) ToMapKey

func (k KID) ToMapKey() string

func (KID) ToNaclSigningKeyPublic

func (k KID) ToNaclSigningKeyPublic() *NaclSigningKeyPublic

func (KID) ToShortIdString

func (k KID) ToShortIdString() string

type KID2

type KID2 []byte

type KeyCannotSignError

type KeyCannotSignError struct{}

func (KeyCannotSignError) Error

func (s KeyCannotSignError) Error() string

type KeyCannotVerifyError

type KeyCannotVerifyError struct{}

func (KeyCannotVerifyError) Error

func (k KeyCannotVerifyError) Error() string

type KeyExistsError

type KeyExistsError struct {
	// contains filtered or unexported fields
}

func (KeyExistsError) Error

func (k KeyExistsError) Error() string

type KeyFamily

type KeyFamily struct {
	Sibkeys KeyMap `json:"sibkeys"`
	Subkeys KeyMap `json:"subkeys"`
	// contains filtered or unexported fields
}

As returned by user/lookup.json

func ParseKeyFamily

func ParseKeyFamily(jw *jsonw.Wrapper) (ret *KeyFamily, err error)

ParseKeyFamily takes as input a dictionary from a JSON file and returns a parsed version for manipulation in the program.

func (KeyFamily) FindActiveSibkey

func (kf KeyFamily) FindActiveSibkey(f FOKID) (key GenericKey, err error)

FindSibkey finds a sibkey in our KeyFamily, by either PGP fingerprint or KID. It returns the GenericKey object that's useful for actually performing PGP ops.

func (*KeyFamily) GetEldest

func (kf *KeyFamily) GetEldest() *FOKID

GetEldest gets the KID of the eldest key in the family.

func (KeyFamily) GetSigningKey

func (kf KeyFamily) GetSigningKey(kid_s string) (ret GenericKey)

func (*KeyFamily) Import

func (kf *KeyFamily) Import() (err error)

Import takes all Subkeys and Subkeys and imports them and indexes them. It indexes them both by KID and by PgpFingerprint, if available.

func (*KeyFamily) LocalDelegate

func (kf *KeyFamily) LocalDelegate(key GenericKey, isSibkey bool, eldest bool) (err error)

LocalDelegate performs a local key delegation, without the server's permissions. We'll need to do this when a key is locally generated. If it's the eldest, we'll try to mark the keyFamily as having an eldest, and will fail if there's a clash.

func (KeyFamily) NewComputedKeyInfos

func (kf KeyFamily) NewComputedKeyInfos() *ComputedKeyInfos

NewComputedKeyInfos creates a new ComputedKeyInfos object from the given key family. It finds the eldest sibling in the family and marks his status LIVE, so that he can be used to verify signatures. There's obviously no one who can delegate to him, so we take it on faith.

type KeyFamilyError

type KeyFamilyError struct {
	// contains filtered or unexported fields
}

func (KeyFamilyError) Error

func (e KeyFamilyError) Error() string

type KeyGen

type KeyGen struct {
	// contains filtered or unexported fields
}

func NewKeyGen

func NewKeyGen(arg *KeyGenArg) *KeyGen

func (*KeyGen) CheckNoKey

func (s *KeyGen) CheckNoKey() error

func (*KeyGen) GenNacl

func (s *KeyGen) GenNacl() (err error)

func (*KeyGen) Generate

func (s *KeyGen) Generate() (ret *PgpKeyBundle, err error)

func (*KeyGen) GenerateKey

func (s *KeyGen) GenerateKey() (err error)

func (*KeyGen) GeneratePost

func (s *KeyGen) GeneratePost() (err error)

func (*KeyGen) Init

func (s *KeyGen) Init() error

func (*KeyGen) LoadMe

func (s *KeyGen) LoadMe() (err error)

func (*KeyGen) LoginAndCheckKey

func (s *KeyGen) LoginAndCheckKey() (err error)

func (*KeyGen) PostToServer

func (s *KeyGen) PostToServer() error

func (*KeyGen) Prompt

func (s *KeyGen) Prompt() (err error)

func (*KeyGen) Push

func (s *KeyGen) Push() (err error)

func (*KeyGen) ReloadMe

func (s *KeyGen) ReloadMe() (err error)

func (*KeyGen) Run

func (s *KeyGen) Run() (ret *PgpKeyBundle, err error)

func (*KeyGen) UpdateUser

func (s *KeyGen) UpdateUser() error

func (*KeyGen) WriteKey

func (s *KeyGen) WriteKey() (err error)

type KeyGenArg

type KeyGenArg struct {
	PrimaryBits  int
	SubkeyBits   int
	Ids          Identities
	Config       *packet.Config
	NoPublicPush bool
	DoSecretPush bool
	NoPassphrase bool
	KbPassphrase bool
	NoNaclEddsa  bool
	NoNaclDh     bool
	Pregen       *PgpKeyBundle
	KeyGenUI     KeyGenUI
	LoginUI      LoginUI
	LogUI        LogUI
	SecretUI     SecretUI
	Passphrase   string
	PGPUids      []string
	NoDefPGPUid  bool
}

func ImportKeyGenArg

func ImportKeyGenArg(a keybase_1.KeyGenArg) (ret KeyGenArg)

func (*KeyGenArg) AddDefaultUid

func (a *KeyGenArg) AddDefaultUid()

func (*KeyGenArg) CreatePgpIDs

func (a *KeyGenArg) CreatePgpIDs() error

CreateIDs creates identities for KeyGenArg.Ids if none exist. It uses PGPUids to determine the set of Ids. It does not set the default keybase.io uid. AddDefaultUid() does that.

func (KeyGenArg) Export

func (a KeyGenArg) Export() (ret keybase_1.KeyGenArg)

func (*KeyGenArg) Init

func (a *KeyGenArg) Init() (err error)

func (*KeyGenArg) PGPUserIDs

func (a *KeyGenArg) PGPUserIDs() ([]*packet.UserId, error)

type KeyGenError

type KeyGenError struct {
	// contains filtered or unexported fields
}

func (KeyGenError) Error

func (e KeyGenError) Error() string

func (KeyGenError) ToStatus

func (e KeyGenError) ToStatus() (s keybase_1.Status)

type KeyGenUI

type KeyGenUI interface {
	GetPushPreferences() (pp keybase_1.PushPreferences, err error)
}

type KeyMap

type KeyMap map[string]*ServerKeyRecord

func (KeyMap) Import

func (km KeyMap) Import(pgps_i []*PgpKeyBundle) (pgps_o []*PgpKeyBundle, err error)

Import takes all ServerKeyRecords in this KeyMap and imports the key bundle into a GenericKey object that can perform crypto ops. It also collects all PgpKeyBundles along the way.

type KeyRevokedError

type KeyRevokedError struct {
	// contains filtered or unexported fields
}

func (KeyRevokedError) Error

func (r KeyRevokedError) Error() string

type KeyStatus

type KeyStatus int
var (
	DLG_NONE   KeyStatus = 0
	DLG_SIBKEY KeyStatus = 1
	DLG_SUBKEY KeyStatus = 2
)

type KeyUnlocker

type KeyUnlocker struct {
	Tries    int
	Reason   string
	KeyDesc  string
	Which    string
	Ui       SecretUI
	Unlocker func(pw string) (ret GenericKey, err error)
}

func (KeyUnlocker) Run

func (arg KeyUnlocker) Run() (ret GenericKey, err error)

type KeybasePacket

type KeybasePacket struct {
	Body    interface{}        `codec:"body"`
	Hash    *KeybasePacketHash `codec:"hash,omitempty"`
	Tag     int                `codec:"tag"`
	Version int                `codec:"version"`
}

func DecodeArmoredPacket

func DecodeArmoredPacket(s string) (ret *KeybasePacket, err error)

func DecodePacket

func DecodePacket(data []byte) (ret *KeybasePacket, err error)

func GetPacket

func GetPacket(jsonw *jsonw.Wrapper) (ret *KeybasePacket, err error)

func (*KeybasePacket) ArmoredEncode

func (p *KeybasePacket) ArmoredEncode() (ret string, err error)

func (*KeybasePacket) CheckHash

func (p *KeybasePacket) CheckHash() error

func (*KeybasePacket) Encode

func (p *KeybasePacket) Encode() ([]byte, error)

func (*KeybasePacket) EncodeTo

func (p *KeybasePacket) EncodeTo(w io.Writer) error

func (*KeybasePacket) HashMe

func (p *KeybasePacket) HashMe() error

func (*KeybasePacket) HashToBytes

func (p *KeybasePacket) HashToBytes() (ret []byte, err error)

func (*KeybasePacket) MyUnmarshalBinary

func (ret *KeybasePacket) MyUnmarshalBinary(data []byte) (err error)

func (KeybasePacket) ToNaclSig

func (p KeybasePacket) ToNaclSig() (*NaclSig, error)

func (KeybasePacket) ToP3SKB

func (p KeybasePacket) ToP3SKB() (*P3SKB, error)

type KeybasePacketHash

type KeybasePacketHash struct {
	Type  int    `codec:"type"`
	Value []byte `codec:"value"`
}

type KeybasePackets

type KeybasePackets []*KeybasePacket

func DecodePackets

func DecodePackets(reader io.Reader) (ret KeybasePackets, err error)

func (KeybasePackets) Encode

func (p KeybasePackets) Encode() ([]byte, error)

func (KeybasePackets) EncodeTo

func (p KeybasePackets) EncodeTo(w io.Writer) error

func (KeybasePackets) ToListOfP3SKBs

func (p KeybasePackets) ToListOfP3SKBs() (ret []*P3SKB, err error)

type KeybaseTime

type KeybaseTime struct {
	Unix  int64 // UTC wallclock time
	Chain int   // Merkle root chain time
}

We have two notions of time we can use -- standard UTC which might be screwy (skewy) based upon local clock problems; or MerkleRoot seqno, which is totally ordered and all clients and server ought to agree on it. The issue is that we're not uniformly signing Merkle roots into signatures, especially those generated on the Web site.

func NowAsKeybaseTime

func NowAsKeybaseTime(seqno int) *KeybaseTime

NowAsKeybaseTime makes a representation of now. IF we don't know the MerkleTree chain seqno, just use 0

func TclToKeybaseTime

func TclToKeybaseTime(tcl TypedChainLink) *KeybaseTime

TclToKeybaseTime turns a TypedChainLink into a KeybaseTime tuple, looking inside the chainlink for the Unix wallclock and the global MerkleChain seqno.

type KeyringFile

type KeyringFile struct {
	Entities openpgp.EntityList
	// contains filtered or unexported fields
}

func (KeyringFile) GetFilename

func (k KeyringFile) GetFilename() string

func (*KeyringFile) Index

func (k *KeyringFile) Index() error

func (*KeyringFile) Load

func (k *KeyringFile) Load() error

func (*KeyringFile) LoadAndIndex

func (k *KeyringFile) LoadAndIndex() error

func (KeyringFile) Save

func (k KeyringFile) Save() error

func (KeyringFile) WriteTo

func (k KeyringFile) WriteTo(w io.Writer) error

type Keyrings

type Keyrings struct {
	Public []*KeyringFile
	Secret []*KeyringFile
	P3SKB  *P3SKBKeyringFile
}

func NewKeyrings

func NewKeyrings(e Env, usage Usage) *Keyrings

func (Keyrings) DecryptionKeys

func (k Keyrings) DecryptionKeys() []openpgp.Key

func (Keyrings) FindKey

func (k Keyrings) FindKey(fp PgpFingerprint, secret bool) *openpgp.Entity

func (Keyrings) GetSecretKey

func (k Keyrings) GetSecretKey(reason string, ui SecretUI) (key GenericKey, err error)

func (Keyrings) GetSecretKeyLocked

func (k Keyrings) GetSecretKeyLocked() (ret *P3SKB, which string, err error)

func (Keyrings) KeysById

func (k Keyrings) KeysById(id uint64) []openpgp.Key

func (Keyrings) KeysByIdUsage

func (k Keyrings) KeysByIdUsage(id uint64, usage byte) []openpgp.Key

func (*Keyrings) Load

func (k *Keyrings) Load() (err error)

func (*Keyrings) LoadKeyrings

func (k *Keyrings) LoadKeyrings(v []*KeyringFile) (err error)

func (Keyrings) MakeKeyrings

func (k Keyrings) MakeKeyrings(filenames []string, isPublic bool) []*KeyringFile

type LevelDb

type LevelDb struct {
	// contains filtered or unexported fields
}

func NewLevelDb

func NewLevelDb() *LevelDb

func (*LevelDb) Close

func (l *LevelDb) Close() error

func (*LevelDb) Delete

func (l *LevelDb) Delete(id DbKey) error

func (*LevelDb) Get

func (l *LevelDb) Get(id DbKey) ([]byte, bool, error)

func (*LevelDb) GetFilename

func (l *LevelDb) GetFilename() string

func (*LevelDb) Lookup

func (l *LevelDb) Lookup(id DbKey) ([]byte, bool, error)

func (*LevelDb) Nuke

func (l *LevelDb) Nuke() error

func (*LevelDb) Open

func (l *LevelDb) Open() error

Explicit open does nothing we'll wait for a lazy open

func (*LevelDb) Put

func (l *LevelDb) Put(id DbKey, aliases []DbKey, value []byte) error

type Lexer

type Lexer struct {
	// contains filtered or unexported fields
}

func NewLexer

func NewLexer(s string) *Lexer

func (*Lexer) Get

func (lx *Lexer) Get() *Token

func (*Lexer) Putback

func (lx *Lexer) Putback()

type LinkCheckResult

type LinkCheckResult struct {
	// contains filtered or unexported fields
}

func (LinkCheckResult) Export

func (l LinkCheckResult) Export() keybase_1.LinkCheckResult

func (LinkCheckResult) ExportToIdentifyRow

func (l LinkCheckResult) ExportToIdentifyRow(i int) keybase_1.IdentifyRow

func (LinkCheckResult) GetCached

func (l LinkCheckResult) GetCached() *CheckResult

func (LinkCheckResult) GetDiff

func (l LinkCheckResult) GetDiff() TrackDiff

func (LinkCheckResult) GetError

func (l LinkCheckResult) GetError() error

func (LinkCheckResult) GetHint

func (l LinkCheckResult) GetHint() *SigHint

func (LinkCheckResult) GetPosition

func (l LinkCheckResult) GetPosition() int

type LinkId

type LinkId []byte

func ComputeLinkId

func ComputeLinkId(d []byte) LinkId

func GetLinkId

func GetLinkId(w *jsonw.Wrapper) (LinkId, error)

func LinkIdFromHex

func LinkIdFromHex(s string) (LinkId, error)

func (LinkId) Eq

func (i1 LinkId) Eq(i2 LinkId) bool

func (LinkId) String

func (p LinkId) String() string

type LinkSummary

type LinkSummary struct {
	// contains filtered or unexported fields
}

func GetLinkSummary

func GetLinkSummary(j *jsonw.Wrapper) (ret *LinkSummary, err error)

func (LinkSummary) Less

func (ls LinkSummary) Less(ls2 LinkSummary) bool

func (LinkSummary) ToJson

func (l LinkSummary) ToJson() *jsonw.Wrapper

type LoadUserArg

type LoadUserArg struct {
	Uid               *UID
	Name              string
	PublicKeyOptional bool
	NoCacheResult     bool // currently ignore
	Self              bool
	ForceReload       bool // currently ignored
	AllKeys           bool
}

type LocalDb

type LocalDb interface {
	Open() error
	Close() error
	Nuke() error
	Put(id DbKey, aliases []DbKey, value []byte) error
	Delete(id DbKey) error
	Get(id DbKey) ([]byte, bool, error)
	Lookup(alias DbKey) ([]byte, bool, error)
}

type LockTable

type LockTable struct {
	// contains filtered or unexported fields
}

func NewLockTable

func NewLockTable() *LockTable

func (*LockTable) Lock

func (t *LockTable) Lock(s string) (ret *NamedLock)

type LogUI

type LogUI interface {
	Debug(format string, args ...interface{})
	Info(format string, args ...interface{})
	Warning(format string, args ...interface{})
	Notice(format string, args ...interface{})
	Error(format string, args ...interface{})
	Critical(format string, args ...interface{})
}

type LoggedInResult

type LoggedInResult struct {
	SessionId string
	CsrfToken string
	Uid       UID
	Username  string
}

type Logger

type Logger struct {
	logging.Logger
}

func NewDefaultLogger

func NewDefaultLogger() *Logger

func (*Logger) Configure

func (l *Logger) Configure(e *Env)

func (*Logger) InitLogging

func (log *Logger) InitLogging()

func (*Logger) PlainLogging

func (log *Logger) PlainLogging()

func (*Logger) Profile

func (log *Logger) Profile(fmts string, arg ...interface{})

type LoginAndIdentifyArg

type LoginAndIdentifyArg struct {
	Login      LoginArg
	IdentifyUI IdentifyUI
	LogUI      LogUI
}

type LoginArg

type LoginArg struct {
	Force      bool
	Prompt     bool
	Retry      int
	RetryMsg   string
	Username   string
	Passphrase string
	Ui         LoginUI
	SecretUI   SecretUI
	NoUi       bool
}

type LoginRequiredError

type LoginRequiredError struct {
}

func (LoginRequiredError) Error

func (e LoginRequiredError) Error() string

type LoginState

type LoginState struct {
	Configured      bool
	LoggedIn        bool
	SessionVerified bool
	// contains filtered or unexported fields
}

func NewLoginState

func NewLoginState() *LoginState

func (*LoginState) ComputeLoginPw

func (s *LoginState) ComputeLoginPw() ([]byte, error)

func (*LoginState) GenerateNewSalt

func (s *LoginState) GenerateNewSalt() error

func (*LoginState) GetCachedTriplesec

func (s *LoginState) GetCachedTriplesec() *triplesec.Cipher

func (*LoginState) GetSalt

func (s *LoginState) GetSalt() (salt []byte, err error)

func (*LoginState) GetSaltAndLoginSession

func (s *LoginState) GetSaltAndLoginSession(email_or_username string) error

func (LoginState) GetSharedSecret

func (s LoginState) GetSharedSecret() []byte

func (*LoginState) GetTriplesec

func (s *LoginState) GetTriplesec(un string, pp string, retry string, ui SecretUI) (ret *triplesec.Cipher, err error)

func (LoginState) IsLoggedIn

func (s LoginState) IsLoggedIn() bool

func (*LoginState) Login

func (s *LoginState) Login(arg LoginArg) (err error)

func (*LoginState) Logout

func (s *LoginState) Logout() error

func (*LoginState) PostLoginToServer

func (s *LoginState) PostLoginToServer(eOu string, lgpw []byte) error

func (*LoginState) SaveLoginState

func (s *LoginState) SaveLoginState(prompted bool) error

func (*LoginState) StretchKey

func (s *LoginState) StretchKey(passphrase string) (err error)

type LoginUI

type LoginUI interface {
	GetEmailOrUsername() (string, error)
}

type LubaRes

type LubaRes struct {
	User        *User
	Error       error
	AE          AssertionExpression
	Warnings    []error
	IdentifyRes *IdentifyOutcome
}

func LoadUserByAssertions

func LoadUserByAssertions(a string, withTracking bool, ui IdentifyUI) (res LubaRes)

func (*LubaRes) FindBestComponent

func (l *LubaRes) FindBestComponent() string

func (*LubaRes) Load

func (l *LubaRes) Load(a string, withTracking bool, ui IdentifyUI)

type Markup

type Markup struct {
	// contains filtered or unexported fields
}

func FmtMarkup

func FmtMarkup(f string, args ...interface{}) *Markup

func NewMarkup

func NewMarkup(s string) *Markup

func (*Markup) Append

func (m *Markup) Append(s string)

func (Markup) Export

func (m Markup) Export() (ret keybase_1.Text)

func (Markup) GetRaw

func (m Markup) GetRaw() string

func (Markup) ToReader

func (m Markup) ToReader() io.Reader

type MerkleClient

type MerkleClient struct {
	// contains filtered or unexported fields
}

func NewMerkleClient

func NewMerkleClient() *MerkleClient

func (*MerkleClient) Init

func (mc *MerkleClient) Init() error

func (*MerkleClient) LastRootToSigJson

func (mc *MerkleClient) LastRootToSigJson() (ret *jsonw.Wrapper, err error)

func (*MerkleClient) LastSeqno

func (mc *MerkleClient) LastSeqno() Seqno

func (*MerkleClient) LoadRoot

func (mc *MerkleClient) LoadRoot() error

func (*MerkleClient) LookupPath

func (mc *MerkleClient) LookupPath(q HttpArgs) (vp *VerificationPath, err error)

func (*MerkleClient) LookupUser

func (mc *MerkleClient) LookupUser(q HttpArgs) (u *MerkleUserLeaf, err error)

func (*MerkleClient) VerifyRoot

func (mc *MerkleClient) VerifyRoot(root *MerkleRoot) error

type MerkleRoot

type MerkleRoot struct {
	// contains filtered or unexported fields
}

func NewMerkleRootFromJson

func NewMerkleRootFromJson(jw *jsonw.Wrapper) (ret *MerkleRoot, err error)

func (*MerkleRoot) Store

func (mr *MerkleRoot) Store() error

func (*MerkleRoot) ToJson

func (mr *MerkleRoot) ToJson() (jw *jsonw.Wrapper)

func (*MerkleRoot) ToSigJson

func (mr *MerkleRoot) ToSigJson() (ret *jsonw.Wrapper)

type MerkleTriple

type MerkleTriple struct {
	// contains filtered or unexported fields
}

func (MerkleTriple) Less

func (mt MerkleTriple) Less(ls LinkSummary) bool

func (MerkleTriple) ToLinkSummary

func (mt MerkleTriple) ToLinkSummary() (ret LinkSummary)

type MerkleUserLeaf

type MerkleUserLeaf struct {
	// contains filtered or unexported fields
}

func LookupMerkleLeaf

func LookupMerkleLeaf(uid UID, local *User) (f *MerkleUserLeaf, err error)

func ParseMerkleUserLeaf

func ParseMerkleUserLeaf(jw *jsonw.Wrapper) (user *MerkleUserLeaf, err error)

type NaclDHKeyPair

type NaclDHKeyPair struct {
	Public  NaclDHKeyPublic
	Private *NaclDHKeyPrivate
}

func ImportNaclDHKeyPairFromBytes

func ImportNaclDHKeyPairFromBytes(pub []byte, priv []byte) (ret NaclDHKeyPair, err error)

func ImportNaclDHKeyPairFromHex

func ImportNaclDHKeyPairFromHex(s string) (ret NaclDHKeyPair, err error)

func (NaclDHKeyPair) CheckSecretKey

func (k NaclDHKeyPair) CheckSecretKey() (err error)

func (NaclDHKeyPair) Encode

func (k NaclDHKeyPair) Encode() (s string, err error)

func (NaclDHKeyPair) GetAlgoType

func (k NaclDHKeyPair) GetAlgoType() int

func (NaclDHKeyPair) GetFingerprintP

func (k NaclDHKeyPair) GetFingerprintP() *PgpFingerprint

func (NaclDHKeyPair) GetKid

func (p NaclDHKeyPair) GetKid() (ret KID)

func (NaclDHKeyPair) SignToString

func (k NaclDHKeyPair) SignToString(msg []byte) (sig string, idp *SigId, err error)

func (NaclDHKeyPair) ToP3SKB

func (k NaclDHKeyPair) ToP3SKB(t *triplesec.Cipher) (*P3SKB, error)

func (NaclDHKeyPair) ToShortIdString

func (p NaclDHKeyPair) ToShortIdString() string

func (NaclDHKeyPair) VerboseDescription

func (p NaclDHKeyPair) VerboseDescription() string

func (NaclDHKeyPair) Verify

func (k NaclDHKeyPair) Verify(armored string, expected []byte) (sigId *SigId, err error)

type NaclDHKeyPrivate

type NaclDHKeyPrivate [NACL_DH_KEYSIZE]byte

type NaclDHKeyPublic

type NaclDHKeyPublic [NACL_DH_KEYSIZE]byte

func (NaclDHKeyPublic) GetKid

func (k NaclDHKeyPublic) GetKid() KID

type NaclKeyGen

type NaclKeyGen struct {
	// contains filtered or unexported fields
}

func NewNaclKeyGen

func NewNaclKeyGen(arg NaclKeyGenArg) *NaclKeyGen

func (*NaclKeyGen) Generate

func (g *NaclKeyGen) Generate() (err error)

func (*NaclKeyGen) GetKeyPair

func (g *NaclKeyGen) GetKeyPair() NaclKeyPair

func (*NaclKeyGen) Push

func (g *NaclKeyGen) Push() (err error)

func (*NaclKeyGen) Run

func (g *NaclKeyGen) Run() (err error)

func (*NaclKeyGen) Save

func (g *NaclKeyGen) Save() (err error)

type NaclKeyGenArg

type NaclKeyGenArg struct {
	Signer    GenericKey // who is going to sign us into the Chain
	ExpiresIn int
	Generator func() (NaclKeyPair, error)
	Me        *User
	Type      string
	ExpireIn  int        // how long it lasts
	Primary   GenericKey // the primary key for this epoch
	LogUI     LogUI
}

type NaclKeyPair

type NaclKeyPair interface {
	GenericKey
}

func GenerateNaclDHKeyPair

func GenerateNaclDHKeyPair() (NaclKeyPair, error)

func GenerateNaclSigningKeyPair

func GenerateNaclSigningKeyPair() (NaclKeyPair, error)

type NaclSig

type NaclSig struct {
	Kid      KID                         `codec:"key"`
	Payload  []byte                      `codec:"payload,omitempty"`
	Sig      [ed25519.SignatureSize]byte `codec:"sig"`
	SigType  int                         `codec:"sig_type"`
	HashType int                         `codec:"hash_type"`
	Detached bool                        `codec:"detached"`
}

func (*NaclSig) ArmoredEncode

func (s *NaclSig) ArmoredEncode() (ret string, err error)

func (*NaclSig) ToPacket

func (s *NaclSig) ToPacket() (ret *KeybasePacket, err error)

func (NaclSig) Verify

func (s NaclSig) Verify() (err error)

type NaclSigningKeyPair

type NaclSigningKeyPair struct {
	Public  NaclSigningKeyPublic
	Private *NaclSigningKeyPrivate
}

func ImportNaclSigningKeyPairFromBytes

func ImportNaclSigningKeyPairFromBytes(pub []byte, priv []byte) (ret NaclSigningKeyPair, err error)

func ImportNaclSigningKeyPairFromHex

func ImportNaclSigningKeyPairFromHex(s string) (ret NaclSigningKeyPair, err error)

func (NaclSigningKeyPair) CheckSecretKey

func (k NaclSigningKeyPair) CheckSecretKey() (err error)

func (NaclSigningKeyPair) Encode

func (k NaclSigningKeyPair) Encode() (s string, err error)

func (NaclSigningKeyPair) GetAlgoType

func (k NaclSigningKeyPair) GetAlgoType() int

func (NaclSigningKeyPair) GetFingerprintP

func (p NaclSigningKeyPair) GetFingerprintP() *PgpFingerprint

func (NaclSigningKeyPair) GetKid

func (p NaclSigningKeyPair) GetKid() (ret KID)

func (NaclSigningKeyPair) Sign

func (k NaclSigningKeyPair) Sign(msg []byte) (ret *NaclSig, err error)

func (NaclSigningKeyPair) SignToString

func (k NaclSigningKeyPair) SignToString(msg []byte) (sig string, idp *SigId, err error)

func (NaclSigningKeyPair) ToP3SKB

func (k NaclSigningKeyPair) ToP3SKB(t *triplesec.Cipher) (*P3SKB, error)

func (NaclSigningKeyPair) ToShortIdString

func (p NaclSigningKeyPair) ToShortIdString() string

func (NaclSigningKeyPair) VerboseDescription

func (p NaclSigningKeyPair) VerboseDescription() string

func (NaclSigningKeyPair) Verify

func (k NaclSigningKeyPair) Verify(armored string, expected []byte) (sigId *SigId, err error)

type NaclSigningKeyPrivate

type NaclSigningKeyPrivate [ed25519.PrivateKeySize]byte

func (NaclSigningKeyPrivate) ToNaclLibrary

func (k NaclSigningKeyPrivate) ToNaclLibrary() *[ed25519.PrivateKeySize]byte

type NaclSigningKeyPublic

type NaclSigningKeyPublic [ed25519.PublicKeySize]byte

func (NaclSigningKeyPublic) GetKid

func (k NaclSigningKeyPublic) GetKid() KID

func (NaclSigningKeyPublic) ToNaclLibrary

func (k NaclSigningKeyPublic) ToNaclLibrary() *[ed25519.PublicKeySize]byte

type NamedLock

type NamedLock struct {
	// contains filtered or unexported fields
}

func (*NamedLock) Unlock

func (l *NamedLock) Unlock()

type NeedInputError

type NeedInputError struct {
	// contains filtered or unexported fields
}

func (NeedInputError) Error

func (e NeedInputError) Error() string

type NoConfigFile

type NoConfigFile struct{}

func (NoConfigFile) Error

func (n NoConfigFile) Error() string

type NoConfigWriterError

type NoConfigWriterError struct{}

func (NoConfigWriterError) Error

func (e NoConfigWriterError) Error() string

type NoEldestKeyError

type NoEldestKeyError struct {
}

func (NoEldestKeyError) Error

func (e NoEldestKeyError) Error() string

type NoKeyError

type NoKeyError struct {
	// contains filtered or unexported fields
}

func (NoKeyError) Error

func (u NoKeyError) Error() string

type NoKeyringsError

type NoKeyringsError struct{}

func (NoKeyringsError) Error

func (k NoKeyringsError) Error() string

type NoSecretKeyError

type NoSecretKeyError struct {
}

func (NoSecretKeyError) Error

func (u NoSecretKeyError) Error() string

type NoSelectedKeyError

type NoSelectedKeyError struct {
	// contains filtered or unexported fields
}

func (NoSelectedKeyError) Error

func (n NoSelectedKeyError) Error() string

type NoSigChainError

type NoSigChainError struct{}

func (NoSigChainError) Error

func (e NoSigChainError) Error() string

type NoUiError

type NoUiError struct {
	// contains filtered or unexported fields
}

func (NoUiError) Error

func (e NoUiError) Error() string

type NoUsernameError

type NoUsernameError struct{}

func (NoUsernameError) Error

func (e NoUsernameError) Error() string

type NodeHash

type NodeHash interface {
	Check(s string) bool // Check if the node hashes to this string
	String() string
}

func GetNodeHash

func GetNodeHash(w *jsonw.Wrapper) (NodeHash, error)

func NodeHashFromHex

func NodeHashFromHex(s string) (NodeHash, error)

type NodeHashLong

type NodeHashLong [NODE_HASH_LEN_LONG]byte

func (NodeHashLong) Check

func (h1 NodeHashLong) Check(s string) bool

func (NodeHashLong) String

func (h1 NodeHashLong) String() string

type NodeHashShort

type NodeHashShort [NODE_HASH_LEN_SHORT]byte

func (NodeHashShort) Check

func (h1 NodeHashShort) Check(s string) bool

func (NodeHashShort) String

func (h1 NodeHashShort) String() string

type NotConfirmedError

type NotConfirmedError struct{}

func (NotConfirmedError) Error

func (e NotConfirmedError) Error() string

type NotFoundError

type NotFoundError struct {
	// contains filtered or unexported fields
}

func (NotFoundError) Error

func (e NotFoundError) Error() string

type NotProvisionedError

type NotProvisionedError struct{}

func (NotProvisionedError) Error

func (e NotProvisionedError) Error() string

type NullConfiguration

type NullConfiguration struct{}

func (NullConfiguration) GetApiDump

func (n NullConfiguration) GetApiDump() (bool, bool)

func (NullConfiguration) GetBoolAtPath

func (n NullConfiguration) GetBoolAtPath(string) (bool, bool)

func (NullConfiguration) GetBundledCA

func (n NullConfiguration) GetBundledCA(h string) string

func (NullConfiguration) GetConfigFilename

func (n NullConfiguration) GetConfigFilename() string

func (NullConfiguration) GetDaemonPort

func (n NullConfiguration) GetDaemonPort() (int, bool)

func (NullConfiguration) GetDbFilename

func (n NullConfiguration) GetDbFilename() string

func (NullConfiguration) GetDebug

func (n NullConfiguration) GetDebug() (bool, bool)

func (NullConfiguration) GetDeviceId

func (n NullConfiguration) GetDeviceId() string

func (NullConfiguration) GetEmail

func (n NullConfiguration) GetEmail() string

func (NullConfiguration) GetGpg

func (n NullConfiguration) GetGpg() string

func (NullConfiguration) GetGpgOptions

func (n NullConfiguration) GetGpgOptions() []string

func (NullConfiguration) GetHome

func (n NullConfiguration) GetHome() string

func (NullConfiguration) GetIntAtPath

func (n NullConfiguration) GetIntAtPath(string) (int, bool)

func (NullConfiguration) GetLocalRpcDebug

func (n NullConfiguration) GetLocalRpcDebug() string

func (NullConfiguration) GetMerkleKeyFingerprints

func (n NullConfiguration) GetMerkleKeyFingerprints() []string

func (NullConfiguration) GetNoPinentry

func (n NullConfiguration) GetNoPinentry() (bool, bool)

func (NullConfiguration) GetNullAtPath

func (n NullConfiguration) GetNullAtPath(string) bool

func (NullConfiguration) GetPerDeviceKID

func (n NullConfiguration) GetPerDeviceKID() string

func (NullConfiguration) GetPgpDir

func (n NullConfiguration) GetPgpDir() string

func (NullConfiguration) GetPgpFingerprint

func (n NullConfiguration) GetPgpFingerprint() *PgpFingerprint

func (NullConfiguration) GetPinentry

func (n NullConfiguration) GetPinentry() string

func (NullConfiguration) GetPlainLogging

func (n NullConfiguration) GetPlainLogging() (bool, bool)

func (NullConfiguration) GetProofCacheSize

func (n NullConfiguration) GetProofCacheSize() (int, bool)

func (NullConfiguration) GetProxy

func (n NullConfiguration) GetProxy() string

func (NullConfiguration) GetSalt

func (n NullConfiguration) GetSalt() []byte

func (NullConfiguration) GetSecretKeyring

func (n NullConfiguration) GetSecretKeyring() string

func (NullConfiguration) GetServerUri

func (n NullConfiguration) GetServerUri() string

func (NullConfiguration) GetSessionFilename

func (n NullConfiguration) GetSessionFilename() string

func (NullConfiguration) GetSocketFile

func (n NullConfiguration) GetSocketFile() string

func (NullConfiguration) GetStandalone

func (n NullConfiguration) GetStandalone() (bool, bool)

func (NullConfiguration) GetStringAtPath

func (n NullConfiguration) GetStringAtPath(string) (string, bool)

func (NullConfiguration) GetUid

func (n NullConfiguration) GetUid() *UID

func (NullConfiguration) GetUserCacheSize

func (n NullConfiguration) GetUserCacheSize() (int, bool)

func (NullConfiguration) GetUsername

func (n NullConfiguration) GetUsername() string

type ObjType

type ObjType byte

type P3SKB

type P3SKB struct {
	Priv P3SKBPriv `codec:"priv"`
	Pub  []byte    `codec:"pub"`
	Type int       `codec:"type,omitempty"`
	// contains filtered or unexported fields
}

func WriteP3SKBToKeyring

func WriteP3SKBToKeyring(k GenericKey, tsec *triplesec.Cipher, lui LogUI) (p3skb *P3SKB, err error)

func (*P3SKB) ArmoredEncode

func (s *P3SKB) ArmoredEncode() (ret string, err error)

func (*P3SKB) GetPubKey

func (p *P3SKB) GetPubKey() (key GenericKey, err error)

func (*P3SKB) PromptAndUnlock

func (p *P3SKB) PromptAndUnlock(reason string, which string, ui SecretUI) (ret GenericKey, err error)

func (*P3SKB) ReadKey

func (p *P3SKB) ReadKey(priv bool) (g GenericKey, err error)

func (*P3SKB) ToPacket

func (p *P3SKB) ToPacket() (ret *KeybasePacket, err error)

func (*P3SKB) UnlockSecretKey

func (p *P3SKB) UnlockSecretKey(tsec *triplesec.Cipher) (key GenericKey, err error)

func (*P3SKB) VerboseDescription

func (p *P3SKB) VerboseDescription() (ret string, err error)

type P3SKBKeyringFile

type P3SKBKeyringFile struct {
	Blocks []*P3SKB
	// contains filtered or unexported fields
}

func NewP3SKBKeyringFile

func NewP3SKBKeyringFile(n string) *P3SKBKeyringFile

func (P3SKBKeyringFile) FindSecretKey

func (f P3SKBKeyringFile) FindSecretKey(kids []KID) (ret *P3SKB)

FindSecretKey will, given a list of KIDs, find the first one in the list that has a corresponding secret key in the keyring file.

func (P3SKBKeyringFile) GetFilename

func (f P3SKBKeyringFile) GetFilename() string

func (*P3SKBKeyringFile) Index

func (k *P3SKBKeyringFile) Index() (err error)

func (*P3SKBKeyringFile) Load

func (k *P3SKBKeyringFile) Load() (err error)

func (*P3SKBKeyringFile) LoadAndIndex

func (k *P3SKBKeyringFile) LoadAndIndex() error

func (P3SKBKeyringFile) LookupByFingerprint

func (k P3SKBKeyringFile) LookupByFingerprint(fp PgpFingerprint) *P3SKB

func (P3SKBKeyringFile) LookupByKid

func (f P3SKBKeyringFile) LookupByKid(k KID) *P3SKB

func (P3SKBKeyringFile) LookupWithComputedKeyFamily

func (k P3SKBKeyringFile) LookupWithComputedKeyFamily(ckf *ComputedKeyFamily) *P3SKB

func (*P3SKBKeyringFile) Push

func (f *P3SKBKeyringFile) Push(p3skb *P3SKB) error

func (*P3SKBKeyringFile) PushAndSave

func (p *P3SKBKeyringFile) PushAndSave(p3skb *P3SKB, lui LogUI) (err error)

func (*P3SKBKeyringFile) Save

func (f *P3SKBKeyringFile) Save(lui LogUI) error

func (P3SKBKeyringFile) WriteTo

func (f P3SKBKeyringFile) WriteTo(w io.Writer) error

type P3SKBPriv

type P3SKBPriv struct {
	Data       []byte `codec:"data"`
	Encryption int    `codec:"encryption"`
}

type Packetable

type Packetable interface {
	ToPacket() (*KeybasePacket, error)
}

type ParsedSig

type ParsedSig struct {
	Block       *armor.Block
	SigBody     []byte
	MD          *openpgp.MessageDetails
	LiteralData []byte
}

func OpenSig

func OpenSig(armored string) (ps *ParsedSig, err error)

func (*ParsedSig) AssertPayload

func (ps *ParsedSig) AssertPayload(expected []byte) error

func (*ParsedSig) ID

func (ps *ParsedSig) ID() SigId

func (*ParsedSig) Verify

func (ps *ParsedSig) Verify(k PgpKeyBundle) (err error)

type Parser

type Parser struct {
	// contains filtered or unexported fields
}

func NewParser

func NewParser(lexer *Lexer) *Parser

func (*Parser) Parse

func (p *Parser) Parse() AssertionExpression

type PassphraseError

type PassphraseError struct {
	// contains filtered or unexported fields
}

func (PassphraseError) Error

func (p PassphraseError) Error() string

func (PassphraseError) ToStatus

func (p PassphraseError) ToStatus() (s keybase_1.Status)

type PathStep

type PathStep struct {
	// contains filtered or unexported fields
}

type PgpFingerprint

type PgpFingerprint [PGP_FINGERPRINT_LEN]byte

func GetPgpFingerprint

func GetPgpFingerprint(w *jsonw.Wrapper) (*PgpFingerprint, error)

func ImportPgpFingerprint

func ImportPgpFingerprint(f keybase_1.FOKID) (ret *PgpFingerprint)

func PgpFingerprintFromHex

func PgpFingerprintFromHex(s string) (*PgpFingerprint, error)

func PgpFingerprintFromHexNoError

func PgpFingerprintFromHexNoError(s string) *PgpFingerprint

func (PgpFingerprint) Eq

func (*PgpFingerprint) ExportToFOKID

func (f *PgpFingerprint) ExportToFOKID() (ret keybase_1.FOKID)

func (PgpFingerprint) LoadFromLocalDb

func (p PgpFingerprint) LoadFromLocalDb() (*PgpKeyBundle, error)

func (PgpFingerprint) String

func (p PgpFingerprint) String() string

func (PgpFingerprint) ToDisplayString

func (p PgpFingerprint) ToDisplayString(verbose bool) string

func (PgpFingerprint) ToKeyId

func (p PgpFingerprint) ToKeyId() string

func (PgpFingerprint) ToQuads

func (p PgpFingerprint) ToQuads() string

type PgpKeyBundle

type PgpKeyBundle openpgp.Entity

func GetOneKey

func GetOneKey(jw *jsonw.Wrapper) (*PgpKeyBundle, error)

func NewPgpKeyBundle

func NewPgpKeyBundle(arg KeyGenArg) (*PgpKeyBundle, error)

NewEntity returns an Entity that contains a fresh RSA/RSA keypair with a single identity composed of the given full name, comment and email, any of which may be empty but must not contain any of "()<>\x00". If config is nil, sensible defaults will be used.

Modification of: https://code.google.com/p/go/source/browse/openpgp/keys.go?repo=crypto&r=8fec09c61d5d66f460d227fd1df3473d7e015bc6#456

From golang.com/x/crypto/openpgp/keys.go

func ReadOneKeyFromBytes

func ReadOneKeyFromBytes(b []byte) (*PgpKeyBundle, error)

func ReadOneKeyFromString

func ReadOneKeyFromString(s string) (*PgpKeyBundle, error)

func (*PgpKeyBundle) CheckFingerprint

func (p *PgpKeyBundle) CheckFingerprint(fp *PgpFingerprint) (err error)

func (*PgpKeyBundle) CheckSecretKey

func (k *PgpKeyBundle) CheckSecretKey() (err error)

func (PgpKeyBundle) DecryptionKeys

func (k PgpKeyBundle) DecryptionKeys() []openpgp.Key

func (*PgpKeyBundle) Encode

func (k *PgpKeyBundle) Encode() (ret string, err error)

func (*PgpKeyBundle) EncodeToStream

func (k *PgpKeyBundle) EncodeToStream(wc io.WriteCloser) (err error)

func (*PgpKeyBundle) FindEmail

func (pgp *PgpKeyBundle) FindEmail(em string) bool

func (*PgpKeyBundle) FindKeybaseUsername

func (k *PgpKeyBundle) FindKeybaseUsername(un string) bool

XXX for now this is OK but probably we need a PGP uid parser as in pgp-utils

func (PgpKeyBundle) GetAlgoType

func (k PgpKeyBundle) GetAlgoType() int

func (PgpKeyBundle) GetFingerprint

func (k PgpKeyBundle) GetFingerprint() PgpFingerprint

func (PgpKeyBundle) GetFingerprintP

func (k PgpKeyBundle) GetFingerprintP() *PgpFingerprint

func (*PgpKeyBundle) GetKid

func (k *PgpKeyBundle) GetKid() KID

func (PgpKeyBundle) GetKid2

func (k PgpKeyBundle) GetKid2() KID2

func (PgpKeyBundle) KeyDescription

func (k PgpKeyBundle) KeyDescription() string

func (PgpKeyBundle) KeysById

func (k PgpKeyBundle) KeysById(id uint64) []openpgp.Key

func (PgpKeyBundle) KeysByIdUsage

func (k PgpKeyBundle) KeysByIdUsage(id uint64, usage byte) []openpgp.Key

func (PgpKeyBundle) MatchesKey

func (k PgpKeyBundle) MatchesKey(key *openpgp.Key) bool

func (PgpKeyBundle) ReadAndVerify

func (k PgpKeyBundle) ReadAndVerify(armored string) (msg []byte, sig_id *SigId,
	err error)

func (*PgpKeyBundle) SignToString

func (key *PgpKeyBundle) SignToString(payload []byte) (out string, id *SigId, err error)

func (*PgpKeyBundle) StoreToLocalDb

func (p *PgpKeyBundle) StoreToLocalDb() error

func (*PgpKeyBundle) ToP3SKB

func (key *PgpKeyBundle) ToP3SKB(tsec *triplesec.Cipher) (ret *P3SKB, err error)

func (*PgpKeyBundle) Unlock

func (p *PgpKeyBundle) Unlock(reason string) error

func (PgpKeyBundle) UsersDescription

func (k PgpKeyBundle) UsersDescription() []string

func (PgpKeyBundle) VerboseDescription

func (k PgpKeyBundle) VerboseDescription() string

func (PgpKeyBundle) Verify

func (k PgpKeyBundle) Verify(armored string, expected []byte) (sigId *SigId,
	err error)

type Pinentry

type Pinentry struct {
	// contains filtered or unexported fields
}

func NewPinentry

func NewPinentry() *Pinentry

func (*Pinentry) FindProgram

func (pe *Pinentry) FindProgram() (error, error)

func (*Pinentry) Get

func (pe *Pinentry) Get(arg keybase_1.SecretEntryArg) (res *keybase_1.SecretEntryRes, err error)

func (*Pinentry) GetTerminalName

func (pe *Pinentry) GetTerminalName() error

func (*Pinentry) Init

func (pe *Pinentry) Init() (error, error)

func (*Pinentry) SetInitError

func (pe *Pinentry) SetInitError(e error)

type PostNewKeyArg

type PostNewKeyArg struct {
	Sig        string
	Id         SigId
	Type       string
	PublicKey  GenericKey
	SigningKey GenericKey
	PrimaryKey GenericKey
}

type PostProofArg

type PostProofArg struct {
	Sig            string
	Id             SigId
	RemoteUsername string
	ProofType      string
	Supersede      bool
	RemoteKey      string
	SigningKey     GenericKey
}

type PostProofRes

type PostProofRes struct {
	Text     string
	Id       string
	Metadata *jsonw.Wrapper
}

func PostProof

func PostProof(arg PostProofArg) (*PostProofRes, error)

type PromptArg

type PromptArg struct {
	TerminalPrompt string
	PinentryDesc   string
	PinentryPrompt string
	Checker        *Checker
	RetryMessage   string
}

type Proof

type Proof struct {
	Key, Value string
}

type ProofApiError

type ProofApiError struct {
	ProofErrorImpl
	// contains filtered or unexported fields
}

func NewProofApiError

func NewProofApiError(s ProofStatus, u string, d string, a ...interface{}) *ProofApiError

func XapiError

func XapiError(err error, u string) *ProofApiError

type ProofCache

type ProofCache struct {
	// contains filtered or unexported fields
}

func NewProofCache

func NewProofCache(capac int) (*ProofCache, error)

func (*ProofCache) Get

func (pc *ProofCache) Get(sid SigId) *CheckResult

func (*ProofCache) Put

func (pc *ProofCache) Put(sid SigId, pe ProofError) error

type ProofCheckHook

type ProofCheckHook func(l RemoteProofChainLink) (ProofChecker, ProofError)

type ProofChecker

type ProofChecker interface {
	CheckHint(h SigHint) ProofError
	CheckStatus(h SigHint) ProofError
}

type ProofCheckers

type ProofCheckers interface {
}

type ProofEngine

type ProofEngine struct {
	Force             bool
	Service, Username string

	ProveUI  ProveUI
	LoginUI  LoginUI
	SecretUI SecretUI
	LogUI    LogUI
	// contains filtered or unexported fields
}

func (*ProofEngine) CheckExists1

func (v *ProofEngine) CheckExists1() (err error)

func (*ProofEngine) CheckExists2

func (v *ProofEngine) CheckExists2() (err error)

func (*ProofEngine) CheckProofText

func (v *ProofEngine) CheckProofText() error

func (*ProofEngine) DoPrechecks

func (v *ProofEngine) DoPrechecks() (err error)

func (*ProofEngine) DoWarnings

func (v *ProofEngine) DoWarnings() (err error)

func (*ProofEngine) GenerateProof

func (v *ProofEngine) GenerateProof() (err error)

func (*ProofEngine) GetServiceType

func (v *ProofEngine) GetServiceType() (err error)

func (*ProofEngine) Init

func (v *ProofEngine) Init() error

func (*ProofEngine) InstructAction

func (v *ProofEngine) InstructAction() (err error)

func (*ProofEngine) LoadMe

func (v *ProofEngine) LoadMe() (err error)

func (*ProofEngine) Login

func (v *ProofEngine) Login() (err error)

func (*ProofEngine) NormalizeRemoteName

func (v *ProofEngine) NormalizeRemoteName() (err error)

func (*ProofEngine) PostProofToServer

func (v *ProofEngine) PostProofToServer() (err error)

func (*ProofEngine) PromptPostedLoop

func (v *ProofEngine) PromptPostedLoop() (err error)

func (*ProofEngine) PromptRemoteName

func (v *ProofEngine) PromptRemoteName() (err error)

func (*ProofEngine) Run

func (v *ProofEngine) Run() (err error)

type ProofError

type ProofError interface {
	error
	GetStatus() ProofStatus
	GetDesc() string
}

func ImportProofError

func ImportProofError(e keybase_1.ProofStatus) ProofError

type ProofErrorImpl

type ProofErrorImpl struct {
	Status ProofStatus
	Desc   string
}

func NewProofError

func NewProofError(s ProofStatus, d string, a ...interface{}) *ProofErrorImpl

func (*ProofErrorImpl) Error

func (e *ProofErrorImpl) Error() string

func (*ProofErrorImpl) GetDesc

func (e *ProofErrorImpl) GetDesc() string

func (*ProofErrorImpl) GetStatus

func (e *ProofErrorImpl) GetStatus() ProofStatus

type ProofNotYetAvailableError

type ProofNotYetAvailableError struct{}

func (ProofNotYetAvailableError) Error

type ProofSet

type ProofSet struct {
	// contains filtered or unexported fields
}

func NewProofSet

func NewProofSet(proofs []Proof) *ProofSet

func (ProofSet) Get

func (ps ProofSet) Get(keys []string) (ret []Proof)

type ProofStatus

type ProofStatus int

type ProtocolDowngradeError

type ProtocolDowngradeError struct {
	// contains filtered or unexported fields
}

func (ProtocolDowngradeError) Error

func (h ProtocolDowngradeError) Error() string

type ProveUI

type ProveUI interface {
	PromptOverwrite(string, keybase_1.PromptOverwriteType) (bool, error)
	PromptUsername(prompt string, prevError error) (string, error)
	OutputPrechecks(keybase_1.Text)
	PreProofWarning(keybase_1.Text) (bool, error)
	OutputInstructions(instructions keybase_1.Text, proof string) error
	OkToCheck(name string, attempt int) (bool, error)
	DisplayRecheckWarning(keybase_1.Text)
}

type RedditChecker

type RedditChecker struct {
	// contains filtered or unexported fields
}

func (*RedditChecker) CheckData

func (rc *RedditChecker) CheckData(h SigHint, dat *jsonw.Wrapper) ProofError

func (*RedditChecker) CheckHint

func (rc *RedditChecker) CheckHint(h SigHint) ProofError

func (*RedditChecker) CheckStatus

func (rc *RedditChecker) CheckStatus(h SigHint) ProofError

func (*RedditChecker) ScreenNameCompare

func (rc *RedditChecker) ScreenNameCompare(s1, s2 string) bool

func (*RedditChecker) UnpackData

func (rc *RedditChecker) UnpackData(inp *jsonw.Wrapper) (*jsonw.Wrapper, ProofError)

type RedditServiceType

type RedditServiceType struct{ BaseServiceType }

func (RedditServiceType) AllStringKeys

func (t RedditServiceType) AllStringKeys() []string

func (RedditServiceType) CheckProofText

func (t RedditServiceType) CheckProofText(text string, id SigId, sig string) (err error)

func (RedditServiceType) CheckUsername

func (r RedditServiceType) CheckUsername(s string) (err error)

func (RedditServiceType) DisplayName

func (t RedditServiceType) DisplayName(un string) string

func (RedditServiceType) FormatProofText

func (t RedditServiceType) FormatProofText(ppr *PostProofRes) (res string, err error)

func (RedditServiceType) GetPrompt

func (t RedditServiceType) GetPrompt() string

func (RedditServiceType) GetProofType

func (t RedditServiceType) GetProofType() string

func (RedditServiceType) GetTypeName

func (t RedditServiceType) GetTypeName() string

func (RedditServiceType) PostInstructions

func (t RedditServiceType) PostInstructions(un string) *Markup

func (RedditServiceType) PrimaryStringKeys

func (t RedditServiceType) PrimaryStringKeys() []string

func (RedditServiceType) RecheckProofPosting

func (t RedditServiceType) RecheckProofPosting(tryNumber, status int) (warning *Markup, err error)

func (RedditServiceType) ToChecker

func (t RedditServiceType) ToChecker() Checker

func (RedditServiceType) ToServiceJson

func (t RedditServiceType) ToServiceJson(un string) *jsonw.Wrapper
type RemoteProofChainLink interface {
	TypedChainLink
	TableKey() string
	LastWriterWins() bool
	GetRemoteUsername() string
	GetHostname() string
	GetProtocol() string
	DisplayCheck(ui IdentifyUI, lcr LinkCheckResult)
	ToTrackingStatement() (*jsonw.Wrapper, error)
	CheckDataJson() *jsonw.Wrapper
	ToIdString() string
	ToKeyValuePair() (string, string)
	ComputeTrackDiff(tl *TrackLookup) TrackDiff
	GetIntType() int
}

========================================================================= Remote, Web and Social

func ParseWebServiceBinding

func ParseWebServiceBinding(base GenericChainLink) (ret RemoteProofChainLink, e error)

To be used for signatures in a user's signature chain.

type Requester

type Requester interface {
	// contains filtered or unexported methods
}

Internal and External APIs both implement these methods, allowing us to share the request-making code below in doRequest

type ResolveResult

type ResolveResult struct {
	// contains filtered or unexported fields
}

func ResolveUid

func ResolveUid(input string) (res ResolveResult)

func ResolveUidValuePair

func ResolveUidValuePair(key, value string) (res ResolveResult)
type RevokeChainLink struct {
	GenericChainLink
}

func (*RevokeChainLink) IsRevocationIsh

func (r *RevokeChainLink) IsRevocationIsh() bool

func (*RevokeChainLink) ToDisplayString

func (r *RevokeChainLink) ToDisplayString() string

func (*RevokeChainLink) Type

func (r *RevokeChainLink) Type() string

type RpcLogFactory

type RpcLogFactory struct{}

func NewRpcLogFactory

func NewRpcLogFactory() *RpcLogFactory

func (*RpcLogFactory) NewLog

func (r *RpcLogFactory) NewLog(a net.Addr) rpc2.LogInterface

type RpcLogOptions

type RpcLogOptions struct {
	// contains filtered or unexported fields
}

func (*RpcLogOptions) ClientTrace

func (r *RpcLogOptions) ClientTrace() bool

func (*RpcLogOptions) Profile

func (r *RpcLogOptions) Profile() bool

func (*RpcLogOptions) Reload

func (r *RpcLogOptions) Reload()

func (*RpcLogOptions) ServerTrace

func (r *RpcLogOptions) ServerTrace() bool

func (*RpcLogOptions) ShowAddress

func (r *RpcLogOptions) ShowAddress() bool

func (*RpcLogOptions) ShowArg

func (r *RpcLogOptions) ShowArg() bool

func (*RpcLogOptions) ShowResult

func (r *RpcLogOptions) ShowResult() bool

func (*RpcLogOptions) TransportStart

func (r *RpcLogOptions) TransportStart() bool

type RunGpg2Arg

type RunGpg2Arg struct {
	Arguments []string
	Stdin     bool
	Stderr    bool
	Stdout    bool
}

type RunGpg2Res

type RunGpg2Res struct {
	Stdin  io.WriteCloser
	Stdout io.ReadCloser
	Stderr io.ReadCloser
	Wait   func() error
	Err    error
}

type RunGpgArg

type RunGpgArg struct {
	Arguments []string
	Stdin     bool
	Stderr    io.WriteCloser
	Stdout    io.WriteCloser
}

type RunGpgRes

type RunGpgRes struct {
	Stdin io.WriteCloser
	Err   error
	Wait  func() error
}

type S

type S struct {
	Val string
}

func (S) String

func (s S) String() string

type SafeWriter

type SafeWriter interface {
	GetFilename() string
	WriteTo(io.Writer) error
}

type SecretSyncer

type SecretSyncer struct {
	// Locks the whole object
	sync.Mutex
	Uid *UID
	// contains filtered or unexported fields
}

func (*SecretSyncer) FindActiveKey

func (ss *SecretSyncer) FindActiveKey(ckf *ComputedKeyFamily) (ret *P3SKB, err error)

FindActiveKey examines the synced keys, looking for one that's currently active.

func (*SecretSyncer) Load

func (ss *SecretSyncer) Load(uid UID) (err error)

Load loads a set of secret keys from storage and then checks if there are updates on the server. If there are, it will sync and store them.

type SecretUI

type SecretUI interface {
	GetSecret(pinentry keybase_1.SecretEntryArg, terminal *keybase_1.SecretEntryArg) (*keybase_1.SecretEntryRes, error)
	GetNewPassphrase(keybase_1.GetNewPassphraseArg) (string, error)
	GetKeybasePassphrase(keybase_1.GetKeybasePassphraseArg) (string, error)
}

type SelfProvisioner

type SelfProvisioner struct {
	// contains filtered or unexported fields
}

Provision ourselves or other devices via the various key exchange posibilities

func (*SelfProvisioner) CheckKeyProvisioned

func (sp *SelfProvisioner) CheckKeyProvisioned() (err error)

CheckProvisionedKey checks the current status of our client, to see if it has a provisioned key or not, and if so, whether we have the corresponding private key.

func (*SelfProvisioner) FindBestReprovisionKey

func (sp *SelfProvisioner) FindBestReprovisionKey() (ret GenericKey, err error)

FindBestReprovisionKey finds the best key to use for reprovisioning a device if the user's config file was corrupted. It will look at all active sibkeys, and all locally stored and available secret keys, and pick one to use.

func (*SelfProvisioner) LoadMe

func (sp *SelfProvisioner) LoadMe() (err error)

func (*SelfProvisioner) ReprovisionKey

func (sp *SelfProvisioner) ReprovisionKey() (err error)

Reprovision fixes a corruption in the user's setup by reprovisioning this user's stored private key

type SelfSigChainLink struct {
	GenericChainLink
}

func (*SelfSigChainLink) CheckDataJson

func (s *SelfSigChainLink) CheckDataJson() *jsonw.Wrapper

func (*SelfSigChainLink) ComputeTrackDiff

func (s *SelfSigChainLink) ComputeTrackDiff(tl *TrackLookup) TrackDiff

func (*SelfSigChainLink) DisplayCheck

func (s *SelfSigChainLink) DisplayCheck(ui IdentifyUI, lcr LinkCheckResult)

func (*SelfSigChainLink) GetHostname

func (w *SelfSigChainLink) GetHostname() string

func (*SelfSigChainLink) GetIntType

func (s *SelfSigChainLink) GetIntType() int

func (*SelfSigChainLink) GetProtocol

func (w *SelfSigChainLink) GetProtocol() string

func (*SelfSigChainLink) GetRemoteUsername

func (w *SelfSigChainLink) GetRemoteUsername() string

func (*SelfSigChainLink) LastWriterWins

func (w *SelfSigChainLink) LastWriterWins() bool

func (*SelfSigChainLink) TableKey

func (w *SelfSigChainLink) TableKey() string

func (*SelfSigChainLink) ToDisplayString

func (s *SelfSigChainLink) ToDisplayString() string

func (*SelfSigChainLink) ToIdString

func (s *SelfSigChainLink) ToIdString() string

func (*SelfSigChainLink) ToKeyValuePair

func (s *SelfSigChainLink) ToKeyValuePair() (string, string)

func (*SelfSigChainLink) ToTrackingStatement

func (s *SelfSigChainLink) ToTrackingStatement() (*jsonw.Wrapper, error)

func (*SelfSigChainLink) Type

func (r *SelfSigChainLink) Type() string

type SelfTrackError

type SelfTrackError struct{}

func (SelfTrackError) Error

func (e SelfTrackError) Error() string

type Seqno

type Seqno int64

type Server

type Server interface {
}

type ServerChainError

type ServerChainError struct {
	// contains filtered or unexported fields
}

func NewServerChainError

func NewServerChainError(d string, a ...interface{}) ServerChainError

func (ServerChainError) Error

func (e ServerChainError) Error() string

type ServerKeyRecord

type ServerKeyRecord struct {
	Kid            string  `json:"kid"`
	KeyType        int     `json:"key_type"`
	Bundle         string  `json:"bundle"`
	Mtime          int     `json:"mtime"`
	Ctime          int     `json:"ctime"`
	Etime          int     `json:"etime"`
	PgpFingerprint string  `json:"key_fingerprint"`
	SigningKid     *string `json:"signing_kid"`
	EldestKid      *string `json:"eldest_kid"`
	KeyLevel       int     `json:"key_level"`
	Status         int     `json:"status"`
	KeyBits        int     `json:"key_bits"`
	KeyAlgo        int     `json:"key_algo"`
	// contains filtered or unexported fields
}

As returned by user/lookup.json

func (*ServerKeyRecord) Import

func (skr *ServerKeyRecord) Import() (pgp *PgpKeyBundle, err error)

type ServerPrivateKey

type ServerPrivateKey struct {
	Kid     string `json:"kid"`
	KeyType int    `json:"key_type"`
	Bundle  string `json:"bundle"`
	Mtime   int    `json:"mtime"`
	Ctime   int    `json:"ctime"`
	KeyBits int    `json:"key_bits"`
	KeyAlgo int    `json:"key_algo"`
}

func (*ServerPrivateKey) FindActiveKey

func (k *ServerPrivateKey) FindActiveKey(ckf *ComputedKeyFamily) (ret *P3SKB, err error)

type ServerPrivateKeyMap

type ServerPrivateKeyMap map[string]ServerPrivateKey

type ServerPrivateKeys

type ServerPrivateKeys struct {
	Status      ApiStatus           `json:"status"`
	Version     int                 `json:"version"`
	Mtime       *int                `json:"mtime"`
	PrivateKeys ServerPrivateKeyMap `json:"private_keys"`
}

type ServiceBlock

type ServiceBlock struct {
	// contains filtered or unexported fields
}

Can be used to either parse a proof `service` JSON block, or a `remote_key_proof` JSON block in a tracking statement.

func ParseServiceBlock

func ParseServiceBlock(jw *jsonw.Wrapper) (sb *ServiceBlock, err error)

func (ServiceBlock) GetProofState

func (sb ServiceBlock) GetProofState() int

func (ServiceBlock) LastWriterWins

func (sb ServiceBlock) LastWriterWins() bool

func (ServiceBlock) ToIdString

func (sb ServiceBlock) ToIdString() string

func (ServiceBlock) ToKeyValuePair

func (sb ServiceBlock) ToKeyValuePair() (string, string)

type ServiceType

type ServiceType interface {
	AllStringKeys() []string
	PrimaryStringKeys() []string
	CheckUsername(string) error
	NormalizeUsername(string) (string, error)
	ToChecker() Checker
	GetPrompt() string
	LastWriterWins() bool
	PreProofCheck(username string) (*Markup, error)
	PreProofWarning(remotename string) *Markup
	ToServiceJson(remotename string) *jsonw.Wrapper
	PostInstructions(remotename string) *Markup
	DisplayName(username string) string
	RecheckProofPosting(tryNumber int, status int) (warning *Markup, err error)
	GetProofType() string
	GetTypeName() string
	CheckProofText(text string, id SigId, sig string) error
	FormatProofText(*PostProofRes) (string, error)
	GetApiArgKey() string
}

func GetServiceType

func GetServiceType(s string) ServiceType

type Session

type Session struct {
	// contains filtered or unexported fields
}

func NewSession

func NewSession() *Session

func NewSessionThin

func NewSessionThin(uid UID, username string) *Session

NewSessionThin creates a minimal (thin) session of just the uid and username. Clients of the daemon that use the session protocol need this.

func (*Session) Check

func (s *Session) Check() error

func (*Session) GetDictionary

func (s *Session) GetDictionary() *jsonw.Wrapper

func (Session) GetUid

func (s Session) GetUid() *UID

func (Session) GetUsername

func (s Session) GetUsername() *string

func (Session) HasSessionToken

func (s Session) HasSessionToken() bool

func (Session) IsLoggedIn

func (s Session) IsLoggedIn() bool

func (*Session) IsRecent

func (s *Session) IsRecent() bool

func (Session) IsValid

func (s Session) IsValid() bool

func (*Session) Load

func (s *Session) Load() error

func (*Session) LoadAndCheck

func (s *Session) LoadAndCheck() (bool, error)

func (*Session) Logout

func (s *Session) Logout() error

func (*Session) SetCsrf

func (s *Session) SetCsrf(t string)

func (*Session) SetDirty

func (s *Session) SetDirty()

func (*Session) SetLoggedIn

func (s *Session) SetLoggedIn(lir LoggedInResult)

func (*Session) Write

func (s *Session) Write() error

type SessionWriter

type SessionWriter interface {
	SetLoggedIn(LoggedInResult)
	Write() error
}

type ShutdownHook

type ShutdownHook func() error
type SibkeyChainLink struct {
	GenericChainLink
	// contains filtered or unexported fields
}
func ParseSibkeyChainLink(b GenericChainLink) (ret *SibkeyChainLink, err error)

func (*SibkeyChainLink) GetDelegatedKid

func (s *SibkeyChainLink) GetDelegatedKid() KID

func (*SibkeyChainLink) IsDelegation

func (s *SibkeyChainLink) IsDelegation() KeyStatus

func (*SibkeyChainLink) ToDisplayString

func (r *SibkeyChainLink) ToDisplayString() string

func (*SibkeyChainLink) Type

func (s *SibkeyChainLink) Type() string

type SigChain

type SigChain struct {
	// contains filtered or unexported fields
}

func LoadSigChain

func LoadSigChain(u *User, allKeys bool, f *MerkleUserLeaf, t *ChainType, preload *SigChain) (ret *SigChain, err error)

func (*SigChain) Bump

func (sc *SigChain) Bump(mt MerkleTriple)

func (*SigChain) CheckFreshness

func (sc *SigChain) CheckFreshness(srv *MerkleTriple) (current bool, err error)

func (SigChain) GetComputedKeyInfos

func (sc SigChain) GetComputedKeyInfos() (cki *ComputedKeyInfos)

func (SigChain) GetCurrentTailTriple

func (sc SigChain) GetCurrentTailTriple() (cli *MerkleTriple)

func (SigChain) GetFutureChainTail

func (sc SigChain) GetFutureChainTail() (ret *MerkleTriple)

func (SigChain) GetLastKnownId

func (sc SigChain) GetLastKnownId() (ret LinkId)

func (SigChain) GetLastKnownSeqno

func (sc SigChain) GetLastKnownSeqno() (ret Seqno)
func (sc SigChain) GetLastLink() *ChainLink

func (SigChain) GetLastLoadedId

func (sc SigChain) GetLastLoadedId() (ret LinkId)

func (SigChain) GetLastLoadedSeqno

func (sc SigChain) GetLastLoadedSeqno() (ret Seqno)

func (SigChain) Len

func (sc SigChain) Len() int

func (*SigChain) LimitToEldestFOKID

func (sc *SigChain) LimitToEldestFOKID(fokid FOKID) (links []*ChainLink)

LimitToEldestFOKID takes the given sigchain and walks backward, stopping once it scrolls of the current FOKID.

func (*SigChain) LimitToKeyFamily

func (sc *SigChain) LimitToKeyFamily(kf *KeyFamily) (links []*ChainLink)

LimitToKeyFamily takes the given sigchain and walks backwards, stopping at either the chain beginning or the first link that's not a member of the current KeyFamily

func (*SigChain) LoadFromServer

func (sc *SigChain) LoadFromServer(t *MerkleTriple) (dirtyTail *LinkSummary, err error)

func (*SigChain) LocalDelegate

func (sc *SigChain) LocalDelegate(kf *KeyFamily, key GenericKey, sigId *SigId, signingKid KID, isSibkey bool) (err error)

func (*SigChain) Store

func (sc *SigChain) Store() (err error)
func (sc *SigChain) VerifiedChainLinks(fp PgpFingerprint) (ret []*ChainLink)

func (*SigChain) VerifyChain

func (sc *SigChain) VerifyChain() error

func (*SigChain) VerifySigsAndComputeKeys

func (sc *SigChain) VerifySigsAndComputeKeys(ckf *ComputedKeyFamily) (cached bool, err error)

type SigChainLoader

type SigChainLoader struct {
	// contains filtered or unexported fields
}

func (*SigChainLoader) AccessPreload

func (l *SigChainLoader) AccessPreload() (cached bool, err error)

func (*SigChainLoader) CheckFreshness

func (l *SigChainLoader) CheckFreshness() (current bool, err error)

func (*SigChainLoader) GetKeyFamily

func (l *SigChainLoader) GetKeyFamily() (err error)

func (*SigChainLoader) GetMerkleTriple

func (l *SigChainLoader) GetMerkleTriple() (ret *MerkleTriple)

func (*SigChainLoader) GetUidString

func (l *SigChainLoader) GetUidString() string

func (*SigChainLoader) Load

func (l *SigChainLoader) Load() (ret *SigChain, err error)

func (*SigChainLoader) LoadFromServer

func (l *SigChainLoader) LoadFromServer() (err error)

func (*SigChainLoader) LoadLastLinkIdFromStorage

func (l *SigChainLoader) LoadLastLinkIdFromStorage() (ls *LinkSummary, err error)

func (*SigChainLoader) LoadLinksFromStorage

func (l *SigChainLoader) LoadLinksFromStorage() (err error)

func (*SigChainLoader) MakeSigChain

func (l *SigChainLoader) MakeSigChain() error

func (*SigChainLoader) Store

func (l *SigChainLoader) Store() (err error)

func (*SigChainLoader) StoreTail

func (l *SigChainLoader) StoreTail() (err error)

func (*SigChainLoader) VerifySigsAndComputeKeys

func (l *SigChainLoader) VerifySigsAndComputeKeys() (err error)

type SigHint

type SigHint struct {
	// contains filtered or unexported fields
}

func NewSigHint

func NewSigHint(jw *jsonw.Wrapper) (sh *SigHint, err error)

func (SigHint) Export

func (sh SigHint) Export() *keybase_1.SigHint

func (SigHint) GetApiUrl

func (sh SigHint) GetApiUrl() string

func (SigHint) GetCheckText

func (sh SigHint) GetCheckText() string

func (SigHint) GetHumanUrl

func (sh SigHint) GetHumanUrl() string

func (SigHint) MarshalToJson

func (sh SigHint) MarshalToJson() *jsonw.Wrapper

type SigHints

type SigHints struct {
	// contains filtered or unexported fields
}

func LoadAndRefreshSigHints

func LoadAndRefreshSigHints(uid UID) (sh *SigHints, err error)

func LoadSigHints

func LoadSigHints(uid UID) (sh *SigHints, err error)

func NewSigHints

func NewSigHints(jw *jsonw.Wrapper, uid UID, dirty bool) (sh *SigHints, err error)

func (SigHints) Lookup

func (sh SigHints) Lookup(i SigId) *SigHint

func (SigHints) MarshalToJson

func (sh SigHints) MarshalToJson() *jsonw.Wrapper

func (*SigHints) PopulateWith

func (sh *SigHints) PopulateWith(jw *jsonw.Wrapper) (err error)

func (*SigHints) Refresh

func (sh *SigHints) Refresh() error

func (*SigHints) Store

func (sh *SigHints) Store() (err error)

type SigId

type SigId [SIG_ID_LEN]byte

func ComputeSigIdFromSigBody

func ComputeSigIdFromSigBody(body []byte) SigId

func GetSigId

func GetSigId(w *jsonw.Wrapper, suffix bool) (*SigId, error)

func SigAssertKbPayload

func SigAssertKbPayload(armored string, expected []byte) (sigId *SigId, err error)

func SigAssertPayload

func SigAssertPayload(armored string, expected []byte) (sigId *SigId, err error)

func SigAssertPgpPayload

func SigAssertPgpPayload(armored string, expected []byte) (sigId *SigId, err error)

func SigIdFromHex

func SigIdFromHex(s string, suffix bool) (*SigId, error)

func SigIdFromSlice

func SigIdFromSlice(s []byte) (*SigId, error)

func SimpleSign

func SimpleSign(payload []byte, key PgpKeyBundle) (out string, id *SigId, err error)

SimpleSign signs the given data stream, outputs an armored string which is the attached signature of the input data

func (SigId) ToDisplayString

func (s SigId) ToDisplayString(verbose bool) string

func (SigId) ToMediumId

func (s SigId) ToMediumId() string

func (SigId) ToShortId

func (s SigId) ToShortId() string

func (SigId) ToString

func (s SigId) ToString(suffix bool) string

type SignupEngine

type SignupEngine struct {
	// contains filtered or unexported fields
}

func NewSignupEngine

func NewSignupEngine() *SignupEngine

func (*SignupEngine) CheckRegistered

func (s *SignupEngine) CheckRegistered() (err error)

func (*SignupEngine) GenPwh

func (s *SignupEngine) GenPwh(p string) (err error)

func (*SignupEngine) Init

func (s *SignupEngine) Init() error

func (*SignupEngine) Post

func (s *SignupEngine) Post(arg SignupEngineRunArg) (err error)

func (*SignupEngine) PostInviteRequest

func (s *SignupEngine) PostInviteRequest(arg InviteRequestArg) error

func (*SignupEngine) Run

func (*SignupEngine) WriteConfig

func (s *SignupEngine) WriteConfig() error

func (*SignupEngine) WriteOut

func (s *SignupEngine) WriteOut() (err error)

func (*SignupEngine) WriteSession

func (s *SignupEngine) WriteSession() error

type SignupEngineRunArg

type SignupEngineRunArg struct {
	Username   string
	Email      string
	InviteCode string
	Passphrase string
}

type SignupEngineRunRes

type SignupEngineRunRes struct {
	PassphraseOk bool
	PostOk       bool
	WriteOk      bool
	Uid          *UID
	Error        error
}
type SocialProofChainLink struct {
	GenericChainLink
	// contains filtered or unexported fields
}
func NewSocialProofChainLink(b GenericChainLink, s, u string) *SocialProofChainLink

func (*SocialProofChainLink) CheckDataJson

func (s *SocialProofChainLink) CheckDataJson() *jsonw.Wrapper

func (*SocialProofChainLink) ComputeTrackDiff

func (s *SocialProofChainLink) ComputeTrackDiff(tl *TrackLookup) TrackDiff

func (*SocialProofChainLink) DisplayCheck

func (s *SocialProofChainLink) DisplayCheck(ui IdentifyUI, lcr LinkCheckResult)

func (*SocialProofChainLink) GetHostname

func (w *SocialProofChainLink) GetHostname() string

func (*SocialProofChainLink) GetIntType

func (g *SocialProofChainLink) GetIntType() int

func (*SocialProofChainLink) GetProtocol

func (w *SocialProofChainLink) GetProtocol() string

func (*SocialProofChainLink) GetRemoteUsername

func (s *SocialProofChainLink) GetRemoteUsername() string

func (*SocialProofChainLink) GetService

func (s *SocialProofChainLink) GetService() string

func (*SocialProofChainLink) LastWriterWins

func (s *SocialProofChainLink) LastWriterWins() bool

func (*SocialProofChainLink) TableKey

func (s *SocialProofChainLink) TableKey() string

func (*SocialProofChainLink) ToDisplayString

func (w *SocialProofChainLink) ToDisplayString() string

func (*SocialProofChainLink) ToIdString

func (s *SocialProofChainLink) ToIdString() string

func (*SocialProofChainLink) ToKeyValuePair

func (s *SocialProofChainLink) ToKeyValuePair() (string, string)

func (*SocialProofChainLink) ToTrackingStatement

func (s *SocialProofChainLink) ToTrackingStatement() (*jsonw.Wrapper, error)

func (*SocialProofChainLink) Type

func (s *SocialProofChainLink) Type() string

type SocketInfo

type SocketInfo interface {
	PrepSocket() error
	ToStringPair() (string, string)
}

func ConfigureSocketInfo

func ConfigureSocketInfo() (ret SocketInfo, err error)

type SocketInfoTcp

type SocketInfoTcp struct {
	// contains filtered or unexported fields
}

func (SocketInfoTcp) PrepSocket

func (s SocketInfoTcp) PrepSocket() error

func (SocketInfoTcp) ToStringPair

func (s SocketInfoTcp) ToStringPair() (string, string)

type SocketInfoUnix

type SocketInfoUnix struct {
	// contains filtered or unexported fields
}

func (SocketInfoUnix) PrepSocket

func (s SocketInfoUnix) PrepSocket() error

func (SocketInfoUnix) ToStringPair

func (s SocketInfoUnix) ToStringPair() (string, string)

type SocketWrapper

type SocketWrapper struct {
	// contains filtered or unexported fields
}

type SpecialKeyRing

type SpecialKeyRing struct {
	// contains filtered or unexported fields
}

func NewSpecialKeyRing

func NewSpecialKeyRing(v []PgpFingerprint) *SpecialKeyRing

func (*SpecialKeyRing) Load

type StringWarning

type StringWarning string

func (StringWarning) Warn

func (s StringWarning) Warn()

func (StringWarning) Warning

func (s StringWarning) Warning() string
type SubkeyChainLink struct {
	GenericChainLink
	// contains filtered or unexported fields
}
func ParseSubkeyChainLink(b GenericChainLink) (ret *SubkeyChainLink, err error)

func (*SubkeyChainLink) GetDelegatedKid

func (s *SubkeyChainLink) GetDelegatedKid() KID

func (*SubkeyChainLink) IsDelegation

func (s *SubkeyChainLink) IsDelegation() KeyStatus

func (*SubkeyChainLink) ToDisplayString

func (r *SubkeyChainLink) ToDisplayString() string

func (*SubkeyChainLink) Type

func (s *SubkeyChainLink) Type() string

type TestConfig

type TestConfig struct {
	// contains filtered or unexported fields
}

TestConfig tracks libkb config during a test

func (*TestConfig) CleanTest

func (c *TestConfig) CleanTest()

func (*TestConfig) InitTest

func (c *TestConfig) InitTest(t *testing.T, initConfig string)

type TestOutput

type TestOutput struct {
	// contains filtered or unexported fields
}

TestOutput is a mock interface for capturing and testing output

func (TestOutput) Write

func (to TestOutput) Write(p []byte) (n int, err error)

type TestParameters

type TestParameters struct {
	ConfigFilename string
}

type Token

type Token struct {
	Typ int
	// contains filtered or unexported fields
}

func NewToken

func NewToken(typ int) *Token

func (Token) Eq

func (t Token) Eq(t2 Token) bool

type TooManyKeysError

type TooManyKeysError struct {
	// contains filtered or unexported fields
}

func (TooManyKeysError) Error

func (e TooManyKeysError) Error() string
type TrackChainLink struct {
	GenericChainLink
	// contains filtered or unexported fields
}

========================================================================= TrackChainLink

func GetLocalTrack

func GetLocalTrack(i UID) (ret *TrackChainLink, err error)
func ParseTrackChainLink(b GenericChainLink) (ret *TrackChainLink, err error)

func (*TrackChainLink) GetTrackedFOKID

func (l *TrackChainLink) GetTrackedFOKID() (ret FOKID)

func (*TrackChainLink) GetTrackedPgpFingerprint

func (l *TrackChainLink) GetTrackedPgpFingerprint() (*PgpFingerprint, error)

func (*TrackChainLink) GetTrackedUid

func (l *TrackChainLink) GetTrackedUid() (*UID, error)

func (*TrackChainLink) GetTrackedUsername

func (l *TrackChainLink) GetTrackedUsername() (string, error)

func (TrackChainLink) IsRemote

func (tcl TrackChainLink) IsRemote() bool

func (*TrackChainLink) IsRevoked

func (l *TrackChainLink) IsRevoked() bool

func (*TrackChainLink) RemoteKeyProofs

func (l *TrackChainLink) RemoteKeyProofs() *jsonw.Wrapper

func (*TrackChainLink) ToDisplayString

func (b *TrackChainLink) ToDisplayString() string

func (*TrackChainLink) ToServiceBlocks

func (l *TrackChainLink) ToServiceBlocks() (ret []*ServiceBlock)

func (*TrackChainLink) Type

func (t *TrackChainLink) Type() string

type TrackDiff

type TrackDiff interface {
	BreaksTracking() bool
	ToDisplayString() string
	ToDisplayMarkup() *Markup
	IsSameAsTracked() bool
	GetTrackDiffType() int
}

func ComputeRemoteDiff

func ComputeRemoteDiff(tracked, observed int) TrackDiff

type TrackDiffClash

type TrackDiffClash struct {
	// contains filtered or unexported fields
}

func (TrackDiffClash) BreaksTracking

func (t TrackDiffClash) BreaksTracking() bool

func (TrackDiffClash) GetTrackDiffType

func (t TrackDiffClash) GetTrackDiffType() int

func (TrackDiffClash) IsSameAsTracked

func (t TrackDiffClash) IsSameAsTracked() bool

func (TrackDiffClash) ToDisplayMarkup

func (t TrackDiffClash) ToDisplayMarkup() *Markup

func (TrackDiffClash) ToDisplayString

func (t TrackDiffClash) ToDisplayString() string

type TrackDiffDeleted

type TrackDiffDeleted struct {
	// contains filtered or unexported fields
}

func (TrackDiffDeleted) BreaksTracking

func (t TrackDiffDeleted) BreaksTracking() bool

func (TrackDiffDeleted) GetTrackDiffType

func (t TrackDiffDeleted) GetTrackDiffType() int

func (TrackDiffDeleted) IsSameAsTracked

func (t TrackDiffDeleted) IsSameAsTracked() bool

func (TrackDiffDeleted) ToDisplayMarkup

func (t TrackDiffDeleted) ToDisplayMarkup() *Markup

func (TrackDiffDeleted) ToDisplayString

func (t TrackDiffDeleted) ToDisplayString() string

type TrackDiffError

type TrackDiffError struct {
	// contains filtered or unexported fields
}

func (TrackDiffError) BreaksTracking

func (t TrackDiffError) BreaksTracking() bool

func (TrackDiffError) GetTrackDiffType

func (t TrackDiffError) GetTrackDiffType() int

func (TrackDiffError) IsSameAsTracked

func (t TrackDiffError) IsSameAsTracked() bool

func (TrackDiffError) ToDisplayMarkup

func (t TrackDiffError) ToDisplayMarkup() *Markup

func (TrackDiffError) ToDisplayString

func (t TrackDiffError) ToDisplayString() string

type TrackDiffNew

type TrackDiffNew struct{}

func (TrackDiffNew) BreaksTracking

func (t TrackDiffNew) BreaksTracking() bool

func (TrackDiffNew) GetTrackDiffType

func (t TrackDiffNew) GetTrackDiffType() int

func (TrackDiffNew) IsSameAsTracked

func (t TrackDiffNew) IsSameAsTracked() bool

func (TrackDiffNew) ToDisplayMarkup

func (t TrackDiffNew) ToDisplayMarkup() *Markup

func (TrackDiffNew) ToDisplayString

func (t TrackDiffNew) ToDisplayString() string

type TrackDiffNone

type TrackDiffNone struct{}

func (TrackDiffNone) BreaksTracking

func (t TrackDiffNone) BreaksTracking() bool

func (TrackDiffNone) GetTrackDiffType

func (t TrackDiffNone) GetTrackDiffType() int

func (TrackDiffNone) IsSameAsTracked

func (t TrackDiffNone) IsSameAsTracked() bool

func (TrackDiffNone) ToDisplayMarkup

func (t TrackDiffNone) ToDisplayMarkup() *Markup

func (TrackDiffNone) ToDisplayString

func (t TrackDiffNone) ToDisplayString() string

type TrackDiffRemoteChanged

type TrackDiffRemoteChanged struct {
	// contains filtered or unexported fields
}

func (TrackDiffRemoteChanged) BreaksTracking

func (t TrackDiffRemoteChanged) BreaksTracking() bool

func (TrackDiffRemoteChanged) GetTrackDiffType

func (t TrackDiffRemoteChanged) GetTrackDiffType() int

func (TrackDiffRemoteChanged) IsSameAsTracked

func (t TrackDiffRemoteChanged) IsSameAsTracked() bool

func (TrackDiffRemoteChanged) ToDisplayMarkup

func (t TrackDiffRemoteChanged) ToDisplayMarkup() *Markup

func (TrackDiffRemoteChanged) ToDisplayString

func (t TrackDiffRemoteChanged) ToDisplayString() string

type TrackDiffRemoteFail

type TrackDiffRemoteFail struct {
	// contains filtered or unexported fields
}

func (TrackDiffRemoteFail) BreaksTracking

func (t TrackDiffRemoteFail) BreaksTracking() bool

func (TrackDiffRemoteFail) GetTrackDiffType

func (t TrackDiffRemoteFail) GetTrackDiffType() int

func (TrackDiffRemoteFail) IsSameAsTracked

func (t TrackDiffRemoteFail) IsSameAsTracked() bool

func (TrackDiffRemoteFail) ToDisplayMarkup

func (t TrackDiffRemoteFail) ToDisplayMarkup() *Markup

func (TrackDiffRemoteFail) ToDisplayString

func (t TrackDiffRemoteFail) ToDisplayString() string

type TrackDiffRemoteWorking

type TrackDiffRemoteWorking struct {
	// contains filtered or unexported fields
}

func (TrackDiffRemoteWorking) BreaksTracking

func (t TrackDiffRemoteWorking) BreaksTracking() bool

func (TrackDiffRemoteWorking) GetTrackDiffType

func (t TrackDiffRemoteWorking) GetTrackDiffType() int

func (TrackDiffRemoteWorking) IsSameAsTracked

func (t TrackDiffRemoteWorking) IsSameAsTracked() bool

func (TrackDiffRemoteWorking) ToDisplayMarkup

func (t TrackDiffRemoteWorking) ToDisplayMarkup() *Markup

func (TrackDiffRemoteWorking) ToDisplayString

func (t TrackDiffRemoteWorking) ToDisplayString() string

type TrackDiffUpgraded

type TrackDiffUpgraded struct {
	// contains filtered or unexported fields
}

func (TrackDiffUpgraded) BreaksTracking

func (t TrackDiffUpgraded) BreaksTracking() bool

func (TrackDiffUpgraded) GetCurr

func (t TrackDiffUpgraded) GetCurr() string

func (TrackDiffUpgraded) GetPrev

func (t TrackDiffUpgraded) GetPrev() string

func (TrackDiffUpgraded) GetTrackDiffType

func (t TrackDiffUpgraded) GetTrackDiffType() int

func (TrackDiffUpgraded) IsSameAsTracked

func (t TrackDiffUpgraded) IsSameAsTracked() bool

func (TrackDiffUpgraded) ToDisplayMarkup

func (t TrackDiffUpgraded) ToDisplayMarkup() *Markup

func (TrackDiffUpgraded) ToDisplayString

func (t TrackDiffUpgraded) ToDisplayString() string

type TrackEngine

type TrackEngine struct {
	TheirName    string
	Them         *User
	Me           *User
	Interactive  bool
	NoSelf       bool
	StrictProofs bool
	MeRequired   bool
	// contains filtered or unexported fields
}

func NewTrackEngine

func NewTrackEngine(theirName string, ui IdentifyUI, sui SecretUI) *TrackEngine

NewTrackEngine creates a default TrackEngine for tracking theirName.

func (*TrackEngine) GetSigningKeyPub

func (e *TrackEngine) GetSigningKeyPub() (err error)

func (*TrackEngine) LoadMe

func (e *TrackEngine) LoadMe() error

func (*TrackEngine) LoadThem

func (e *TrackEngine) LoadThem() error

func (*TrackEngine) Run

func (e *TrackEngine) Run() (err error)

func (*TrackEngine) SecretUI

func (e *TrackEngine) SecretUI() SecretUI

func (*TrackEngine) StoreLocalTrack

func (e *TrackEngine) StoreLocalTrack() error

func (*TrackEngine) StoreRemoteTrack

func (e *TrackEngine) StoreRemoteTrack() (err error)

func (*TrackEngine) UI

func (e *TrackEngine) UI() IdentifyUI

type TrackIdComponent

type TrackIdComponent interface {
	ToIdString() string
	ToKeyValuePair() (string, string)
	GetProofState() int
	LastWriterWins() bool
}

Can either be a RemoteProofChainLink or one of the identities listed in a tracking statement

type TrackInstructions

type TrackInstructions struct {
	Local  bool
	Remote bool
}

func ImportFinishAndPromptRes

func ImportFinishAndPromptRes(f keybase_1.FinishAndPromptRes) (ti TrackInstructions)

type TrackLookup

type TrackLookup struct {
	// contains filtered or unexported fields
}

func NewTrackLookup

func NewTrackLookup(link *TrackChainLink) *TrackLookup

func (*TrackLookup) ComputeKeyDiff

func (l *TrackLookup) ComputeKeyDiff(curr *FOKID) TrackDiff

func (*TrackLookup) GetCTime

func (l *TrackLookup) GetCTime() time.Time

func (TrackLookup) GetProofState

func (l TrackLookup) GetProofState(tic TrackIdComponent) int

func (TrackLookup) IsRemote

func (l TrackLookup) IsRemote() bool

func (TrackLookup) ToSummary

func (l TrackLookup) ToSummary() TrackSummary

type TrackSet

type TrackSet struct {
	// contains filtered or unexported fields
}

func NewTrackSet

func NewTrackSet() *TrackSet

func (TrackSet) Add

func (ts TrackSet) Add(t TrackIdComponent)

func (TrackSet) GetProofState

func (ts TrackSet) GetProofState(tic TrackIdComponent) int

func (TrackSet) HasMember

func (ts TrackSet) HasMember(t TrackIdComponent) bool

func (TrackSet) LenEq

func (ts TrackSet) LenEq(b TrackSet) bool

func (TrackSet) Subtract

func (ts TrackSet) Subtract(b TrackSet) (out []TrackIdComponent)

type TrackSummary

type TrackSummary struct {
	// contains filtered or unexported fields
}

func ImportTrackSummary

func ImportTrackSummary(s *keybase_1.TrackSummary) *TrackSummary

func (TrackSummary) Export

func (s TrackSummary) Export() (ret keybase_1.TrackSummary)

func (TrackSummary) GetCTime

func (s TrackSummary) GetCTime() time.Time

func (TrackSummary) IsRemote

func (s TrackSummary) IsRemote() bool

type TwitterChecker

type TwitterChecker struct {
	// contains filtered or unexported fields
}

func (*TwitterChecker) CheckHint

func (rc *TwitterChecker) CheckHint(h SigHint) ProofError

func (*TwitterChecker) CheckStatus

func (rc *TwitterChecker) CheckStatus(h SigHint) ProofError

func (*TwitterChecker) ScreenNameCompare

func (rc *TwitterChecker) ScreenNameCompare(s1, s2 string) bool

type TwitterServiceType

type TwitterServiceType struct{ BaseServiceType }

func (TwitterServiceType) AllStringKeys

func (t TwitterServiceType) AllStringKeys() []string

func (TwitterServiceType) CheckProofText

func (t TwitterServiceType) CheckProofText(text string, id SigId, sig string) (err error)

func (TwitterServiceType) CheckUsername

func (t TwitterServiceType) CheckUsername(s string) (err error)

func (TwitterServiceType) DisplayName

func (t TwitterServiceType) DisplayName(un string) string

func (TwitterServiceType) GetPrompt

func (t TwitterServiceType) GetPrompt() string

func (TwitterServiceType) GetProofType

func (t TwitterServiceType) GetProofType() string

func (TwitterServiceType) GetTypeName

func (t TwitterServiceType) GetTypeName() string

func (TwitterServiceType) NormalizeUsername

func (t TwitterServiceType) NormalizeUsername(s string) (string, error)

func (TwitterServiceType) PostInstructions

func (t TwitterServiceType) PostInstructions(un string) *Markup

func (TwitterServiceType) PrimaryStringKeys

func (t TwitterServiceType) PrimaryStringKeys() []string

func (TwitterServiceType) RecheckProofPosting

func (t TwitterServiceType) RecheckProofPosting(tryNumber, status int) (warning *Markup, err error)

func (TwitterServiceType) ToChecker

func (t TwitterServiceType) ToChecker() Checker

func (TwitterServiceType) ToServiceJson

func (t TwitterServiceType) ToServiceJson(un string) *jsonw.Wrapper
type TypedChainLink interface {
	GetRevocations() []*SigId
	GetRevokeKids() []KID

	GetSigId() SigId
	GetArmoredSig() string

	ToDebugString() string
	Type() string
	ToDisplayString() string
	IsRevocationIsh() bool
	IsRevoked() bool
	IsDelegation() KeyStatus
	GetSeqno() Seqno
	GetCTime() time.Time
	GetPgpFingerprint() *PgpFingerprint
	GetKid() KID
	GetFOKID() FOKID
	IsInCurrentFamily(u *User) bool
	GetUsername() string
	MarkChecked(ProofError)
	GetProofState() int
	GetUID() UID
	GetDelegatedKid() KID
	GetMerkleSeqno() int
	// contains filtered or unexported methods
}

type UI

type UI interface {
	GetIdentifyUI(username string) IdentifyUI
	GetIdentifySelfUI() IdentifyUI
	GetIdentifyTrackUI(username string, strict bool) IdentifyUI
	GetIdentifyLubaUI(username string) IdentifyUI
	GetLoginUI() LoginUI
	GetSecretUI() SecretUI
	GetProveUI() ProveUI
	GetLogUI() LogUI
	Prompt(string, bool, Checker) (string, error)
	Configure() error
	Shutdown() error
}

type UID

type UID [UID_LEN]byte

func GetUid

func GetUid(w *jsonw.Wrapper) (u *UID, err error)

func ImportUID

func ImportUID(u keybase_1.UID) UID

func UidFromHex

func UidFromHex(s string) (u *UID, err error)

func (UID) Eq

func (u UID) Eq(u2 UID) bool

func (*UID) Export

func (u *UID) Export() keybase_1.UID

func (UID) IsZero

func (u UID) IsZero() bool

func (UID) String

func (u UID) String() string

type UidMismatchError

type UidMismatchError struct {
	// contains filtered or unexported fields
}

func (UidMismatchError) Error

func (u UidMismatchError) Error() string

type UnexpectedKeyError

type UnexpectedKeyError struct {
}

func (UnexpectedKeyError) Error

func (e UnexpectedKeyError) Error() string

type UnknownKeyTypeError

type UnknownKeyTypeError struct {
	// contains filtered or unexported fields
}

func (UnknownKeyTypeError) Error

func (e UnknownKeyTypeError) Error() string

type UnmarshalError

type UnmarshalError struct {
	// contains filtered or unexported fields
}

func (UnmarshalError) Error

func (u UnmarshalError) Error() string
type UntrackChainLink struct {
	GenericChainLink
	// contains filtered or unexported fields
}
func ParseUntrackChainLink(b GenericChainLink) (ret *UntrackChainLink, err error)

func (*UntrackChainLink) IsRevocationIsh

func (r *UntrackChainLink) IsRevocationIsh() bool

func (*UntrackChainLink) ToDisplayString

func (b *UntrackChainLink) ToDisplayString() string

func (*UntrackChainLink) Type

func (r *UntrackChainLink) Type() string

type Usage

type Usage struct {
	Config     bool
	GpgKeyring bool
	KbKeyring  bool
	API        bool
	Terminal   bool
	Socket     bool
}

func (Usage) UseKeyring

func (u Usage) UseKeyring() bool

type User

type User struct {
	IdTable *IdentityTable
	// contains filtered or unexported fields
}

func LoadMe

func LoadMe(arg LoadUserArg) (ret *User, err error)

func LoadUser

func LoadUser(arg LoadUserArg) (ret *User, err error)

func LoadUserFromLocalStorage

func LoadUserFromLocalStorage(uid UID, allKeys bool) (u *User, err error)

func LoadUserFromServer

func LoadUserFromServer(arg LoadUserArg, body *jsonw.Wrapper) (u *User, err error)

func NewUser

func NewUser(o *jsonw.Wrapper) (*User, error)

func NewUserFromLocalStorage

func NewUserFromLocalStorage(o *jsonw.Wrapper) (*User, error)

func NewUserFromServer

func NewUserFromServer(o *jsonw.Wrapper) (*User, error)

func NewUserThin

func NewUserThin(name string, uid UID) *User

func (*User) CheckBasicsFreshness

func (local *User) CheckBasicsFreshness(server int64) (current bool, err error)

func (User) Equal

func (u1 User) Equal(u2 User) bool

func (*User) Export

func (u *User) Export() *keybase_1.User

func (User) GetActivePgpFingerprints

func (u User) GetActivePgpFingerprints(sibkey bool) (ret []PgpFingerprint)

GetActivePgpKeys looks into the user's ComputedKeyFamily and returns only the fingerprint of the active PGP keys. If you want only sibkeys, then // specify sibkey=true.

func (User) GetActivePgpKeys

func (u User) GetActivePgpKeys(sibkey bool) (ret []*PgpKeyBundle)

GetActivePgpKeys looks into the user's ComputedKeyFamily and returns only the active PGP keys. If you want only sibkeys, then specify sibkey=true.

func (*User) GetComputedKeyFamily

func (u *User) GetComputedKeyFamily() (ret *ComputedKeyFamily)

func (*User) GetEldestFOKID

func (u *User) GetEldestFOKID() (ret *FOKID)

func (User) GetIdVersion

func (u User) GetIdVersion() (int64, error)

func (*User) GetKeyFamily

func (u *User) GetKeyFamily() *KeyFamily

func (User) GetName

func (u User) GetName() string

func (*User) GetRemoteTrackingStatementFor

func (u *User) GetRemoteTrackingStatementFor(s string, i UID) (link *TrackChainLink, err error)

func (User) GetSeqno

func (u User) GetSeqno() Seqno

func (*User) GetServerSeqno

func (u *User) GetServerSeqno() (i int, err error)

func (*User) GetSyncedSecretKey

func (u *User) GetSyncedSecretKey() (ret *P3SKB, err error)

func (*User) GetTrackingStatementFor

func (u *User) GetTrackingStatementFor(s string, i UID) (link *TrackChainLink, err error)

func (User) GetUid

func (u User) GetUid() UID

func (User) HasActiveKey

func (u User) HasActiveKey() bool

func (*User) Identify

func (u *User) Identify(arg IdentifyArg) (outcome *IdentifyOutcome, ti TrackInstructions, err error)

func (*User) IdentifyKey

func (u *User) IdentifyKey(is IdentifyState) error

func (*User) IdentifySelf

func (u *User) IdentifySelf(ui IdentifyUI) (err error)

func (*User) IdentifySimple

func (u *User) IdentifySimple(me *User, ui IdentifyUI) (*IdentifyOutcome, error)

func (*User) KeyProof

func (u *User) KeyProof(newkey GenericKey, signingkey GenericKey, typ string, ei int) (ret *jsonw.Wrapper, err error)

func (*User) LoadSigChains

func (u *User) LoadSigChains(allKeys bool, f *MerkleUserLeaf) (err error)

func (*User) MakeIdTable

func (u *User) MakeIdTable() (err error)

func (*User) ProofMetadata

func (u *User) ProofMetadata(ei int, signingKey GenericKey, eldest *FOKID) (ret *jsonw.Wrapper, err error)

func (*User) SelfProof

func (u *User) SelfProof(signingKey GenericKey, eldest *FOKID) (ret *jsonw.Wrapper, err error)

func (*User) ServiceProof

func (u *User) ServiceProof(signingKey GenericKey, typ ServiceType, remotename string) (ret *jsonw.Wrapper, err error)

func (*User) Store

func (u *User) Store() error

func (*User) StoreSigChain

func (u *User) StoreSigChain() error

func (*User) StoreTopLevel

func (u *User) StoreTopLevel() error

func (*User) ToKeyStanza

func (u *User) ToKeyStanza(sk GenericKey, eldest *FOKID) (ret *jsonw.Wrapper, err error)

func (User) ToOkProofSet

func (u User) ToOkProofSet() *ProofSet

func (*User) ToTrackingStatement

func (u *User) ToTrackingStatement(w *jsonw.Wrapper) (err error)

func (*User) ToTrackingStatementBasics

func (u *User) ToTrackingStatementBasics(errp *error) *jsonw.Wrapper

func (*User) ToTrackingStatementKey

func (u *User) ToTrackingStatementKey(errp *error) *jsonw.Wrapper

func (*User) ToTrackingStatementSeqTail

func (u *User) ToTrackingStatementSeqTail() *jsonw.Wrapper

func (*User) TrackingProofFor

func (u1 *User) TrackingProofFor(signingKey GenericKey, u2 *User) (ret *jsonw.Wrapper, err error)

func (*User) VerifySelfSig

func (u *User) VerifySelfSig() error

func (*User) VerifySelfSigByKey

func (u *User) VerifySelfSigByKey() (ret bool)

type UserCache

type UserCache struct {
	// contains filtered or unexported fields
}

func NewUserCache

func NewUserCache(c int) (ret *UserCache, err error)

func (*UserCache) CacheServerGetVector

func (c *UserCache) CacheServerGetVector(vec *jsonw.Wrapper) error

func (*UserCache) Get

func (c *UserCache) Get(id UID) *User

func (*UserCache) GetByName

func (c *UserCache) GetByName(s string) *User

func (*UserCache) GetResolution

func (c *UserCache) GetResolution(key string) *ResolveResult

func (*UserCache) Put

func (c *UserCache) Put(u *User)

func (*UserCache) PutResolution

func (c *UserCache) PutResolution(key string, res ResolveResult)

type UserInfo

type UserInfo struct {
	Uid      UID
	Username string
}

type UserNotFoundError

type UserNotFoundError struct {
	// contains filtered or unexported fields
}

func (UserNotFoundError) Error

func (u UserNotFoundError) Error() string

type VerificationError

type VerificationError struct{}

func (VerificationError) Error

func (v VerificationError) Error() string

type VerificationPath

type VerificationPath struct {
	// contains filtered or unexported fields
}

func (*VerificationPath) Verify

func (vp *VerificationPath) Verify() (user *MerkleUserLeaf, err error)

type WaitForItError

type WaitForItError struct{}

func (WaitForItError) Error

func (e WaitForItError) Error() string

type Warning

type Warning interface {
	Warning() string
	Warn()
}

func ErrorToWarning

func ErrorToWarning(e error) Warning

func Warningf

func Warningf(format string, a ...interface{}) Warning

type Warnings

type Warnings struct {
	// contains filtered or unexported fields
}

func ImportWarnings

func ImportWarnings(v []string) Warnings

func (Warnings) IsEmpty

func (w Warnings) IsEmpty() bool

func (*Warnings) Push

func (w *Warnings) Push(e Warning)

func (Warnings) Warn

func (w Warnings) Warn()

func (Warnings) Warnings

func (w Warnings) Warnings() []Warning

type WebChecker

type WebChecker struct {
	// contains filtered or unexported fields
}

func (*WebChecker) CheckHint

func (rc *WebChecker) CheckHint(h SigHint) ProofError

func (*WebChecker) CheckStatus

func (rc *WebChecker) CheckStatus(h SigHint) ProofError
type WebProofChainLink struct {
	GenericChainLink
	// contains filtered or unexported fields
}
func NewWebProofChainLink(b GenericChainLink, p, h string) *WebProofChainLink

func (*WebProofChainLink) CheckDataJson

func (s *WebProofChainLink) CheckDataJson() *jsonw.Wrapper

func (*WebProofChainLink) ComputeTrackDiff

func (s *WebProofChainLink) ComputeTrackDiff(tl *TrackLookup) (res TrackDiff)

func (*WebProofChainLink) DisplayCheck

func (s *WebProofChainLink) DisplayCheck(ui IdentifyUI, lcr LinkCheckResult)

func (*WebProofChainLink) GetHostname

func (w *WebProofChainLink) GetHostname() string

func (*WebProofChainLink) GetIntType

func (g *WebProofChainLink) GetIntType() int

func (*WebProofChainLink) GetProtocol

func (w *WebProofChainLink) GetProtocol() string

func (*WebProofChainLink) GetRemoteUsername

func (w *WebProofChainLink) GetRemoteUsername() string

func (*WebProofChainLink) LastWriterWins

func (w *WebProofChainLink) LastWriterWins() bool

func (*WebProofChainLink) TableKey

func (w *WebProofChainLink) TableKey() string

func (*WebProofChainLink) ToDisplayString

func (w *WebProofChainLink) ToDisplayString() string

func (*WebProofChainLink) ToIdString

func (s *WebProofChainLink) ToIdString() string

func (*WebProofChainLink) ToKeyValuePair

func (s *WebProofChainLink) ToKeyValuePair() (string, string)

func (*WebProofChainLink) ToTrackingStatement

func (s *WebProofChainLink) ToTrackingStatement() (*jsonw.Wrapper, error)

func (*WebProofChainLink) Type

func (w *WebProofChainLink) Type() string

type WebServiceType

type WebServiceType struct{ BaseServiceType }

func (WebServiceType) AllStringKeys

func (t WebServiceType) AllStringKeys() []string

func (WebServiceType) CheckProofText

func (t WebServiceType) CheckProofText(text string, id SigId, sig string) (err error)

func (WebServiceType) CheckUsername

func (t WebServiceType) CheckUsername(s string) error

func (WebServiceType) DisplayName

func (t WebServiceType) DisplayName(un string) string

func (WebServiceType) GetApiArgKey

func (t WebServiceType) GetApiArgKey() string

func (WebServiceType) GetPrompt

func (t WebServiceType) GetPrompt() string

func (WebServiceType) GetProofType

func (t WebServiceType) GetProofType() string

func (WebServiceType) GetTypeName

func (t WebServiceType) GetTypeName() string

func (WebServiceType) LastWriterWins

func (t WebServiceType) LastWriterWins() bool

func (WebServiceType) MarkupFilenames

func (t WebServiceType) MarkupFilenames(un string, mkp *Markup)

func (WebServiceType) NormalizeUsername

func (t WebServiceType) NormalizeUsername(s string) (ret string, err error)

func (WebServiceType) PostInstructions

func (t WebServiceType) PostInstructions(un string) *Markup

func (WebServiceType) PreProofWarning

func (t WebServiceType) PreProofWarning(un string) *Markup

func (WebServiceType) PrimaryStringKeys

func (t WebServiceType) PrimaryStringKeys() []string

func (WebServiceType) RecheckProofPosting

func (t WebServiceType) RecheckProofPosting(tryNumber, status int) (warning *Markup, err error)

func (WebServiceType) ToChecker

func (t WebServiceType) ToChecker() Checker

func (WebServiceType) ToServiceJson

func (t WebServiceType) ToServiceJson(un string) *jsonw.Wrapper

type WebUnreachableError

type WebUnreachableError struct {
	// contains filtered or unexported fields
}

func (WebUnreachableError) Error

func (h WebUnreachableError) Error() string

type Win32

type Win32 struct {
	Base
}

func (Win32) CacheDir

func (w Win32) CacheDir() string

func (Win32) ConfigDir

func (w Win32) ConfigDir() string

func (Win32) DataDir

func (w Win32) DataDir() string

func (Win32) Home

func (w Win32) Home(emptyOk bool) string

func (Win32) Normalize

func (w Win32) Normalize(s string) string

func (Win32) RuntimeDir

func (w Win32) RuntimeDir() (string, error)

func (Win32) Split

func (w Win32) Split(s string) []string

type WrongKeyError

type WrongKeyError struct {
	// contains filtered or unexported fields
}

func (WrongKeyError) Error

func (e WrongKeyError) Error() string

type WrongKidError

type WrongKidError struct {
	// contains filtered or unexported fields
}

func (WrongKidError) Error

func (w WrongKidError) Error() string

type WrongSigError

type WrongSigError struct {
	// contains filtered or unexported fields
}

func (WrongSigError) Error

func (e WrongSigError) Error() string

type XdgPosix

type XdgPosix struct {
	Base
}

func (XdgPosix) CacheDir

func (x XdgPosix) CacheDir() string

func (XdgPosix) ConfigDir

func (x XdgPosix) ConfigDir() string

func (XdgPosix) DataDir

func (x XdgPosix) DataDir() string

func (XdgPosix) Home

func (x XdgPosix) Home(emptyOk bool) string

func (XdgPosix) Normalize

func (x XdgPosix) Normalize(s string) string

func (XdgPosix) RuntimeDir

func (x XdgPosix) RuntimeDir() (ret string, err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL