Ashish Gulhati
and 1 contributors

NAME

Crypt::Unsnoopable - Completely unsnoopable messaging

VERSION

 $Revision: 1.010 $
 $Date: Tue Oct 16 21:04:28 PDT 2018 $

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) Ashish Gulhati.

This software package is Open Software; you can use, redistribute, and/or modify it under the terms of the Open Artistic License 2.0.

Please see http://www.opensoftwr.org/oal20.txt for the full license terms, and ensure that the license grant applies to you before using or modifying this software. By using or modifying this software, you indicate your agreement with the license terms.