1Blowfish_PP(3) User Contributed Perl Documentation Blowfish_PP(3)
2
3
4
6 Crypt::Blowfish_PP - Blowfish encryption algorithm implemented purely
7 in Perl
8
10 "use Crypt::Blowfish_PP";
11
12 $blowfish=new Crypt::Blowfish_PP($key);
13
14 $ciphertextBlock=$blowfish->encrypt($plaintextBlock);
15
16 $plaintextBlock=$blowfish->decrypt($ciphertextBlock);
17
19 The Crypt::Blowfish_PP module provides for users to use the Blowfish
20 encryption algorithm in perl. The implementation is entirely Object
21 Oriented, as there is quite a lot of context inherent in making
22 blowfish as fast as it is. The key is anywhere between 64 and 448 bits
23 (8 and 56 bytes), and should be passed as a packed string. The
24 transformation itself is a 16-round Feistel Network, and operates on a
25 64 bit block.
26
27 Object methods for the Crypt::Blowfish_PP module:
28
29 new(key)
30 The new() method initialises a blowfish object with the key that is
31 passed. This is the slow part of doing a blowfish encryption or
32 decryption, as it initialises the 18 p-boxes and the 1024 s-boxes that
33 are used for the algorithm. It will return undef if the key is not of
34 a valid length.
35
36 encrypt(block)
37 The encrypt() method uses the initialised blowfish object to encrypt 8
38 bytes of data of the string passed to it. It returns the encrypted
39 block.
40
41 decrypt(block)
42 The decrypt() method uses the initialised blowfish object to decrypt 8
43 bytes of data of the string passed to it. It returns the decrypted
44 block.
45
47 This is probably crap software, but hey, its for general use. I'm happy
48 to patch it with other people's code... :)
49
50 If you want speed, then see the Crypt::Blowfish module.
51
53 Matthew Byng-Maddick <"mbm@colondot.net">
54
56 http://www.counterpane.com/,Crypt::CBC
57
58
59
60perl v5.36.0 2023-01-20 Blowfish_PP(3)