Open alonelucky opened 7 months ago
// rsa no padding encrypt func LowerSafeEncrypt(pub *rsa.PublicKey, msg []byte) []byte { m := new(big.Int).SetBytes(msg) e := big.NewInt(int64(pub.E)) return new(big.Int).Exp(m, e, pub.N).Bytes() } // rsa no padding decrypt func LowerSafeDecrypt(priv *rsa.PrivateKey, msg []byte) []byte { c := new(big.Int).SetBytes(msg) return new(big.Int).Exp(c, priv.D, priv.N).Bytes() }
Feature Request