The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Crypt::Unsnoopable - Completely unsnoopable messaging

VERSION

 $Revision: 1.008 $
 $Date: Sun Dec 10 01:36:27 PST 2017 $

SYNOPSIS

    use Crypt::Unsnoopable;

    my $a = new Crypt::Unsnoopable( DB => $dir1 );   # Alice
    my $b = new Crypt::Unsnoopable( DB => $dir2 );   # Bob

    my $pad = $a->otpgen(1024, "Bob");   # Alice generates new 1024 byte OTP

    $b->add($pad, 'Alice');              # Bob adds it to his set of OTPs

    my $encrypted = $a->encrypt('Bob', 'Setec Astronomy');

    my ($decrypted) = $b->decrypt($encrypted);

CONSTRUCTOR

new

new

Creates and returns a new Crypt::Unsnoopabe object. The following optional named parameter can be provided:

    DB - The directory to store one-time pads in. Defaults to '/tmp/.unsnoopable' if not provided.

METHODS

otpgen

Generate and saves a one-time pad. Returns an OTP object. Two arguments are required: the size of the OTP (in bytes) and its name, in that order.

add

Adds a one-time pad to the pads DB. Returns an OTP object, or undef on error. Two arguments are required: the pad, and its name, in that order.

encrypt

Encrypts a message using an OTP and returns the ciphertext, or undef on error. Two arguments are required: the pad name, and the plaintext message, in that order.

decrypt

Decrypts a ciphertext provided as the single required argument and returns the decrypted plaintext if successful, or undef if not.

SEE ALSO

http://www.unsnoopable.org

http://www.noodlepi.com

unsnoopable.pl

AUTHOR

Ashish Gulhati, <crypt-unsnoopable at hash.neo.tc>

BUGS

Please report any bugs or feature requests to bug-crypt-unsnoopable at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Crypt-Unsnoopable. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

    perldoc Crypt::Unsnoopable

You can also look for information at:

LICENSE AND COPYRIGHT

Copyright (c) 2001-2017 Ashish Gulhati.

This program is free software; you can redistribute it and/or modify it under the terms of the Artistic License 2.0.

See http://www.perlfoundation.org/artistic_license_2_0 for the full license terms.