0

Is Triple DES similiar to RSA in that the message size you can encrypt is limited (unlike AES)?

Yes you can break the message size into parts and apply it, but I'm not interested in doing that so I want to know if Triple DES has this same "limitation" like RSA?

I know AES is better suited for my situation where the message size can be large, but I'm not the only one making the decision on the algorithm.

Nike Dattani
  • 201
  • 3
  • 15
user1361315
  • 165
  • 1
  • 5

3 Answers3

2

Triple DES and AES are the very same type of scheme: - symmetric block cypher, which also implies fixed size; block sizes are 64 bit for DES, 128 for AES.

RSA is asymmetric, and the key length determines the size of plain- and ciphertext. Therefore, with a fixed key length you also have an (almost; length may vary by 1 dependant on choice of primes) fixed size.

Your main error is, that you attribute the mode of operation to AES, which is false. In general, mode of operation describe how to use a block cipher of fixed length to encrypt large amounts of data or a stream of data (e.g. secure channels, etc.). Although they are defined on symmetric ciphers, you could also use them for asymmetric encryption(RSA, etc.), but it is not practical to do (see hybrid encryption)

Edit: Thanks @ poncho for pointing out, that AES has a fixed block size of 128 bit (and keys with 128, 192 or 256 bit), and the original Rijndael cipher supported all three sizes for keys and blocks.

tylo
  • 12,864
  • 26
  • 40
0

TL;DR: No, they're not. Regardless of how you interpret the question (more on that below), the message size for 3DES (and other symmetric block ciphers) is not related to the key size in any way.


Now, there's a couple of different ways to interpret the question. First of all, what do we mean by "the message size of a block cipher"? If we mean the longest message that can be encrypted directly by a single evaluation of the block cipher, then that would be the block size of the cipher. This can be equal to the key size, but it doesn't have to be. For example:

  • (Single) DES has a 64 bit block size and an (effectively) 56 bit key.

  • Two-key Triple DES still has the same 64 bit block size as single DES, but the key length is doubled to 112 bits.

  • Three-key Triple DES has a key size of 3 × 56 = 168 bits, but still a 64 bit block size. (However it's rarely used since, despite the nominally higher key size, it's not significantly more secure than two-key 3DES.)

  • AES has a 128 bit block size, but its key size is either 128, 192 or 256 bits depending on which of the three standard AES variants you're using.

  • Rijndael (the original version of the cipher that was standardized as AES) is more flexible, allowing both the block size and the key size to be chosen independently of each other as any multiple of 32 bits between 128 and 256. (Whether this flexibility is good or bad is debatable. Certainly the non-standardized block and key sizes have been analyzed far less thoroughly than the AES ones.)


However, almost nobody ever uses a block cipher like (triple) DES or AES by itself. Rather, block ciphers are normally used with some mode of operation that turns the block cipher into a more general encryption scheme capable of encrypting messages of variable length.

Most modes of operation do have a message length limit beyond which their security proofs (which typically prove that breaking the claimed security properties of the mode of operation is as hard as breaking the underlying block cipher) no longer hold. However, this limit (which may vary depending on the block size of the cipher and other parameters of the mode) is typically on the order of $2^{32}$ (i.e. about 4 billion) cipher blocks or more. So unless your messages can be more than several gigabytes long, you can basically ignore these limits.

Can similar modes of operation be defined for RSA? Theoretically, yes. In practice, however, there are no standards for this, because it would be a silly thing to do. RSA encryption is slow and (with the padding needed to make it actually secure) produces ciphertext than is many times longer than the original plaintext message. Thus, even if you could use RSA with some mode of operation to encrypt long messages, it would be really inefficient.

The standard way to "encrypt long messages with RSA" is instead to use hybrid encryption: first pick a random key for a symmetric block cipher like AES (or 3DES), encrypt the message with the random key using some suitable mode of operation, and then encrypt the random key with RSA.

Ilmari Karonen
  • 46,700
  • 5
  • 112
  • 189
-2

Is triple des similiar to rsa in that the message size you can encrypt is limited (unlike AES)?

If you mean they both are block ciphers, then yes.

Smit Johnth
  • 1,731
  • 4
  • 18
  • 27