Package rsa

Package rsa implements RSA encrypt and decrypt operations. The practical key sizes are <= 512 bits i.e. this must not be used in any real life applications.

Constants

const E65537 = 65537

E65537 is the public RSA exponent 2^16+1.

Variables

This section is empty.

Functions

func Decrypt
func Decrypt(cipher, d, n uint) uint

Decrypt decrypts the cipher text with the private key {d, n}.

message = cipher**d mod n
func Encrypt
func Encrypt(msg, e, n uint) uint

Encrypt encrypts the message with the public key {e, n}.

cipher = msg**e mod n

Types

This section is empty.