home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2004 December / PCpro_2004_12.ISO / files / webserver / tsw / TSW_3.4.0.exe / Apache2 / perl / IDEA.pod < prev    next >
Encoding:
Text File  |  1999-06-07  |  1.7 KB  |  86 lines

  1. =head1 NAME
  2.  
  3. IDEA - Perl interface to IDEA block cipher
  4.  
  5. =head1 SYNOPSIS
  6.  
  7.     use Crypt::IDEA;
  8.     
  9.  
  10. =head1 DESCRIPTION
  11.  
  12. This perl extension is an implementation of the IDEA block cipher algorithm.
  13. The module implements the Crypt::BlockCipher interface,
  14. which has the following methods
  15.  
  16. =over 4
  17.  
  18. =item blocksize
  19. =item keysize
  20. =item encrypt
  21. =item decrypt
  22.  
  23. =back
  24.  
  25. =head1 FUNCTIONS
  26.  
  27. =over 4
  28.  
  29. =item blocksize
  30.  
  31. Returns the size (in bytes) of the block cipher.
  32.  
  33. =item keysize
  34.  
  35. Returns the size (in bytes) of the key.
  36.  
  37. =item new
  38.  
  39.     my $cipher = new IDEA $key;
  40.  
  41. This creates a new IDEA BlockCipher object, using $key,
  42. where $key is a key of C<keysize()> bytes.
  43.  
  44. =item encrypt
  45.  
  46.     my $cipher = new IDEA $key;
  47.     my $ciphertext = $cipher->encrypt($plaintext);
  48.  
  49. This function encrypts $plaintext and returns the $ciphertext
  50. where $plaintext and $ciphertext should be of C<blocksize()> bytes.
  51.  
  52. =item decrypt
  53.  
  54.     my $cipher = new IDEA $key;
  55.     my $plaintext = $cipher->decrypt($ciphertext);
  56.  
  57. This function decrypts $ciphertext and returns the $plaintext
  58. where $plaintext and $ciphertext should be of C<blocksize()> bytes.
  59.  
  60. =back
  61.  
  62. =head1 EXAMPLE
  63.  
  64.     my $key = pack("H32", "0123456789ABCDEF0123456789ABCDEF");
  65.     my $cipher = new IDEA $key;
  66.     my $ciphertext = $cipher->encrypt("plaintex");    # NB - 8 bytes
  67.     print unpack("H16", $ciphertext), "\n";
  68.  
  69. =head1 SEE ALSO
  70.  
  71. Crypt::DES
  72.  
  73. Bruce Schneier, I<Applied Cryptography>, 1995, Second Edition,
  74. published by John Wiley & Sons, Inc.
  75.  
  76.  
  77. =head1 COPYRIGHT
  78.  
  79. This implementation is copyright Systemics Ltd ( http://www.systemics.com/ ).
  80.  
  81. The IDEA algorithm is patented in Europe and the United States
  82. by Ascom-Tech AG.
  83.  
  84. Module altered on 22 May 1999 to allow functionality with perl -MCPAN,
  85. Changes by Dave Paris  (edited lib paths).
  86.