tehseen sagar
tehseen sagar

Reputation: 11

RSA-2048 bit in algorithm

I was reading about RSA algorithm and how it works. I wonder how it calculates the 2048th bit .It is taking two prime numbers p and q, so what will be my numbers that will end with 2048bit encryption?

For Example:

Choose two distinct prime numbers, such as

    p = 61 and q = 53

Compute n = pq giving

    n = 61*53 = 3233

Compute the totient of the product as φ(n) = (p − 1)(q − 1) giving

    phi(3233) = (61 - 1)(53 - 1) = 3120

Choose any number 1 < e < 3120 that is coprime to 3120. Choosing a prime number for e leaves us only to check that e is not a divisor of 3120.

    Let e = 17

Compute d, the modular multiplicative inverse of e (mod φ(n)) yielding,

    d = 2753
    Worked example for the modular multiplicative inverse:
    (d * e) mod phi(n) = 1
    2753 * 17 mod 3120 = 1

The public key is (n = 3233, e = 17). For a padded plaintext message m, the encryption function is:

c(m) = m power 17 mod 3233

The private key is (d = 2753). For an encrypted ciphertext c, the decryption function is:

m(c) = c power 2753 mod 3233

For instance, in order to encrypt m = 65, we calculate:

c = 65 power 17   mod  3233 = 2790 

To decrypt c = 2790, we calculate:

m = 2790 power 2753 mod 3233 = 65 

I would like to calculate it for 2048. Can any one help me out to derive that algorithm for 2048?

Regards.

Upvotes: 0

Views: 2572

Answers (1)

CamW
CamW

Reputation: 3363

2048 refers to the bit length of the key which means that for the public key in a 2048-bit example, the big number, n, would be between 22047 and 22048

The maths involved is the same as in an example with a smaller key

Upvotes: 1

Related Questions