Skip to content

Instantly share code, notes, and snippets.

@greenboxal
Created October 29, 2016 23:18
Show Gist options
  • Save greenboxal/93b03f6f3188dedcc4bea0649982ba57 to your computer and use it in GitHub Desktop.
Save greenboxal/93b03f6f3188dedcc4bea0649982ba57 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