// Decrypt decrypts the passed cipher text.
Decrypt decrypts the passed cipher text.
// Decrypt decrypts the passed cipher text .
func Decrypt(privKey *PrivateKey, cipherText []byte) ([]byte, error) {
	c := new(big.Int).SetBytes(cipherText)
	if privKey.NSquared.Cmp(c) < 1 { 
		return nil, ErrMessageTooLong
	}
	a := new(big.Int).Exp(c, privKey.L, privKey.NSquared)
	l := new(big.Int).Div(
		new(big.Int).Sub(a, one),
		privKey.N,
	)
	m := new(big.Int).Mod(
		new(big.Int).Mul(l, privKey.U),
		privKey.N,
	)
	return m.Bytes(), nil
}
func Decrypt ( privKey * PrivateKey , cipherText [ ] byte ) ( [ ] byte , error ) { c := new ( big . Int ) . SetBytes ( cipherText ) if privKey . NSquared . Cmp ( c ) < 1 { return nil , ErrMessageTooLong } a := new ( big . Int ) . Exp ( c , privKey . L , privKey . NSquared ) l := new ( big . Int ) . Div ( new ( big . Int ) . Sub ( a , one ) , privKey . N , ) m := new ( big . Int ) . Mod ( new ( big . Int ) . Mul ( l , privKey . U ) , privKey . N , ) return m . Bytes ( ) , nil }
Decrypt decrypts the passed cipher text.
Decrypt decrypts the passed cipher text .
// c < n^2 // c^l mod n^2 // L(a) // (a - 1) / n // m = L(c^l mod n^2) * u mod n