1Net::SSH::Perl::Cipher:U:sBelrowCfoinsthr(i3b)uted PerlNDeotc:u:mSeSnHt:a:tPieornl::Cipher::Blowfish(3)
2
3
4

NAME

6       Net::SSH::Perl::Cipher::Blowfish - Wrapper for SSH Blowfish support
7

SYNOPSIS

9           use Net::SSH::Perl::Cipher;
10           my $cipher = Net::SSH::Perl::Cipher->new('Blowfish', $key);
11           print $cipher->encrypt($plaintext);
12

DESCRIPTION

14       Net::SSH::Perl::Cipher::Blowfish provides Blowfish encryption support
15       for Net::SSH::Perl. To do so it wraps around either Crypt::Blowfish or
16       Crypt::Blowfish_PP; the former is a C/XS implementation of the blowfish
17       algorithm, and the latter is a Perl implementation.
18       Net::SSH::Perl::Cipher::Blowfish prefers to use Crypt::Blowfish,
19       because it's faster, so we try to load that first. If it fails, we fall
20       back to Crypt::Blowfish_PP.  Note that, when using Crypt::Blowfish_PP,
21       you'll experience a very noticeable decrease in performance.
22
23       The blowfish used here is in CBC filter mode with a key length of 32
24       bytes.
25
26       SSH1 adds an extra wrinkle with respect to its blowfish algorithm:
27       before and after encryption/decryption, we have to swap the bytes in
28       the string to be encrypted/decrypted. The byte-swapping is done four
29       bytes at a time, and within each of those four-byte blocks we reverse
30       the bytes. So, for example, the string "foobarba" turns into
31       "boofabra". We swap the bytes in this manner in the string before we
32       encrypt/decrypt it, and swap the encrypted/decrypted string again when
33       we get it back.
34
35       This byte-swapping is not done when Blowfish is used in the SSH2 proto‐
36       col.
37

AUTHOR & COPYRIGHTS

39       Please see the Net::SSH::Perl manpage for author, copyright, and
40       license information.
41
42
43
44perl v5.8.8                       2003-12-03Net::SSH::Perl::Cipher::Blowfish(3)
Impressum