Skip to content

Instantly share code, notes, and snippets.

@Blazing-Mike
Last active October 21, 2021 01:53
Show Gist options
  • Save Blazing-Mike/98fd80084990498c04ee859c066ba78f to your computer and use it in GitHub Desktop.
Save Blazing-Mike/98fd80084990498c04ee859c066ba78f to your computer and use it in GitHub Desktop.
// This is just snippets showing how signature functions works
// Generate private key and public key
generate_keys(){
return (priv_key, pub_key);
}
// sign a message using you private key( still kept secret)
sign(message, priv_key){
return signature; // a signature is returned
}
// verify the message with public key and signature without knowing the private key
verify(message, pub_key, sig){
return true/false;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment