Reto Schär > Crypt-Lite > Crypt::Lite

Download:
Crypt-Lite-0.82.11.tar.gz

Dependencies

Annotate this POD (1)

CPAN RT

Open  0
View/Report Bugs
Module Version: 0.82.11   Source  

NAME ^

Crypt::Lite - Easy to use symmetric data encryption and decryption

SYNOPSIS ^

use Crypt::Lite;

$crypt = Crypt::Lite->new( debug => 0 );

[or]

$crypt = Crypt::Lite->new( debug => 0, encoding => 'hex8' );

Encryption

$encrypted = $crypt->encrypt('plain text to encrypt', 'your_secret_string');

Decryption

$decrypted = $crypt->decrypt($encrypted, 'your_secret_string');

Returns an empty string if the encrypted hash has been broken

DESCRIPTION ^

Important Notice

Crypt::Lite does NOT strong encryption - that's what the "Lite" stands for. It's very easy to install and use, anwhere where Perl runs. Please take a closer look on AES or Blowfish for strong encryption.

What's Special

Crypt::Lite returns an empty string if the passphrase does not exactly match. Especially block ciphers often return a partial plain text even if, let's say about 90 % of the passphrase was correct (this will not say it's more secure - it's a property ;-).

Introduction

Sometimes it's necessary to protect some certain data against plain reading or you intend to send information through the Internet. Another reason might be to assure users cannot modify their previously entered data in a follow-up step of a long Web transaction where you don't want to deal with server-side session data. The goal of Crypt::Lite was to have a pretty simple way to encrypt and decrypt data without the need to install and compile huge packages with lots of dependencies.

Crypt::Lite has the property that it typically returns an empty string on a wrong passphrase instead of a partially decrpyted string. It generates every time a different encrypted hash when you re-encrypt the same data with the same secret string. In normal cases of XOR encryption, what Crypt::Lite is based on, double or tripple encryption does NOT increase the security. Because of the nature of Crypt::Lite I state (because of the shifting concept) double encryption *does* increase the challenge to decrypt it. Nevertheless I *don't* recommend it because at least it creates very large strings ;-) What I really suggest is to use good passphrases not shorter than 6 characters, or better 16 characters length to encrypt. A randomly generated passphrase that is used only once of the same length as the plain text will be the most secure encryption with Crypt::Lite.

In general, decryption works also on hashes that have been encrypted on a foreign host (try this with an unpatched IDEA installation ;-).

Since last time has grown a harshly thread about XOR encryption I suggest to take a look from time to time on this URL to get the latest news and documentation on

http://www.infocopter.com/perl/modules/crypt-lite.html

EXPORT

None by default.

SEE ALSO ^

Please find a documentation and related news about this module on

http://www.infocopter.com/perl/modules/

There is currently no mailing list.

AUTHOR ^

Reto Schaer, <retoh@hatespam-cpan.org>

COPYRIGHT AND LICENSE ^

Copyright (C) 2002-2006 by Reto Schaer

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.3 or, at your option, any later version of Perl 5 you may have available.

Feel free to use it for commercial purposes or just for pleasure. You may change the code for your needs if you like. Redistribution and use in source and binary forms, with or without modification, are permitted.

I ask you to leave the link to the related documentation anywhere at the the top of the module in case of redistribution my code.

SEE ALSO

http://www.infocopter.com/perl/licencing.html

syntax highlighting: