Hawkynt

Blowfish

Bruce Schneier’s Blowfish cipher with 64-bit blocks and variable key lengths from 32 to 448 bits. Uses key-dependent S-boxes and 16-round Feistel network.

Properties

Property Value
Category Block Ciphers
Sub-category Block Cipher
Security status πŸŽ“ Educational Only
Complexity Intermediate
Inventor Bruce Schneier
Year 1993
Origin πŸ‡ΊπŸ‡Έ United States
Source algorithms/block/blowfish.js

Parameters

Parameter Supported values
Key sizes 4 bytes (32 bits) to 56 bytes (448 bits)
Block sizes 8 bytes (64 bits)

Security

Status: πŸŽ“ Educational Only

No vulnerabilities are recorded for this implementation.

Documentation

References

Test vectors

8 vectors ship with this algorithm and run in the test suite. Byte values are hexadecimal.

Vector 1 β€” DarkCrypt Blowfish-448 vector 1/zero

Field Value
key 00000000000000000000000000000000 00000000000000000000000000000000 00000000000000000000000000000000 0000000000000000
input 0000000000000000
expected 4ef997456198dd78

Vector 2 β€” DarkCrypt Blowfish-448 vector 2/incr

Field Value
key 000102030405060708090a0b0c0d0e0f 101112131415161718191a1b1c1d1e1f 202122232425262728292a2b2c2d2e2f 3031323334353637
input 0001020304050607
expected 373c66bba50eb9cc

Vector 3 β€” DarkCrypt Blowfish-448 vector 3/incr2

Field Value
key 0102030405060708090a0b0c0d0e0f10 1112131415161718191a1b1c1d1e1f20 2122232425262728292a2b2c2d2e2f30 3132333435363738
input 1011121314151617
expected c8ab0874262536bd

Vector 4 β€” Blowfish Official Test Vector #1 - All Zeros

Field Value
key 0000000000000000
input 0000000000000000
expected 4ef997456198dd78

Vector 5 β€” Blowfish Official Test Vector #2 - All Ones

Field Value
key ffffffffffffffff
input ffffffffffffffff
expected 51866fd5b85ecb8a

Vector 6 β€” Blowfish Official Test Vector #3 - Pattern Data

Field Value
key 0123456789abcdef
input 1111111111111111
expected 61f9c3802281b096

Vector 7 β€” Blowfish ASCII Test Vector

Field Value
key 544553544b455921
input 424c4f5746495348
expected 2532fa57d3acf5c5

Vector 8 β€” Blowfish Single Bit Test

Field Value
key 8000000000000000
input 8000000000000000
expected 6e6456626849cf27

← All algorithms