You are on page 1of 1

The Encryption Functions:

Rivest-Shamir-Adleman (RSA)
Cryptosystem

n, and the private key are typically


very large (1000 - 4000 bit). The
algorithm is asymmetric.

1) CIPHER = PLAINPublicKey mod (n)

Based around the difficulty of large prime


factorisation (fundamental theorem of
arithmetic)

2) PLAIN = CIPHERPrivateKey mod (n)

Generation of the public (a) and private


(b) key:
b = inverse of a, mod ((p-1)*(q-1))

n is the product of two secret large


prime numbers: n = p * q.

RSA works because the modular multiplicative


inverse b, of a mod (p-1)*(q-1) acts the
exponential inverse of a modulus of (p*q). Hence,
decryption is possible.

Conditions: to
preserve the entire
message, PLAIN <
n.
a must be coprime
to (p-1)*(q-1)

The generation of the private key must


rely on the knowledge of the distinct
primes p and q, hence using (p-1)*(q-1).

40,000

Statistical Analysis - measuring correlation between plaintext and


cipher text values:

Blue dots: Private Key = 17


Green dots: Private Key = 23

Blue dots: Product Moment Correlation of 0.0005 (very low correlation)


Green dots: PMCC of 0.42 (mid correlation but pattern still cant be
inferred)

CIPHERTEXT VALUES

30,000

Computational efficiency

RSA encryption relies on exponentiation of a large number. Rather


than perform:

20,000

ab = c, then: c mod m;
I used an algorithm which repeated:

a x a mod m, b times so that the equivalent result could be


achieved.

10,000

500

1,000

PLAINTEXT VALUES

1,500

2,000

You might also like