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

NAME

Net::SSH::Perl::Cipher::ChachaPoly - provides Chacha20 encryption with Poly1305 Authentication support for Net::SSH::Perl.

SYNOPSIS

    use Net::SSH::Perl::Cipher;
    my $eight_byte_iv = pack('N',0) . pack('N',1);
    my $eight_byte_counter = chr(1) . 7 x "\0"; # little endian

    my $cipher = Net::SSH::Perl::Cipher->new('ChachaPoly', $key);

    # generate poly key
    $cipher->ivsetup($eight_byte_iv,undef);
    my $poly_key = "\0" x POLY1305_KEYLEN; # 32 byte key
    $poly_key = $ciph->encrypt($poly_key);

    $cipher->ivsetup($eight_byte_iv,$eight_byte_counter);
    my $enc = $cipher->encrypt($plaintext);
    my $tag = $cipher->poly1305($enc,$poly_key);

DESCRIPTION

Net::SSH::Perl::Cipher::Chacha provides Chacha20 encryption with Poly1305 support for Net::SSH::Perl.

This module requires Crypt::OpenSSH::ChachaPoly which provides a wrapper to the OpenSSH Chacha and Poly1305 functions.

AUTHOR & COPYRIGHTS

Lance Kinley E<lkinley@loyaltymethods.com>

Copyright (c) 2015 Loyalty Methods, Inc.

LICENSE

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

1 POD Error

The following errors were encountered while parsing the POD:

Around line 149:

Unknown E content in E<lkinley@loyaltymethods.com>