Skip to content

Instantly share code, notes, and snippets.

@greenboxal
Created October 29, 2016 23:18
Show Gist options
  • Save greenboxal/7fd4bb6ec0ef1010c270461265b77bbc to your computer and use it in GitHub Desktop.
Save greenboxal/7fd4bb6ec0ef1010c270461265b77bbc to your computer and use it in GitHub Desktop.
func rsaPublicDecrypt(modulus, remainder *big.Int, data []byte) []byte {
num := big.NewInt(0)
num.SetBytes(data)
result := big.NewInt(0)
result.Exp(num, modulus, remainder)
return result.Bytes()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment