Jump to content
Tuts 4 You

D1N's Blog

Sign in to follow this  
  • entries
  • comments
  • views

DobReXor RSA / AES / Implementation

Sign in to follow this  


Just a few updates on DobReXor, I've managed to finish one of the most important classes which executes the following instructions. I will explain more in detail next week when time permits. I have attached the encrypted, decrypted, files along with the public and private keys for anyone who wants to analyse them. Please send all questions here or feel free to comment on my blog.


Target - notes.txt


AES/RSA/Encryption/Decryption usage


Result - notes.enc


RSA Algorithm

Key Generation:

1. Generate two large random primes, p and q, of approximately equal size such that their product n = pq is of the required bit length, e.g. 1024 bits. [see note 1].

2. Compute n = pq and (φ) phi = (p-1)(q-1).

3. Choose an integer e, 1 < e < phi, such that gcd(e, phi) = 1. [see note 2].

4. Compute the secret exponent d, 1 < d < phi, such that ed ≡ 1 (mod phi). [see note 3].

5. The public key is (n, e) and the private key is (n, d). Keep all the values d, p, q and phi secret.

* n is known as the modulus.

* e is known as the public exponent or encryption exponent or just the exponent.

* d is known as the secret exponent or decryption exponent.

File Encryption

Sender A does the following:-

1. Obtains the recipient B's public key (n, e).

2. Represents the plaintext message as a positive integer m [see note 4].

3. Computes the ciphertext c = me mod n.

4. Sends the ciphertext c to B.

File Decryption

Recipient B does the following:-

1. Uses his private key (n, d) to compute m = cd mod n.

2. Extracts the plain-text from the message representative m.

Sign in to follow this  


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...