File: README

package info (click to toggle)
libcrypt-blowfish-perl 2.14-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, buster, jessie, jessie-kfreebsd, sid, stretch
  • size: 168 kB
  • ctags: 48
  • sloc: ansic: 790; perl: 237; makefile: 2
file content (200 lines) | stat: -rw-r--r-- 7,519 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
This is Crypt::Blowfish version 2.11, an XS-based implementation of the
Blowfish cryptography algorithm designed by Bruce Schneier.  It's designed
to take full advantage of Crypt::CBC when desired.  Blowfish keys may be
up to 448 bits (56 bytes) long.  This module builds on nearly every platform
that Perl itself does (see Notes for exceptions).

Prerequisites
-------------

For the full test suite to run, Crypt::CBC, version 1.22 or higher
is required (recommended is 1.25 or higher), however this module 
is not mandatory for standalone Blowfish use.  

Installing Crypt::Blowfish
--------------------------

nothing unusual:

	1. perl Makefile.PL
	2. make
	3. make test
	4. make install

Notes
-----

This module has been tested successfully against the following:
Linux 2.0.X (x86)
Linux 2.2.X (x86, PPC, Alpha, m68k)
Linux 2.4.X (x86)
Solaris 2.5.1 and 2.7 (SPARC)
FreeBSD 3.3 and 3.4 (x86), 4.0 (alpha)
HP-UX B.10.20
DEC OSF 5.0
AIX spbuild 3 4
Win32 (NT4/SP5, using VC++5.0/VC++6.0)
OpenVMS (DEC C V6.0-001 / Alpha V7.1-2  with MMK make utility)
Mac OS X 10.4.X

Perl 5.004_01, 5.004_04, 5.005_03, 5.6.0, 5.6.1, 5.8.*

Please send other successful OS/platform combinations to:
amused@pobox.com . Thanks.

Patches for MacOS welcomed.

Being an XS implimentation, Crypt::Blowfish is exceptionally faster
than Blowfish_PP (a pure Perl implimentation).  Internal testing 
displayed a difference of 400 times faster when doing complete 
cipher generation and encryption.  Using a cached cipher resulted 
in 25 times faster than the pure Perl implimentation. (all machines 
idled prior to tests below)

In the case where this module won't build for you, please try the
Crypt::Blowfish_PP module - the Pure Perl implimentation.

Thanks to Thomas Kratz for the Win32 fixup and VMS report.
Thanks to Sandro Bonazzola for prompting code cleanup.


Performance
-----------

Typical results on a P4 3.0GHz Linux machine:
Under: Perl-v5.10.0: 
Running standard mode speed tests.. encrypting with non-cached cipher
5,000 cycles:  0 wallclock secs ( 0.36 usr +  0.00 sys =  0.36 CPU)

Running standard mode speed tests.. decrypting with non-cached cipher
5,000 cycles:  1 wallclock secs ( 0.35 usr +  0.00 sys =  0.35 CPU)

Running standard mode speed tests.. encrypting with cached cipher
10,000 cycles:  0 wallclock secs ( 0.05 usr +  0.00 sys =  0.05 CPU)

Running standard mode speed tests.. decrypting with cached cipher
10,000 cycles:  0 wallclock secs ( 0.04 usr +  0.00 sys =  0.04 CPU)


Typical results on a PII-400 Linux machine:
Under  Perl-5.005_03:
Running standard mode speed tests.. encrypting with non-cached cipher
5,000 cycles:  4 wallclock secs ( 3.92 usr +  0.03 sys =  3.95 CPU)

Running standard mode speed tests.. decrypting with non-cached cipher
5,000 cycles:  4 wallclock secs ( 3.96 usr +  0.01 sys =  3.97 CPU)

Running standard mode speed tests.. encrypting with cached cipher
10,000 cycles:  0 wallclock secs ( 0.22 usr +  0.00 sys =  0.22 CPU)

Running standard mode speed tests.. decrypting with cached cipher
10,000 cycles:  1 wallclock secs ( 0.21 usr +  0.00 sys =  0.21 CPU)


Typical results from a 270Mhz UltraSPARC IIi (Ultra5 workstation)
Under  Perl-5.005_03
Running standard mode speed tests.. encrypting with non-cached cipher
5,000 cycles:  5 wallclock secs ( 4.05 usr +  0.11 sys =  4.16 CPU)

Running standard mode speed tests.. decrypting with non-cached cipher
5,000 cycles:  4 wallclock secs ( 4.06 usr +  0.12 sys =  4.18 CPU)

Running standard mode speed tests.. encrypting with cached cipher
10,000 cycles:  0 wallclock secs ( 0.60 usr +  0.00 sys =  0.60 CPU)

Running standard mode speed tests.. decrypting with cached cipher
10,000 cycles:  1 wallclock secs ( 0.63 usr +  0.00 sys =  0.63 CPU)


