Crypt::SEAL2

The SEAL stream cipher, version 2.0
Download

Crypt::SEAL2 Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Julius C. Duque
  • Publisher web site:
  • http://search.cpan.org/~jcduque/Crypt-Rainbow-1.0.0/Rainbow.pm

Crypt::SEAL2 Tags


Crypt::SEAL2 Description

The SEAL stream cipher, version 2.0 Crypt::SEAL2 is a Perl module with the SEAL stream cipher.SYNOPSIS use Crypt::SEAL2; $cipher = new Crypt::SEAL2 $key; $ciphertext = $cipher->encrypt($plaintext); $cipher->reset(); $ks = $cipher->keysize(); $plaintext = $cipher->decrypt($ciphertext); $cipher->repos($position);SEAL2 is the second version of the stream cipher, SEAL, designed by Don Coppersmith and Phillip Rogaway.This module supports the following functions:new() Creates a pseudorandom string (PRS), using a user-supplied key as a seed to the pseudorandom generator of SEAL2. A PRS pointer initially points at the beginning of the PRS.encrypt($data) Encrypts the data stream $data by XOR-ing it with the PRS, starting at the position being pointed to by the PRS pointer, and returns the resulting ciphertext. The PRS pointer is advanced 1 byte position for every byte of $data that is encrypted.decrypt($data) Decrypts the data stream $data by XOR-ing it with the PRS, starting at the position being pointed to by the PRS pointer, and returns the resulting plaintext. The PRS pointer is advanced 1 byte position for every byte of $data that is decrypted. decrypt($data) is exactly the same as encrypt($data).reset() Every time a call to either encrypt() or decrypt() is performed, the PRS pointer is advanced. Therefore, it is necessary to reset() the pointer in order to encrypt/decrypt the data stream correctly. Alternatively, you may use repos() to manually re-position the PRS pointer to where the encryption/decryption will start (see next function).repos($position) Re-positions the PRS pointer at byte position $positionkeysize() Returns the size (in bytes) of the key used (20, in this case) Requirements: · Perl


Crypt::SEAL2 Related Software