Blowfish encryption.

Good afternoon, friends!

I came across another interesting work - the development of encryption using the Blowfish method. I haven't even heard of such encryption before, to be honest, so I ask for help from those who have worked with it.
Is there an algorithm in any programming language? It doesn't matter whether it's Delph, C#, js or php, the main thing is to understand the essence, because looking at this picture, it's not quite clear what and how to organize this algorithm.

alt text

Author: Виталина, 2014-12-08

1 answers

If you need to encrypt some data in a purely utilitarian way, it is easier to take a ready-made library and forget about how encryption happens. Otherwise, you risk getting bogged down in a lot of subtleties and eventually getting snake oil aka Snake Oil.

I assure you, this is not easy, cryptography is a whole science in which all the components must be precisely balanced, dosed and verified:

  1. The encryption method itself
  2. The hashing method.
  3. The algorithm key generation.
  4. The salting algorithm.
  5. Selecting the RNG.
  6. The algorithm for chaining blocks.
  7. , etc.

If at least one of these components is unknown to you, then you should either devote a few months of your life to studying cryptography or search for a lib for encryption. If we are talking about PHP, then start from here, if we are talking about C#, I recommend Googling Bouncy Castle.

Update

The above function crypt() - this is not really an encryptor, but a hashing algorithm where Blowfish can be applied. Examples in PHP can be selected for example here or here

 3
Author: Barmaley, 2014-12-09 06:14:13