| 1 |
This is Crypt::Blowfish version 2.11, an XS-based implementation of the |
| 2 |
Blowfish cryptography algorithm designed by Bruce Schneier. It's designed |
| 3 |
to take full advantage of Crypt::CBC when desired. Blowfish keys may be |
| 4 |
up to 448 bits (56 bytes) long. This module builds on nearly every platform |
| 5 |
that Perl itself does (see Notes for exceptions). |
| 6 |
|
| 7 |
Prerequisites |
| 8 |
------------- |
| 9 |
|
| 10 |
For the full test suite to run, Crypt::CBC, version 1.22 or higher |
| 11 |
is required (recommended is 1.25 or higher), however this module |
| 12 |
is not mandatory for standalone Blowfish use. |
| 13 |
|
| 14 |
Installing Crypt::Blowfish |
| 15 |
-------------------------- |
| 16 |
|
| 17 |
nothing unusual: |
| 18 |
|
| 19 |
1. perl Makefile.PL |
| 20 |
2. make |
| 21 |
3. make test |
| 22 |
4. make install |
| 23 |
|
| 24 |
Notes |
| 25 |
----- |
| 26 |
|
| 27 |
This module has been tested successfully against the following: |
| 28 |
Linux 2.0.X (x86) |
| 29 |
Linux 2.2.X (x86, PPC, Alpha, m68k) |
| 30 |
Linux 2.4.X (x86) |
| 31 |
Solaris 2.5.1 and 2.7 (SPARC) |
| 32 |
FreeBSD 3.3 and 3.4 (x86), 4.0 (alpha) |
| 33 |
HP-UX B.10.20 |
| 34 |
DEC OSF 5.0 |
| 35 |
AIX spbuild 3 4 |
| 36 |
Win32 (NT4/SP5, using VC++5.0/VC++6.0) |
| 37 |
OpenVMS (DEC C V6.0-001 / Alpha V7.1-2 with MMK make utility) |
| 38 |
Mac OS X 10.4.X |
| 39 |
|
| 40 |
Perl 5.004_01, 5.004_04, 5.005_03, 5.6.0, 5.6.1, 5.8.* |
| 41 |
|
| 42 |
Please send other successful OS/platform combinations to: |
| 43 |
[email protected] . Thanks. |
| 44 |
|
| 45 |
Patches for MacOS welcomed. |
| 46 |
|
| 47 |
Being an XS implimentation, Crypt::Blowfish is exceptionally faster |
| 48 |
than Blowfish_PP (a pure Perl implimentation). Internal testing |
| 49 |
displayed a difference of 400 times faster when doing complete |
| 50 |
cipher generation and encryption. Using a cached cipher resulted |
| 51 |
in 25 times faster than the pure Perl implimentation. (all machines |
| 52 |
idled prior to tests below) |
| 53 |
|
| 54 |
In the case where this module won't build for you, please try the |
| 55 |
Crypt::Blowfish_PP module - the Pure Perl implimentation. |
| 56 |
|
| 57 |
Thanks to Thomas Kratz for the Win32 fixup and VMS report. |
| 58 |
Thanks to Sandro Bonazzola for prompting code cleanup. |
| 59 |
|
| 60 |
|
| 61 |
Performance |
| 62 |
----------- |
| 63 |
|
| 64 |
Typical results on a P4 3.0GHz Linux machine: |
| 65 |
Under: Perl-v5.10.0: |
| 66 |
Running standard mode speed tests.. encrypting with non-cached cipher |
| 67 |
5,000 cycles: 0 wallclock secs ( 0.36 usr + 0.00 sys = 0.36 CPU) |
| 68 |
|
| 69 |
Running standard mode speed tests.. decrypting with non-cached cipher |
| 70 |
5,000 cycles: 1 wallclock secs ( 0.35 usr + 0.00 sys = 0.35 CPU) |
| 71 |
|
| 72 |
Running standard mode speed tests.. encrypting with cached cipher |
| 73 |
10,000 cycles: 0 wallclock secs ( 0.05 usr + 0.00 sys = 0.05 CPU) |
| 74 |
|
| 75 |
Running standard mode speed tests.. decrypting with cached cipher |
| 76 |
10,000 cycles: 0 wallclock secs ( 0.04 usr + 0.00 sys = 0.04 CPU) |
| 77 |
|
| 78 |
|
| 79 |
Typical results on a PII-400 Linux machine: |
| 80 |
Under Perl-5.005_03: |
| 81 |
Running standard mode speed tests.. encrypting with non-cached cipher |
| 82 |
5,000 cycles: 4 wallclock secs ( 3.92 usr + 0.03 sys = 3.95 CPU) |
| 83 |
|
| 84 |
Running standard mode speed tests.. decrypting with non-cached cipher |
| 85 |
5,000 cycles: 4 wallclock secs ( 3.96 usr + 0.01 sys = 3.97 CPU) |
| 86 |
|
| 87 |
Running standard mode speed tests.. encrypting with cached cipher |
| 88 |
10,000 cycles: 0 wallclock secs ( 0.22 usr + 0.00 sys = 0.22 CPU) |
| 89 |
|
| 90 |
Running standard mode speed tests.. decrypting with cached cipher |
| 91 |
10,000 cycles: 1 wallclock secs ( 0.21 usr + 0.00 sys = 0.21 CPU) |
| 92 |
|
| 93 |
|
| 94 |
Typical results from a 270Mhz UltraSPARC IIi (Ultra5 workstation) |
| 95 |
Under Perl-5.005_03 |
| 96 |
Running standard mode speed tests.. encrypting with non-cached cipher |
| 97 |
5,000 cycles: 5 wallclock secs ( 4.05 usr + 0.11 sys = 4.16 CPU) |
| 98 |
|
| 99 |
Running standard mode speed tests.. decrypting with non-cached cipher |
| 100 |
5,000 cycles: 4 wallclock secs ( 4.06 usr + 0.12 sys = 4.18 CPU) |
| 101 |
|
| 102 |
Running standard mode speed tests.. encrypting with cached cipher |
| 103 |
10,000 cycles: 0 wallclock secs ( 0.60 usr + 0.00 sys = 0.60 CPU) |
| 104 |
|
| 105 |
Running standard mode speed tests.. decrypting with cached cipher |
| 106 |
10,000 cycles: 1 wallclock secs ( 0.63 usr + 0.00 sys = 0.63 CPU) |
| 107 |
|
| 108 |
|
| 109 |
Typical results from a PIII-550 Linux machine: |
| 110 |
Under Perl-5.005_03 |
| 111 |
Running standard mode speed tests.. encrypting with non-cached cipher |
| 112 |
5,000 cycles: 3 wallclock secs ( 2.95 usr + 0.00 sys = 2.95 CPU) |
| 113 |
|
| 114 |
Running standard mode speed tests.. decrypting with non-cached cipher |
| 115 |
5,000 cycles: 3 wallclock secs ( 2.93 usr + 0.00 sys = 2.93 CPU) |
| 116 |
|
| 117 |
Running standard mode speed tests.. encrypting with cached cipher |
| 118 |
10,000 cycles: 0 wallclock secs ( 0.17 usr + 0.00 sys = 0.17 CPU) |
| 119 |
|
| 120 |
Running standard mode speed tests.. decrypting with cached cipher |
| 121 |
10,000 cycles: 0 wallclock secs ( 0.16 usr + 0.00 sys = 0.16 CPU) |
| 122 |
|
| 123 |
|
| 124 |
Typical results from AIX machine: |
| 125 |
Under Perl-5.004_01 |
| 126 |
Running standard mode speed tests.. encrypting with non-cached cipher |
| 127 |
5,000 cycles: 13 secs (11.77 usr 0.08 sys = 11.85 cpu) |
| 128 |
|
| 129 |
Running standard mode speed tests.. decrypting with non-cached cipher |
| 130 |
5,000 cycles: 19 secs (11.98 usr 0.04 sys = 12.02 cpu) |
| 131 |
|
| 132 |
Running standard mode speed tests.. encrypting with cached cipher |
| 133 |
10,000 cycles: 2 secs ( 1.11 usr 0.00 sys = 1.11 cpu) |
| 134 |
|
| 135 |
Running standard mode speed tests.. decrypting with cached cipher |
| 136 |
10,000 cycles: 1 secs ( 1.04 usr 0.00 sys = 1.04 cpu) |
| 137 |
|
| 138 |
|
| 139 |
Typical results for Alpha PCA56 (533Mhz) Linux machine: |
| 140 |
Under Perl-5.005_03 |
| 141 |
Running standard mode speed tests.. encrypting with non-cached cipher |
| 142 |
5,000 cycles: 3 wallclock secs ( 2.68 usr + 0.01 sys = 2.69 CPU) |
| 143 |
|
| 144 |
Running standard mode speed tests.. decrypting with non-cached cipher |
| 145 |
5,000 cycles: 3 wallclock secs ( 2.71 usr + 0.01 sys = 2.73 CPU) |
| 146 |
|
| 147 |
Running standard mode speed tests.. encrypting with cached cipher |
| 148 |
10,000 cycles: 0 wallclock secs ( 0.52 usr + 0.00 sys = 0.52 CPU) |
| 149 |
|
| 150 |
Running standard mode speed tests.. decrypting with cached cipher |
| 151 |
10,000 cycles: 1 wallclock secs ( 0.58 usr + 0.00 sys = 0.58 CPU) |
| 152 |
|
| 153 |
|
| 154 |
Typical results for m68k (33Mhz 68040) Linux machine: |
| 155 |
Under Perl-5.005_03 |
| 156 |
Running standard mode speed tests.. encrypting with non-cached cipher |
| 157 |
5,000 cycles: 104 wallclock secs (97.26 usr + 2.50 sys = 99.76 CPU) |
| 158 |
|
| 159 |
Running standard mode speed tests.. decrypting with non-cached cipher |
| 160 |
5,000 cycles: 102 wallclock secs (97.37 usr + 1.77 sys = 99.14 CPU) |
| 161 |
|
| 162 |
Running standard mode speed tests.. encrypting with cached cipher |
| 163 |
10,000 cycles: 8 wallclock secs ( 7.20 usr + 0.09 sys = 7.29 CPU) |
| 164 |
|
| 165 |
Running standard mode speed tests.. decrypting with cached cipher |
| 166 |
10,000 cycles: 7 wallclock secs ( 7.37 usr + 0.04 sys = 7.41 CPU) |
| 167 |
|
| 168 |
|
| 169 |
Typical results for x86/PPro (dual 200Mhz PPro) Windows machine: |
| 170 |
Under Perl-5.005_02 |
| 171 |
Running standard mode speed tests.. encrypting with non-cached cipher |
| 172 |
5,000 cycles: 8 wallclock secs ( 8.27 usr + 0.00 sys = 8.27 CPU) |
| 173 |
|
| 174 |
Running standard mode speed tests.. decrypting with non-cached cipher |
| 175 |
5,000 cycles: 9 wallclock secs ( 8.25 usr + 0.00 sys = 8.25 CPU) |
| 176 |
|
| 177 |
Running standard mode speed tests.. encrypting with cached cipher |
| 178 |
10,000 cycles: 0 wallclock secs ( 0.69 usr + 0.00 sys = 0.69 CPU) |
| 179 |
|
| 180 |
Running standard mode speed tests.. decrypting with cached cipher |
| 181 |
10,000 cycles: 1 wallclock secs ( 0.69 usr + 0.00 sys = 0.69 CPU) |
| 182 |
|
| 183 |
|
| 184 |
Typical results for G4/1.2Ghz Mac OS X 10.4.X iBook: |
| 185 |
Under Perl-5.8.6 built for darwin-thread-multi-2level |
| 186 |
Running standard mode speed tests.. encrypting with non-cached cipher |
| 187 |
5,000 cycles: 1 wallclock secs ( 0.60 usr + 0.00 sys = 0.60 CPU) |
| 188 |
|
| 189 |
Running standard mode speed tests.. decrypting with non-cached cipher |
| 190 |
5,000 cycles: 0 wallclock secs ( 0.59 usr + 0.01 sys = 0.60 CPU) |
| 191 |
|
| 192 |
Running standard mode speed tests.. encrypting with cached cipher |
| 193 |
10,000 cycles: 0 wallclock secs ( 0.11 usr + 0.00 sys = 0.11 CPU) |
| 194 |
|
| 195 |
Running standard mode speed tests.. decrypting with cached cipher |
| 196 |
10,000 cycles: 1 wallclock secs ( 0.10 usr + 0.00 sys = 0.10 CPU) |
| 197 |
|
| 198 |
|
| 199 |
Dave Paris - W3Works, LLC |
| 200 |
<[email protected]> |