i’ve ported blowfish source code that originally written for PIC16F877 microcontroller. It works twice faster than the original one. It can encrypt and decrypt data just in 2310 cycles which is fast. This cipher was invented by the “Security Guru” Bruce Scheneier. The core of blowfish cipher is made from addition, substitution and XOR processes and organized inside 18 rounds feistel structure. For example if plain text and key all contain zeros, the output of blowfish cipher would be “0x706d9fcc1792d23a”. Check out two screenshots below.
I’ve tested this implementation against several test vector and it works the same as specification. However, this code is released for free under the term of GNU Public License v3.0 and comes with absolutely no guarantee at all. So, take your own risk while using this code. The implementation here is intended for performance oriented application, where throughput is everything🙂 . I’ll keep modifying this code till it reach the fastest one. Keep visiting this blog and happy coding😀 ! .