The Modulus defines the length

An RSA key length is the length, in bits, of the modulus.

An RSA key that has length “2048”, is generated from a modulus that lies between 22047 and 22048.

What about the difference in lengths for the public key and private key?

The public and private key in RSA are derived from a common modulus. This makes them both the same length.

In Practice, however…

The public and private key contain additional values  (in addition to the modulus).

In order to encode a public or private key into bytes (to store in a file, for instance),  additional bytes are needed.

How many Bytes?

A 2048-bit modulus can theoretically fit over exactly 256 bytes (since 256*8 = 2048) but you need more bytes to encode the other values.

What exactly is encrypted? 

The stream of 1s and 0s  – is what is encrypted. The binary digits are always in an encoded form – so it is an encoded version of the original plaintext that is encrypted (raw level encryption).

Which is stronger – AES at 256 bits or RSA at 2048 bits?

AES is used for private key Cryptography (aka symmetric encryption) whereas RSA is used for public key cryptography (aka asymmetric encryption).

RSA’s public key can be used to verify digital signatures, but not for actually decrypting any data.

Isn’t Quantum Computing strong enough to challenge public key cryptography?

In principle, yes. The only thing keeping public key cryptography secure is the sheer infeasibility of brute force calculations. If a quantum computer could perform those, then we could have brute force decrypting of a public/private key pair. In practice, quantum computers that can do any meaningful computation are decades away.




Need an experienced Data Protection Expert?  Anuj has successfully delivered over a dozen deployments on each of the public clouds (AWS/GCP/Azure) including several DevSecOps engagements. Set up a time with Anuj Varma.

 

Anuj holds professional certifications in Google Cloud, AWS as well as certifications in Docker and App Performance Tools such as New Relic. He specializes in Cloud Security, Data Encryption and Container Technologies.

Initial Consultation

Anuj Varma – who has written posts on Anuj Varma, Hands-On Technology Architect, Clean Air Activist.