Main Overview

# Class `Rsa`

Class `Rsa`: RSA Encryption
This is a static class (only static methods available).

Overview:

## Class methods (static methods)

Method | Meaning
createKeys (bits=768) | returns an RSA key pair
encrypt (m, key) | RSA encryption

# Class methods (static methods)

### createKeys

createKeys(bits=768)

Usage: `Rsa.createKeys(bits=768)`

Description:
returns an RSA key pair
The pair is returned as tuple `((e,n),(d,n))`.
Example:
`public, private = Rsa.createKeys(24)
m = 12345 # message
c = Rsa.encrypt(m, public) # encrypted message
assert Rsa.encrypt(c, private) == m`
See also `Rsa.encrypt`.

### encrypt

encrypt(m, key)

Usage: `Rsa.encrypt(m, key)`

Description:
RSA encryption
encrypts m using the mit dem key `key = (e,n)`
See also `Rsa.createKeys`.