Take the 2-minute tour ×
Information Security Stack Exchange is a question and answer site for Information security professionals. It's 100% free, no registration required.

I am confused by this variety, perhaps outlined here. I am trying to understand the conventions.

Trend A: strength?

$2^8$, $2^7$ -- seems clear but why algo with 192 or 40? Referring to same issue? And it is?

Trend B: background?

aes? desx, des but with x? Is there some mother-algo? Major names: aes, des and rc, why?

Trend C: endings

.*cbf, .*ofb, .*cbc -- what do the common endings mean?

Trend D: odd single numbers

What do the number-endings such as 1 or 8 mean?

Trend E: odd bloat

Why bloat with bf and blowfish? Historical heritage?

$ openssl enc --help
-aes-128-cbc               -aes-128-cfb               -aes-128-cfb1
-aes-128-cfb8              -aes-128-ecb               -aes-128-ofb
-aes-192-cbc               -aes-192-cfb               -aes-192-cfb1
-aes-192-cfb8              -aes-192-ecb               -aes-192-ofb
-aes-256-cbc               -aes-256-cfb               -aes-256-cfb1
-aes-256-cfb8              -aes-256-ecb               -aes-256-ofb
-aes128                    -aes192                    -aes256
-bf                        -bf-cbc                    -bf-cfb
-bf-ecb                    -bf-ofb                    -blowfish
-cast                      -cast-cbc                  -cast5-cbc
-cast5-cfb                 -cast5-ecb                 -cast5-ofb
-des                       -des-cbc                   -des-cfb
-des-cfb1                  -des-cfb8                  -des-ecb
-des-ede                   -des-ede-cbc               -des-ede-cfb
-des-ede-ofb               -des-ede3                  -des-ede3-cbc
-des-ede3-cfb              -des-ede3-cfb1             -des-ede3-cfb8
-des-ede3-ofb              -des-ofb                   -des3
-desx                      -desx-cbc                  -rc2
-rc2-40-cbc                -rc2-64-cbc                -rc2-cbc
-rc2-cfb                   -rc2-ecb                   -rc2-ofb
-rc4                       -rc4-40
share|improve this question
add comment

2 Answers

There's a list of what these mean in the OpenSSL documentation.

They seem to be shown as algorithm name-key size-encryption mode. When the key size is omitted, it seems to mean that there's only one valid key size for that algorithm, so there's no point in including it.

If you're actually trying to pick an algorithm, you probably want AES (the standard) with OpenSSL's default of CBC mode (more secure than ECB).

Algorithm Names

Some of the names have numbers in them to distinguish versions. For example, RC2 and RC4 were both made by Ron Rivest, and RC4 is newer. You see similar things in hash algorithms, where MD4 was replaced by MD5 (and MD6 is in progress).

They seem to prefer "bf" for blowfish, so I'd guess that -blowfish is probably for convenience or backwards compatibility.

DESX is apparently an algorithm based on DES but with a much larger key size.

Key Sizes

The key sizes are in bits, and generally a longer key is stronger, but encrypting with it will be slower. So, AES with a 128 bit key is faster but less secure than AES with a 256 bit key.

Most algorithms seem to use powers of two for key sizes, but nothing requires them to be. DES for example uses a 56 bit key.

Encryption Mode

The encryption mode is something I don't understand well enough to explain. You just should take a look at the Wikipedia article.

The 1 or 8 at the end of some of the encryption modes specifies the number of bits used in cipher feedback.

share|improve this answer
add comment

RE 192, 40: 192 is 128 + 64, so I guess it's a tradeoff between size and power-of-two-ness. 40 is probably historical/backwards compatible: until some time in the 90's (I believe; I could be wrong on the year) the US had a law that software implementing encryption with a key over 40 bits was illegal to export.

AES is "Advanced Encryption Standard", DES is "Data Encryption Standard", wikipedia says "RC" comes from "Ron's Code" (as in Ron Rivest, the inventor, of RSA fame)

The endings are modes of operation, for block ciphers. Essentially, the data is broken into blocks. CBC is "cipher block chaining", OFB is "output feedback", CFB is "cipher feedback". You can read more here: http://en.wikipedia.org/wiki/Block_cipher_modes_of_operation

I'm not sure what the difference is between (for example) -aes-128-cfb and -aes-128-cfb1: maybe a minor variation, and they want to support both?

Last point: I imagine the wide variety of algorithms is mostly for compatibility. Different algorithms are better for different scenarios, which is why so many are in use, and they want to be compatible with as many as possible, I would guess.

Hope this helps!

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.