Created
October 29, 2016 23:18
-
-
Save greenboxal/93b03f6f3188dedcc4bea0649982ba57 to your computer and use it in GitHub Desktop.
This file contains 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
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