Linked Questions

35 votes
5 answers
86k views

Why is padding used for RSA encryption given that it is not a block cipher?

In AES we use some padded bytes at end of message to fit 128/256 byte blocks. But as RSA is not a block cipher why is padding used? Can the message size be any byte length (is the encrypting agent ...
mario's user avatar
  • 369
4 votes
4 answers
3k views

Does larger key size mean larger data size in asymmetric encryption?

I'm new to cryptography. I know the larger the key size (like 128-bit vs 1024-bit) the harder the ciphertext is to crack, generally. But assuming everything else being equal, does a larger key size ...
worisi24's user avatar
3 votes
1 answer
2k views

Max message length when encrypting with public key

The question is what is an appropriate public/private key length in order to encrypt a 256-bit or 512-bit AES key without wasting bytes, and whether long public/private keys provide meaningful ...
Per's user avatar
  • 185
3 votes
1 answer
2k views

Can you use RSA in “CBC mode”?

Are there any security concerns with using RSA in “CBC mode”? Specifically: if I use RSA encryption as my block cipher operation, and apply the standard CBC mode operations including a random IV, will ...
Crypto Questions's user avatar
3 votes
2 answers
2k views

RSA: The algorithm aside, how are we turning a string into an int and vice versa?

Let's say that I want to encrypt the file plain.txt. The very first step is actually to turn the contents of that file (lets say it only contains the string "...
No Name's user avatar
  • 161
2 votes
1 answer
3k views

Length of message in RSA and splitting of long messages

If I understand correctly in (unpadded) RSA the length of message M must be shorter than modulus n. Encryption gives ciphertext that is also shorter than n. Let's say I want to send a message of 2....
croraf's user avatar
  • 289
1 vote
1 answer
2k views

RSA Signing: SHA512 incompatible with PSS?

I am wrapping the RSACng class from the .Net API. Whilst unit testing, I run checks against an array of possibilities: Key Size = 1024, 2048, or 3072 bits Padding ...
Ama's user avatar
  • 113
2 votes
2 answers
1k views

What is the size of a 1024-bit RSA cipher compared to its plaintext?

Let's assume we encrypt a 50000 bit plaintext with 1024-bit RSA and public exponent $e$ = 3: How big will its cipher be? When we increase the exponent to let's say $e$ = 216 + 1 = 65537, how big will ...
Marcus's user avatar
  • 159
2 votes
1 answer
1k views

RSA encryption secure mode, plaintext length limit vs. key length

I have two questions about RSA encryption to confirm: Assume use RSA 2048-bit key pair, what is the secure encryption mode? Are ECB / OAEPWithSHA-256AndMGF1Padding and ECB / OAEPWithSHA-...
TJCLK's user avatar
  • 497
1 vote
1 answer
702 views

RSA2048 smallest possible modulus

what is the smallest possible modulus for RSA2048? I generate a random data with I want to encrypt by a textbook RSA2048 and I'm not sure where the first 1-bit should be. According to OpenSSL source ...
smrt28's user avatar
  • 600
1 vote
2 answers
535 views

Why can't ransomware practically use RSA to encrypt all files?

I understand that a few ransomware have used an RSA public key to encrypt all files belonging to the victim. This is a bullet-proof system in terms of its security because the private key is always ...
learnerX's user avatar
  • 687
1 vote
1 answer
578 views

Subtle Crypto Algorithm Choice

I need to encrypt some text in the browser to be stored server side. After a little research I decided to use the SubtleCrypto API. I created the the crypto key using the following code: ...
Bahadır Yağan's user avatar
1 vote
1 answer
294 views

RSA Encryption Time with Different Block Sizes

I was working on encrypting a few files on my computer and I was using OAEP for padding with RSA. I noticed that it was taking a long time to encrypt some of my files with a small block size, so I ...
Cody 's user avatar
  • 11
-2 votes
1 answer
119 views

possibility to encrypt data using AES and RSA frequently? [closed]

I am doing a research for encrypting data, I found many research doing multiple encryption using DES and RSA ? but in symmetric cryptography the best algorithm is AES so I need to do multiple ...
Moussa Adamou Djamilou's user avatar
0 votes
0 answers
32 views

Does public key encryption support a large message size? [duplicate]

I'm somewhat new to encryption. I see that the actual RSA sizes are 1024 and 2048? Can those key sizes support data blocks of 128 MB?
user65494's user avatar