code: func (k *Kontrol) KeyPair() (pair *KeyPair, err error) {
  	if k.selfKeyPair != nil {
  		return k.selfKeyPair, nil
  	}
  
  	kiteKey := k.Kite.KiteKey()
  
  	if kiteKey == "" || len(k.lastPublic) == 0 {
  		return nil, errNoSelfKeyPair
  	}
  
  	keyIndex := -1
  
  	me := new(multiError)
  
  	for i := range k.lastPublic {
  		ri := len(k.lastPublic) - i - 1
  
  		keyFn := func(token *jwt.Token) (interface{}, error) {
  			if _, ok := token.Method.(*jwt.SigningMethodRSA); !ok {
  				return nil, errors.New("invalid signing method")
  			}
  
  			return jwt.ParseRSAPublicKeyFromPEM([]byte(k.lastPublic[ri]))
  		}
  
  		if _, err := jwt.ParseWithClaims(kiteKey, &kitekey.KiteClaims{}, keyFn); err != nil {
  			me.err = append(me.err, err)
  			continue
  		}
  
  		keyIndex = ri
  		break
  	}
  
  	if keyIndex == -1 {
  		return nil, fmt.Errorf("no matching self key pair found: %s", me)
  	}
  
  	k.selfKeyPair = &KeyPair{
  		ID:      k.lastIDs[keyIndex],
  		Public:  k.lastPublic[keyIndex],
  		Private: k.lastPrivate[keyIndex],
  	}
  
  	return k.selfKeyPair, nil
  }
docs: // KeyPair looks up a key pair that was used to sign Kontrol's kite key.
  //
  // The value is cached on first call of the function.