What encryption mode is ECB, CBC, CFB

My php script and my C # application will pass a hash string to each other 32 characters long, why is this the best mode? I thought ECB, but I'm not sure, as it says that if you use more than 1 block, do not use. How to find out how big the block is?

They will sometimes transfer a large text file, which would be the best way to encrypt this ... CBC?

Any useful helpful readings are welcome ...

thanks

+3
source share
3 answers

ECB is the easiest mode and really is not recommended (it is not as safe as other modes).

Personally, I would use CBC.

+1
source

One of the problems of ECB (among many other problems) is that it encrypts deterministically. This is every time you encrypt the same identifier, you get the same encrypted text. Therefore, this mode does not prevent traffic analysis. An attacker may not be able to recognize identifiers that are encrypted. However, it can still determine when and how often the same identifier is sent.

When used correctly, CBC and OFB use a new random IV for each encryption, thereby encrypting the same identifier each time. Since you also make sure that all identifiers are the same length, the result should be encrypted if the attacker cannot distinguish between repeating identifiers from non-repeating ones.

+2
source

In addition to Accipitridae Answer. You will need to provide an IV for the decryption procedure. This will also be an overhead in the case of CBC or OFB.

+1
source

All Articles