NAME
AES128 - AES128 CTR mode encryption algorithms
SYNOPSIS
use MicroECC;
use AES128 qw/:all/;
use Digest::SHA qw/sha256/;
my $curve = MicroECC::secp256r1();
my ($pubkey, $privkey) = MicroECC::make_key($curve);
# Make shared secret key with other people's public key.
my $shared_secret = MicroECC::shared_secret($your_pubkey, $privkey);
my $hash = sha256($shared_secret); # $hash must be 32 bytes long!
my $plain_text = "There's more than one way to do it.";
my $encrypted = AES128_CTR_encrypt($plain_text, $hash);
my $plain = AES128_CTR_decrypt($encrypted, $hash);
DESCRIPTION
Perl wrapper for the tiny-AES-c library (https://github.com/kokke/tiny-AES-c)
Since 128bit key length is secure enough for most applications and ECB is NOT secure, this module supports 128bit key length and CTR mode only.
EXPORT
None by default.
SEE ALSO
Mention other useful documentation such as the documentation of related modules or operating system documentation (such as man pages in UNIX), or any relevant external documentation such as RFCs or standards.
If you have a mailing list set up for your module, mention it here.
If you have a web site set up for your module, mention it here.
AUTHOR
Jeff Zhang, <10395708@qq.com>
COPYRIGHT AND LICENSE
Copyright (C) 2019 by Jeff
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.16.1 or, at your option, any later version of Perl 5 you may have available.