Net::SSH::Perl::Cipher::ChachaPoly - provides Chacha20 encryption with Poly1305 Authentication support for Net::SSH::Perl.
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);
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.
Lance Kinley E<lkinley@loyaltymethods.com>
Copyright (c) 2015 Loyalty Methods, Inc.
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:
Unknown E content in E<lkinley@loyaltymethods.com>
To install Net::SSH::Perl, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::SSH::Perl
CPAN shell
perl -MCPAN -e shell install Net::SSH::Perl
For more information on module installation, please visit the detailed CPAN module installation guide.