Last active
October 21, 2021 01:53
-
-
Save Blazing-Mike/98fd80084990498c04ee859c066ba78f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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