code: func (whisper *Whisper) NewKeyPair() (string, error) {
  	key, err := crypto.GenerateKey()
  	if err != nil || !validatePrivateKey(key) {
  		key, err = crypto.GenerateKey() // retry once
  	}
  	if err != nil {
  		return "", err
  	}
  	if !validatePrivateKey(key) {
  		return "", fmt.Errorf("failed to generate valid key")
  	}
  
  	id, err := GenerateRandomID()
  	if err != nil {
  		return "", fmt.Errorf("failed to generate ID: %s", err)
  	}
  
  	whisper.keyMu.Lock()
  	defer whisper.keyMu.Unlock()
  
  	if whisper.privateKeys[id] != nil {
  		return "", fmt.Errorf("failed to generate unique ID")
  	}
  	whisper.privateKeys[id] = key
  	return id, nil
  }
docs: // NewKeyPair generates a new cryptographic identity for the client, and injects
  // it into the known identities for message decryption. Returns ID of the new key pair.