![]() |
![]()
| ![]() |
![]()
NAMENet::SSH::Perl::Cipher::ChachaPoly - provides Chacha20 encryption with Poly1305 Authentication support for Net::SSH::Perl.SYNOPSISuse 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); DESCRIPTIONNet::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 & COPYRIGHTSLance Kinley E<lkinley@loyaltymethods.com>Copyright (c) 2015 Loyalty Methods, Inc. LICENSEThis program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.POD ERRORSHey! The above document had some coding errors, which are explained below:
|