func (server *OpencxServer) RegistrationStringVerify(sig []byte) (pubkey *koblitz.PublicKey, err error) {
	// e = h(registrationstring)
	sha3 := sha3.New256()
	sha3.Write([]byte(server.GetRegistrationString()))
	e := sha3.Sum(nil)

	if pubkey, _, err = koblitz.RecoverCompact(koblitz.S256(), sig, e); err != nil {
		err = fmt.Errorf("Error verifying registration string, invalid signature: \n%s", err)
		return
	}

	return
}
// RegistrationStringVerify verifies a signature for a registration string and returns a pubkey
RegistrationStringVerify verifies a signature for a registration string and returns a pubkey
// RegistrationStringVerify verifies a signature for a registration string and returns a pubkey
func (server *OpencxServer) RegistrationStringVerify(sig []byte) (pubkey *koblitz.PublicKey, err error) {
	sha3 := sha3.New256()
	sha3.Write([]byte(server.GetRegistrationString()))
	e := sha3.Sum(nil)
	if pubkey, _, err = koblitz.RecoverCompact(koblitz.S256(), sig, e); err != nil {
		err = fmt.Errorf("Error verifying registration string, invalid signature: \n%s", err)
		return
	}
	return
}
func ( server * OpencxServer ) RegistrationStringVerify ( sig [ ] byte ) ( pubkey * koblitz . PublicKey , err error ) { sha3 := sha3 . New256 ( ) sha3 . Write ( [ ] byte ( server . GetRegistrationString ( ) ) ) e := sha3 . Sum ( nil ) if pubkey , _ , err = koblitz . RecoverCompact ( koblitz . S256 ( ) , sig , e ) ; err != nil { err = fmt . Errorf ( " \n " , err ) return } return }
RegistrationStringVerify verifies a signature for a registration string and returns a pubkey
RegistrationStringVerify verifies a signature for a registration string and returns a pubkey
// e = h(registrationstring)