Typical results from a PIII-550 Linux machine:
Under  Perl-5.005_03
Running standard mode speed tests.. encrypting with non-cached cipher
5,000 cycles:  3 wallclock secs ( 2.95 usr +  0.00 sys =  2.95 CPU)

Running standard mode speed tests.. decrypting with non-cached cipher
5,000 cycles:  3 wallclock secs ( 2.93 usr +  0.00 sys =  2.93 CPU)

Running standard mode speed tests.. encrypting with cached cipher
10,000 cycles:  0 wallclock secs ( 0.17 usr +  0.00 sys =  0.17 CPU)

Running standard mode speed tests.. decrypting with cached cipher
10,000 cycles:  0 wallclock secs ( 0.16 usr +  0.00 sys =  0.16 CPU)


Typical results from AIX machine:
Under  Perl-5.004_01
Running standard mode speed tests.. encrypting with non-cached cipher
5,000 cycles: 13 secs (11.77 usr  0.08 sys = 11.85 cpu)

Running standard mode speed tests.. decrypting with non-cached cipher
5,000 cycles: 19 secs (11.98 usr  0.04 sys = 12.02 cpu)

Running standard mode speed tests.. encrypting with cached cipher
10,000 cycles:  2 secs ( 1.11 usr  0.00 sys =  1.11 cpu)

Running standard mode speed tests.. decrypting with cached cipher
10,000 cycles:  1 secs ( 1.04 usr  0.00 sys =  1.04 cpu)


Typical results for Alpha PCA56 (533Mhz) Linux machine:
Under  Perl-5.005_03
Running standard mode speed tests.. encrypting with non-cached cipher
5,000 cycles:  3 wallclock secs ( 2.68 usr +  0.01 sys =  2.69 CPU)

Running standard mode speed tests.. decrypting with non-cached cipher
5,000 cycles:  3 wallclock secs ( 2.71 usr +  0.01 sys =  2.73 CPU)

Running standard mode speed tests.. encrypting with cached cipher
10,000 cycles:  0 wallclock secs ( 0.52 usr +  0.00 sys =  0.52 CPU)

Running standard mode speed tests.. decrypting with cached cipher
10,000 cycles:  1 wallclock secs ( 0.58 usr +  0.00 sys =  0.58 CPU)


Typical results for m68k (33Mhz 68040) Linux machine:
Under  Perl-5.005_03
Running standard mode speed tests.. encrypting with non-cached cipher
5,000 cycles: 104 wallclock secs (97.26 usr +  2.50 sys = 99.76 CPU)

Running standard mode speed tests.. decrypting with non-cached cipher
5,000 cycles: 102 wallclock secs (97.37 usr +  1.77 sys = 99.14 CPU)

Running standard mode speed tests.. encrypting with cached cipher
10,000 cycles:  8 wallclock secs ( 7.20 usr +  0.09 sys =  7.29 CPU)

Running standard mode speed tests.. decrypting with cached cipher
10,000 cycles:  7 wallclock secs ( 7.37 usr +  0.04 sys =  7.41 CPU)


Typical results for x86/PPro (dual 200Mhz PPro) Windows machine:
Under  Perl-5.005_02
Running standard mode speed tests.. encrypting with non-cached cipher
5,000 cycles: 8 wallclock secs ( 8.27 usr +  0.00 sys =  8.27 CPU)

Running standard mode speed tests.. decrypting with non-cached cipher
5,000 cycles: 9 wallclock secs ( 8.25 usr +  0.00 sys =  8.25 CPU)

Running standard mode speed tests.. encrypting with cached cipher
10,000 cycles:  0 wallclock secs ( 0.69 usr +  0.00 sys =  0.69 CPU)

Running standard mode speed tests.. decrypting with cached cipher
10,000 cycles:  1 wallclock secs ( 0.69 usr +  0.00 sys =  0.69 CPU)


Typical results for G4/1.2Ghz Mac OS X 10.4.X iBook:
Under  Perl-5.8.6 built for darwin-thread-multi-2level
Running standard mode speed tests.. encrypting with non-cached cipher
5,000 cycles:  1 wallclock secs ( 0.60 usr +  0.00 sys =  0.60 CPU)

Running standard mode speed tests.. decrypting with non-cached cipher
5,000 cycles:  0 wallclock secs ( 0.59 usr +  0.01 sys =  0.60 CPU)

Running standard mode speed tests.. encrypting with cached cipher
10,000 cycles:  0 wallclock secs ( 0.11 usr +  0.00 sys =  0.11 CPU)

Running standard mode speed tests.. decrypting with cached cipher
10,000 cycles:  1 wallclock secs ( 0.10 usr +  0.00 sys =  0.10 CPU)


Dave Paris - W3Works, LLC
<amused@pobox.com>