diff --git a/Changes b/Changes index be4792e..d86e6a5 100644 --- a/Changes +++ b/Changes @@ -1,4 +1,16 @@ Changes for CryptX + +0.073 2021-07-18 + - fix #73 CPAN testers failure with Math::BigInt 1.99982 + - fix #70 remove lto related hacks from Makefile.PL + - fix #72 drop optional prereqs JSON::XS + Cpanel::JSON::XS, use optionally only JSON + +0.072 2021-04-29 + - fix #69 Identifier Octet's Leniency in RSA PKCS#1 Signature Verification + - bundled libtomcrypt update branch:develop (commit:165c795b 2021-04-14) + +0.071 2021-03-30 + - fix #67 (better handling of PEM decoding failures) 0.070 2021-02-12 - fix #66 remove -flto=auto (Makefile.PL) diff --git a/MANIFEST b/MANIFEST index 7f2cc4c..d2a422f 100644 --- a/MANIFEST +++ b/MANIFEST @@ -151,8 +151,6 @@ LICENSE Makefile.PL MANIFEST This list of files -META.json -META.yml ppport.h README.md src/ltc/ciphers/aes/aes.c @@ -1083,3 +1081,5 @@ t/prng_yarrow.t t/sshkey.t typemap +META.yml Module YAML meta-data (added by MakeMaker) +META.json Module JSON meta-data (added by MakeMaker) diff --git a/META.json b/META.json index 86b847d..8fd0421 100644 --- a/META.json +++ b/META.json @@ -4,7 +4,7 @@ "Karel Miko" ], "dynamic_config" : 1, - "generated_by" : "ExtUtils::MakeMaker version 7.58, CPAN::Meta::Converter version 2.150010", + "generated_by" : "ExtUtils::MakeMaker version 7.44, CPAN::Meta::Converter version 2.150010", "license" : [ "perl_5" ], @@ -41,7 +41,7 @@ } } }, - "release_status" : "stable", + "release_status" : "unstable", "resources" : { "bugtracker" : { "web" : "https://github.com/DCIT/perl-CryptX/issues" @@ -50,6 +50,6 @@ "url" : "https://github.com/DCIT/perl-CryptX" } }, - "version" : "0.070", - "x_serialization_backend" : "JSON::PP version 4.05" + "version" : "0.073_001", + "x_serialization_backend" : "JSON::PP version 4.04" } diff --git a/META.yml b/META.yml index 3bca656..292e760 100644 --- a/META.yml +++ b/META.yml @@ -8,7 +8,7 @@ configure_requires: ExtUtils::MakeMaker: '0' dynamic_config: 1 -generated_by: 'ExtUtils::MakeMaker version 7.58, CPAN::Meta::Converter version 2.150010' +generated_by: 'ExtUtils::MakeMaker version 7.44, CPAN::Meta::Converter version 2.150010' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html @@ -23,5 +23,5 @@ resources: bugtracker: https://github.com/DCIT/perl-CryptX/issues repository: https://github.com/DCIT/perl-CryptX -version: '0.070' +version: 0.073_001 x_serialization_backend: 'CPAN::Meta::YAML version 0.018' diff --git a/Makefile.PL b/Makefile.PL index 5f1ffaf..9322143 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -25,24 +25,24 @@ glob('src/ltc/*/*/*/*.c'), glob('src/ltc/*/*/*/*/*.c'), ); - $mycflags = "$Config{ccflags} $Config{cccdlflags} $Config{optimize}"; + $mycflags = " $Config{ccflags} $Config{cccdlflags} $Config{optimize} "; # keep leading + trailing spaces #FIX: this is particularly useful for Debian https://github.com/DCIT/perl-CryptX/pull/39 - $mycflags .= " $ENV{CFLAGS}" if $ENV{CFLAGS}; - $mycflags .= " $ENV{CPPFLAGS}" if $ENV{CPPFLAGS}; + $mycflags .= " $ENV{CFLAGS} " if $ENV{CFLAGS}; + $mycflags .= " $ENV{CPPFLAGS} " if $ENV{CPPFLAGS}; - #FIX: gcc with -flto is a trouble maker see https://github.com/DCIT/perl-CryptX/issues/32 - #FIX: another issue with "-flto=auto" see https://github.com/DCIT/perl-CryptX/pull/66 - $mycflags =~ s/-flto=[a-zA-Z0-9]+//g; # -flto=auto -flto=jobserver -flto=N ... - $mycflags =~ s/-flto\b//g; + #### remove all lto hacks - https://github.com/DCIT/perl-CryptX/issues/70 + ## #FIX: gcc with -flto is a trouble maker see https://github.com/DCIT/perl-CryptX/issues/32 + ## #FIX: another issue with "-flto=auto" see https://github.com/DCIT/perl-CryptX/pull/66 + ## $mycflags =~ s/\s-flto\S+\s/ /g; # -flto -flto=auto -flto=jobserver -flto=N ... #FIX: avoid -Wwrite-strings -Wcast-qual -pedantic -pedantic-errors -ansi -std=c89 - $mycflags =~ s/-pedantic\b//g; - $mycflags =~ s/-pedantic-errors\b//g; - $mycflags =~ s/-std=c89\b//g; - $mycflags =~ s/-ansi\b//g; - $mycflags =~ s/-Wwrite-strings\b//g; - $mycflags =~ s/-Wcast-qual\b//g; + $mycflags =~ s/\s-pedantic-errors\s/ /g; + $mycflags =~ s/\s-pedantic\s/ /g; + $mycflags =~ s/\s-std=c89\s/ /g; + $mycflags =~ s/\s-ansi\s/ /g; + $mycflags =~ s/\s-Wwrite-strings\s/ /g; + $mycflags =~ s/\s-Wcast-qual\s/ /g; #FIX: avoid "ar: fatal: Numeric group ID too large" see https://github.com/DCIT/perl-CryptX/issues/33 $myarflags = '$(AR_STATIC_ARGS)'; @@ -74,7 +74,7 @@ PREREQ_PM => { }, TEST_REQUIRES => { 'Test::More' => 0 }, META_MERGE => { resources => { repository => 'https://github.com/DCIT/perl-CryptX', bugtracker => 'https://github.com/DCIT/perl-CryptX/issues' } }, - dist => { PREOP => 'perldoc -u lib/CryptX.pm | pod2markdown > README.md', TAR => 'ptar', TARFLAGS => '-c -C -f' }, + dist => { PREOP => 'perldoc -u lib/CryptX.pm | pod2markdown > README.md', TARFLAGS => '--owner=0 --group=0 -cvf' }, @EUMM_INC_LIB ); diff --git a/README.md b/README.md index b5d6c85..7932edc 100644 --- a/README.md +++ b/README.md @@ -68,4 +68,4 @@ # COPYRIGHT -Copyright (c) 2013-2020 DCIT, a.s. [https://www.dcit.cz](https://www.dcit.cz) / Karel Miko +Copyright (c) 2013-2021 DCIT, a.s. [https://www.dcit.cz](https://www.dcit.cz) / Karel Miko diff --git a/debian/changelog b/debian/changelog index 19f6d67..ba1a4aa 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,6 @@ -libcryptx-perl (0.070-1) UNRELEASED; urgency=medium +libcryptx-perl (0.073+git20210718.1.9480374-1) UNRELEASED; urgency=medium + [ gregor herrmann ] NOTE: bundled libtomcrypt updated (looks harmless but still) @@ -7,7 +8,10 @@ * Declare compliance with Debian Policy 4.5.1. * Use HTTPS for 2 URLs in debian/copyright. Thanks to duck. - -- gregor herrmann Fri, 19 Feb 2021 17:29:04 +0100 + [ Debian Janitor ] + * New upstream snapshot. + + -- gregor herrmann Wed, 18 Aug 2021 12:43:00 -0000 libcryptx-perl (0.069-1) unstable; urgency=medium diff --git a/lib/Crypt/AuthEnc/CCM.pm b/lib/Crypt/AuthEnc/CCM.pm index 7d46c1e..0d12194 100644 --- a/lib/Crypt/AuthEnc/CCM.pm +++ b/lib/Crypt/AuthEnc/CCM.pm @@ -2,7 +2,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; require Exporter; our @ISA = qw(Exporter); ### use Exporter 5.57 'import'; our %EXPORT_TAGS = ( all => [qw( ccm_encrypt_authenticate ccm_decrypt_verify )] ); diff --git a/lib/Crypt/AuthEnc/ChaCha20Poly1305.pm b/lib/Crypt/AuthEnc/ChaCha20Poly1305.pm index 839f9d7..87d743e 100644 --- a/lib/Crypt/AuthEnc/ChaCha20Poly1305.pm +++ b/lib/Crypt/AuthEnc/ChaCha20Poly1305.pm @@ -2,7 +2,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; require Exporter; our @ISA = qw(Exporter); ### use Exporter 5.57 'import'; our %EXPORT_TAGS = ( all => [qw( chacha20poly1305_encrypt_authenticate chacha20poly1305_decrypt_verify )] ); diff --git a/lib/Crypt/AuthEnc/EAX.pm b/lib/Crypt/AuthEnc/EAX.pm index 9bba5f2..8d08760 100644 --- a/lib/Crypt/AuthEnc/EAX.pm +++ b/lib/Crypt/AuthEnc/EAX.pm @@ -2,7 +2,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; require Exporter; our @ISA = qw(Exporter); ### use Exporter 5.57 'import'; our %EXPORT_TAGS = ( all => [qw( eax_encrypt_authenticate eax_decrypt_verify )] ); diff --git a/lib/Crypt/AuthEnc/GCM.pm b/lib/Crypt/AuthEnc/GCM.pm index b0b161a..d8546b8 100644 --- a/lib/Crypt/AuthEnc/GCM.pm +++ b/lib/Crypt/AuthEnc/GCM.pm @@ -2,7 +2,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; require Exporter; our @ISA = qw(Exporter); ### use Exporter 5.57 'import'; our %EXPORT_TAGS = ( all => [qw( gcm_encrypt_authenticate gcm_decrypt_verify )] ); diff --git a/lib/Crypt/AuthEnc/OCB.pm b/lib/Crypt/AuthEnc/OCB.pm index a4d3cec..2f219c9 100644 --- a/lib/Crypt/AuthEnc/OCB.pm +++ b/lib/Crypt/AuthEnc/OCB.pm @@ -2,7 +2,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; require Exporter; our @ISA = qw(Exporter); ### use Exporter 5.57 'import'; our %EXPORT_TAGS = ( all => [qw( ocb_encrypt_authenticate ocb_decrypt_verify )] ); diff --git a/lib/Crypt/AuthEnc.pm b/lib/Crypt/AuthEnc.pm index cb1ce39..4ef01f2 100644 --- a/lib/Crypt/AuthEnc.pm +++ b/lib/Crypt/AuthEnc.pm @@ -2,7 +2,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; ### not used diff --git a/lib/Crypt/Checksum/Adler32.pm b/lib/Crypt/Checksum/Adler32.pm index 9b7bd32..75d76d5 100644 --- a/lib/Crypt/Checksum/Adler32.pm +++ b/lib/Crypt/Checksum/Adler32.pm @@ -2,7 +2,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; use base qw(Crypt::Checksum Exporter); our %EXPORT_TAGS = ( all => [qw( adler32_data adler32_data_hex adler32_data_int adler32_file adler32_file_hex adler32_file_int )] ); diff --git a/lib/Crypt/Checksum/CRC32.pm b/lib/Crypt/Checksum/CRC32.pm index f03dea0..ae39789 100644 --- a/lib/Crypt/Checksum/CRC32.pm +++ b/lib/Crypt/Checksum/CRC32.pm @@ -2,7 +2,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; use base qw(Crypt::Checksum Exporter); our %EXPORT_TAGS = ( all => [qw( crc32_data crc32_data_hex crc32_data_int crc32_file crc32_file_hex crc32_file_int )] ); diff --git a/lib/Crypt/Checksum.pm b/lib/Crypt/Checksum.pm index 650d9d2..95cc446 100644 --- a/lib/Crypt/Checksum.pm +++ b/lib/Crypt/Checksum.pm @@ -2,7 +2,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; require Exporter; our @ISA = qw(Exporter); ### use Exporter 5.57 'import'; our %EXPORT_TAGS = ( all => [qw/ adler32_data adler32_data_hex adler32_data_int adler32_file adler32_file_hex adler32_file_int diff --git a/lib/Crypt/Cipher/AES.pm b/lib/Crypt/Cipher/AES.pm index f2b6320..44519fd 100644 --- a/lib/Crypt/Cipher/AES.pm +++ b/lib/Crypt/Cipher/AES.pm @@ -4,7 +4,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; use base qw(Crypt::Cipher); diff --git a/lib/Crypt/Cipher/Anubis.pm b/lib/Crypt/Cipher/Anubis.pm index 1a78d42..1e49cc4 100644 --- a/lib/Crypt/Cipher/Anubis.pm +++ b/lib/Crypt/Cipher/Anubis.pm @@ -4,7 +4,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; use base qw(Crypt::Cipher); diff --git a/lib/Crypt/Cipher/Blowfish.pm b/lib/Crypt/Cipher/Blowfish.pm index 74bb37a..432dda5 100644 --- a/lib/Crypt/Cipher/Blowfish.pm +++ b/lib/Crypt/Cipher/Blowfish.pm @@ -4,7 +4,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; use base qw(Crypt::Cipher); diff --git a/lib/Crypt/Cipher/CAST5.pm b/lib/Crypt/Cipher/CAST5.pm index 19ac992..5961871 100644 --- a/lib/Crypt/Cipher/CAST5.pm +++ b/lib/Crypt/Cipher/CAST5.pm @@ -4,7 +4,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; use base qw(Crypt::Cipher); diff --git a/lib/Crypt/Cipher/Camellia.pm b/lib/Crypt/Cipher/Camellia.pm index 03e1fc7..16c8b88 100644 --- a/lib/Crypt/Cipher/Camellia.pm +++ b/lib/Crypt/Cipher/Camellia.pm @@ -4,7 +4,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; use base qw(Crypt::Cipher); diff --git a/lib/Crypt/Cipher/DES.pm b/lib/Crypt/Cipher/DES.pm index 20e076a..0957113 100644 --- a/lib/Crypt/Cipher/DES.pm +++ b/lib/Crypt/Cipher/DES.pm @@ -4,7 +4,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; use base qw(Crypt::Cipher); diff --git a/lib/Crypt/Cipher/DES_EDE.pm b/lib/Crypt/Cipher/DES_EDE.pm index 1a6220a..da77ee9 100644 --- a/lib/Crypt/Cipher/DES_EDE.pm +++ b/lib/Crypt/Cipher/DES_EDE.pm @@ -4,7 +4,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; use base qw(Crypt::Cipher); diff --git a/lib/Crypt/Cipher/IDEA.pm b/lib/Crypt/Cipher/IDEA.pm index 9f0b787..656d502 100644 --- a/lib/Crypt/Cipher/IDEA.pm +++ b/lib/Crypt/Cipher/IDEA.pm @@ -4,7 +4,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; use base qw(Crypt::Cipher); diff --git a/lib/Crypt/Cipher/KASUMI.pm b/lib/Crypt/Cipher/KASUMI.pm index 1707485..cb43a5e 100644 --- a/lib/Crypt/Cipher/KASUMI.pm +++ b/lib/Crypt/Cipher/KASUMI.pm @@ -4,7 +4,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; use base qw(Crypt::Cipher); diff --git a/lib/Crypt/Cipher/Khazad.pm b/lib/Crypt/Cipher/Khazad.pm index 5f968b3..02ad6ed 100644 --- a/lib/Crypt/Cipher/Khazad.pm +++ b/lib/Crypt/Cipher/Khazad.pm @@ -4,7 +4,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; use base qw(Crypt::Cipher); diff --git a/lib/Crypt/Cipher/MULTI2.pm b/lib/Crypt/Cipher/MULTI2.pm index e2ac7df..51fe108 100644 --- a/lib/Crypt/Cipher/MULTI2.pm +++ b/lib/Crypt/Cipher/MULTI2.pm @@ -4,7 +4,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; use base qw(Crypt::Cipher); diff --git a/lib/Crypt/Cipher/Noekeon.pm b/lib/Crypt/Cipher/Noekeon.pm index 59d0e81..eb759ab 100644 --- a/lib/Crypt/Cipher/Noekeon.pm +++ b/lib/Crypt/Cipher/Noekeon.pm @@ -4,7 +4,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; use base qw(Crypt::Cipher); diff --git a/lib/Crypt/Cipher/RC2.pm b/lib/Crypt/Cipher/RC2.pm index 6095503..c2719e2 100644 --- a/lib/Crypt/Cipher/RC2.pm +++ b/lib/Crypt/Cipher/RC2.pm @@ -4,7 +4,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; use base qw(Crypt::Cipher); diff --git a/lib/Crypt/Cipher/RC5.pm b/lib/Crypt/Cipher/RC5.pm index 4738eae..661b81f 100644 --- a/lib/Crypt/Cipher/RC5.pm +++ b/lib/Crypt/Cipher/RC5.pm @@ -4,7 +4,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; use base qw(Crypt::Cipher); diff --git a/lib/Crypt/Cipher/RC6.pm b/lib/Crypt/Cipher/RC6.pm index a8e3eff..2efa06b 100644 --- a/lib/Crypt/Cipher/RC6.pm +++ b/lib/Crypt/Cipher/RC6.pm @@ -4,7 +4,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; use base qw(Crypt::Cipher); diff --git a/lib/Crypt/Cipher/SAFERP.pm b/lib/Crypt/Cipher/SAFERP.pm index 5defae6..cd80749 100644 --- a/lib/Crypt/Cipher/SAFERP.pm +++ b/lib/Crypt/Cipher/SAFERP.pm @@ -4,7 +4,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; use base qw(Crypt::Cipher); diff --git a/lib/Crypt/Cipher/SAFER_K128.pm b/lib/Crypt/Cipher/SAFER_K128.pm index 287dc5b..4b8c587 100644 --- a/lib/Crypt/Cipher/SAFER_K128.pm +++ b/lib/Crypt/Cipher/SAFER_K128.pm @@ -4,7 +4,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; use base qw(Crypt::Cipher); diff --git a/lib/Crypt/Cipher/SAFER_K64.pm b/lib/Crypt/Cipher/SAFER_K64.pm index cc96466..7e4fd43 100644 --- a/lib/Crypt/Cipher/SAFER_K64.pm +++ b/lib/Crypt/Cipher/SAFER_K64.pm @@ -4,7 +4,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; use base qw(Crypt::Cipher); diff --git a/lib/Crypt/Cipher/SAFER_SK128.pm b/lib/Crypt/Cipher/SAFER_SK128.pm index ade2715..dcc9ba2 100644 --- a/lib/Crypt/Cipher/SAFER_SK128.pm +++ b/lib/Crypt/Cipher/SAFER_SK128.pm @@ -4,7 +4,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; use base qw(Crypt::Cipher); diff --git a/lib/Crypt/Cipher/SAFER_SK64.pm b/lib/Crypt/Cipher/SAFER_SK64.pm index 7cebd88..c7274b3 100644 --- a/lib/Crypt/Cipher/SAFER_SK64.pm +++ b/lib/Crypt/Cipher/SAFER_SK64.pm @@ -4,7 +4,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; use base qw(Crypt::Cipher); diff --git a/lib/Crypt/Cipher/SEED.pm b/lib/Crypt/Cipher/SEED.pm index bb4974d..e41ce85 100644 --- a/lib/Crypt/Cipher/SEED.pm +++ b/lib/Crypt/Cipher/SEED.pm @@ -4,7 +4,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; use base qw(Crypt::Cipher); diff --git a/lib/Crypt/Cipher/Serpent.pm b/lib/Crypt/Cipher/Serpent.pm index ff9533c..a274c22 100644 --- a/lib/Crypt/Cipher/Serpent.pm +++ b/lib/Crypt/Cipher/Serpent.pm @@ -4,7 +4,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; use base qw(Crypt::Cipher); diff --git a/lib/Crypt/Cipher/Skipjack.pm b/lib/Crypt/Cipher/Skipjack.pm index bd4fb0d..1738d49 100644 --- a/lib/Crypt/Cipher/Skipjack.pm +++ b/lib/Crypt/Cipher/Skipjack.pm @@ -4,7 +4,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; use base qw(Crypt::Cipher); diff --git a/lib/Crypt/Cipher/Twofish.pm b/lib/Crypt/Cipher/Twofish.pm index 4ebf85c..192d4c9 100644 --- a/lib/Crypt/Cipher/Twofish.pm +++ b/lib/Crypt/Cipher/Twofish.pm @@ -4,7 +4,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; use base qw(Crypt::Cipher); diff --git a/lib/Crypt/Cipher/XTEA.pm b/lib/Crypt/Cipher/XTEA.pm index d7d9c72..6a73f25 100644 --- a/lib/Crypt/Cipher/XTEA.pm +++ b/lib/Crypt/Cipher/XTEA.pm @@ -4,7 +4,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; use base qw(Crypt::Cipher); diff --git a/lib/Crypt/Cipher.pm b/lib/Crypt/Cipher.pm index c1db4b2..2af3f5b 100644 --- a/lib/Crypt/Cipher.pm +++ b/lib/Crypt/Cipher.pm @@ -2,7 +2,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; use Carp; $Carp::Internal{(__PACKAGE__)}++; diff --git a/lib/Crypt/Digest/BLAKE2b_160.pm b/lib/Crypt/Digest/BLAKE2b_160.pm index 6284452..f834dc2 100644 --- a/lib/Crypt/Digest/BLAKE2b_160.pm +++ b/lib/Crypt/Digest/BLAKE2b_160.pm @@ -4,7 +4,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; use base qw(Crypt::Digest Exporter); our %EXPORT_TAGS = ( all => [qw( blake2b_160 blake2b_160_hex blake2b_160_b64 blake2b_160_b64u blake2b_160_file blake2b_160_file_hex blake2b_160_file_b64 blake2b_160_file_b64u )] ); diff --git a/lib/Crypt/Digest/BLAKE2b_256.pm b/lib/Crypt/Digest/BLAKE2b_256.pm index 84d89a8..aa50264 100644 --- a/lib/Crypt/Digest/BLAKE2b_256.pm +++ b/lib/Crypt/Digest/BLAKE2b_256.pm @@ -4,7 +4,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; use base qw(Crypt::Digest Exporter); our %EXPORT_TAGS = ( all => [qw( blake2b_256 blake2b_256_hex blake2b_256_b64 blake2b_256_b64u blake2b_256_file blake2b_256_file_hex blake2b_256_file_b64 blake2b_256_file_b64u )] ); diff --git a/lib/Crypt/Digest/BLAKE2b_384.pm b/lib/Crypt/Digest/BLAKE2b_384.pm index 677dc0a..62cdafe 100644 --- a/lib/Crypt/Digest/BLAKE2b_384.pm +++ b/lib/Crypt/Digest/BLAKE2b_384.pm @@ -4,7 +4,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; use base qw(Crypt::Digest Exporter); our %EXPORT_TAGS = ( all => [qw( blake2b_384 blake2b_384_hex blake2b_384_b64 blake2b_384_b64u blake2b_384_file blake2b_384_file_hex blake2b_384_file_b64 blake2b_384_file_b64u )] ); diff --git a/lib/Crypt/Digest/BLAKE2b_512.pm b/lib/Crypt/Digest/BLAKE2b_512.pm index 210efbd..c14c032 100644 --- a/lib/Crypt/Digest/BLAKE2b_512.pm +++ b/lib/Crypt/Digest/BLAKE2b_512.pm @@ -4,7 +4,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; use base qw(Crypt::Digest Exporter); our %EXPORT_TAGS = ( all => [qw( blake2b_512 blake2b_512_hex blake2b_512_b64 blake2b_512_b64u blake2b_512_file blake2b_512_file_hex blake2b_512_file_b64 blake2b_512_file_b64u )] ); diff --git a/lib/Crypt/Digest/BLAKE2s_128.pm b/lib/Crypt/Digest/BLAKE2s_128.pm index b45a9a9..f00fecb 100644 --- a/lib/Crypt/Digest/BLAKE2s_128.pm +++ b/lib/Crypt/Digest/BLAKE2s_128.pm @@ -4,7 +4,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; use base qw(Crypt::Digest Exporter); our %EXPORT_TAGS = ( all => [qw( blake2s_128 blake2s_128_hex blake2s_128_b64 blake2s_128_b64u blake2s_128_file blake2s_128_file_hex blake2s_128_file_b64 blake2s_128_file_b64u )] ); diff --git a/lib/Crypt/Digest/BLAKE2s_160.pm b/lib/Crypt/Digest/BLAKE2s_160.pm index 116e09e..e09ecb4 100644 --- a/lib/Crypt/Digest/BLAKE2s_160.pm +++ b/lib/Crypt/Digest/BLAKE2s_160.pm @@ -4,7 +4,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; use base qw(Crypt::Digest Exporter); our %EXPORT_TAGS = ( all => [qw( blake2s_160 blake2s_160_hex blake2s_160_b64 blake2s_160_b64u blake2s_160_file blake2s_160_file_hex blake2s_160_file_b64 blake2s_160_file_b64u )] ); diff --git a/lib/Crypt/Digest/BLAKE2s_224.pm b/lib/Crypt/Digest/BLAKE2s_224.pm index 7aa240f..cd68e1c 100644 --- a/lib/Crypt/Digest/BLAKE2s_224.pm +++ b/lib/Crypt/Digest/BLAKE2s_224.pm @@ -4,7 +4,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; use base qw(Crypt::Digest Exporter); our %EXPORT_TAGS = ( all => [qw( blake2s_224 blake2s_224_hex blake2s_224_b64 blake2s_224_b64u blake2s_224_file blake2s_224_file_hex blake2s_224_file_b64 blake2s_224_file_b64u )] ); diff --git a/lib/Crypt/Digest/BLAKE2s_256.pm b/lib/Crypt/Digest/BLAKE2s_256.pm index 77276ba..34b70f2 100644 --- a/lib/Crypt/Digest/BLAKE2s_256.pm +++ b/lib/Crypt/Digest/BLAKE2s_256.pm @@ -4,7 +4,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; use base qw(Crypt::Digest Exporter); our %EXPORT_TAGS = ( all => [qw( blake2s_256 blake2s_256_hex blake2s_256_b64 blake2s_256_b64u blake2s_256_file blake2s_256_file_hex blake2s_256_file_b64 blake2s_256_file_b64u )] ); diff --git a/lib/Crypt/Digest/CHAES.pm b/lib/Crypt/Digest/CHAES.pm index 03f6a42..e088bf9 100644 --- a/lib/Crypt/Digest/CHAES.pm +++ b/lib/Crypt/Digest/CHAES.pm @@ -4,7 +4,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; use base qw(Crypt::Digest Exporter); our %EXPORT_TAGS = ( all => [qw( chaes chaes_hex chaes_b64 chaes_b64u chaes_file chaes_file_hex chaes_file_b64 chaes_file_b64u )] ); diff --git a/lib/Crypt/Digest/Keccak224.pm b/lib/Crypt/Digest/Keccak224.pm index cd6b755..b6b13e8 100644 --- a/lib/Crypt/Digest/Keccak224.pm +++ b/lib/Crypt/Digest/Keccak224.pm @@ -4,7 +4,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; use base qw(Crypt::Digest Exporter); our %EXPORT_TAGS = ( all => [qw( keccak224 keccak224_hex keccak224_b64 keccak224_b64u keccak224_file keccak224_file_hex keccak224_file_b64 keccak224_file_b64u )] ); diff --git a/lib/Crypt/Digest/Keccak256.pm b/lib/Crypt/Digest/Keccak256.pm index 500887c..8a30adf 100644 --- a/lib/Crypt/Digest/Keccak256.pm +++ b/lib/Crypt/Digest/Keccak256.pm @@ -4,7 +4,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; use base qw(Crypt::Digest Exporter); our %EXPORT_TAGS = ( all => [qw( keccak256 keccak256_hex keccak256_b64 keccak256_b64u keccak256_file keccak256_file_hex keccak256_file_b64 keccak256_file_b64u )] ); diff --git a/lib/Crypt/Digest/Keccak384.pm b/lib/Crypt/Digest/Keccak384.pm index 0ee47d0..2896cfb 100644 --- a/lib/Crypt/Digest/Keccak384.pm +++ b/lib/Crypt/Digest/Keccak384.pm @@ -4,7 +4,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; use base qw(Crypt::Digest Exporter); our %EXPORT_TAGS = ( all => [qw( keccak384 keccak384_hex keccak384_b64 keccak384_b64u keccak384_file keccak384_file_hex keccak384_file_b64 keccak384_file_b64u )] ); diff --git a/lib/Crypt/Digest/Keccak512.pm b/lib/Crypt/Digest/Keccak512.pm index 802c5f7..8071060 100644 --- a/lib/Crypt/Digest/Keccak512.pm +++ b/lib/Crypt/Digest/Keccak512.pm @@ -4,7 +4,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; use base qw(Crypt::Digest Exporter); our %EXPORT_TAGS = ( all => [qw( keccak512 keccak512_hex keccak512_b64 keccak512_b64u keccak512_file keccak512_file_hex keccak512_file_b64 keccak512_file_b64u )] ); diff --git a/lib/Crypt/Digest/MD2.pm b/lib/Crypt/Digest/MD2.pm index 90e3c37..568ed6f 100644 --- a/lib/Crypt/Digest/MD2.pm +++ b/lib/Crypt/Digest/MD2.pm @@ -4,7 +4,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; use base qw(Crypt::Digest Exporter); our %EXPORT_TAGS = ( all => [qw( md2 md2_hex md2_b64 md2_b64u md2_file md2_file_hex md2_file_b64 md2_file_b64u )] ); diff --git a/lib/Crypt/Digest/MD4.pm b/lib/Crypt/Digest/MD4.pm index 521cd40..b7a38da 100644 --- a/lib/Crypt/Digest/MD4.pm +++ b/lib/Crypt/Digest/MD4.pm @@ -4,7 +4,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; use base qw(Crypt::Digest Exporter); our %EXPORT_TAGS = ( all => [qw( md4 md4_hex md4_b64 md4_b64u md4_file md4_file_hex md4_file_b64 md4_file_b64u )] ); diff --git a/lib/Crypt/Digest/MD5.pm b/lib/Crypt/Digest/MD5.pm index 2d2ddf8..a21bf34 100644 --- a/lib/Crypt/Digest/MD5.pm +++ b/lib/Crypt/Digest/MD5.pm @@ -4,7 +4,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; use base qw(Crypt::Digest Exporter); our %EXPORT_TAGS = ( all => [qw( md5 md5_hex md5_b64 md5_b64u md5_file md5_file_hex md5_file_b64 md5_file_b64u )] ); diff --git a/lib/Crypt/Digest/RIPEMD128.pm b/lib/Crypt/Digest/RIPEMD128.pm index 5c2fd48..df6e211 100644 --- a/lib/Crypt/Digest/RIPEMD128.pm +++ b/lib/Crypt/Digest/RIPEMD128.pm @@ -4,7 +4,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; use base qw(Crypt::Digest Exporter); our %EXPORT_TAGS = ( all => [qw( ripemd128 ripemd128_hex ripemd128_b64 ripemd128_b64u ripemd128_file ripemd128_file_hex ripemd128_file_b64 ripemd128_file_b64u )] ); diff --git a/lib/Crypt/Digest/RIPEMD160.pm b/lib/Crypt/Digest/RIPEMD160.pm index dda6577..2551f65 100644 --- a/lib/Crypt/Digest/RIPEMD160.pm +++ b/lib/Crypt/Digest/RIPEMD160.pm @@ -4,7 +4,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; use base qw(Crypt::Digest Exporter); our %EXPORT_TAGS = ( all => [qw( ripemd160 ripemd160_hex ripemd160_b64 ripemd160_b64u ripemd160_file ripemd160_file_hex ripemd160_file_b64 ripemd160_file_b64u )] ); diff --git a/lib/Crypt/Digest/RIPEMD256.pm b/lib/Crypt/Digest/RIPEMD256.pm index 5c86122..87acc72 100644 --- a/lib/Crypt/Digest/RIPEMD256.pm +++ b/lib/Crypt/Digest/RIPEMD256.pm @@ -4,7 +4,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; use base qw(Crypt::Digest Exporter); our %EXPORT_TAGS = ( all => [qw( ripemd256 ripemd256_hex ripemd256_b64 ripemd256_b64u ripemd256_file ripemd256_file_hex ripemd256_file_b64 ripemd256_file_b64u )] ); diff --git a/lib/Crypt/Digest/RIPEMD320.pm b/lib/Crypt/Digest/RIPEMD320.pm index 53cc81b..4c2856e 100644 --- a/lib/Crypt/Digest/RIPEMD320.pm +++ b/lib/Crypt/Digest/RIPEMD320.pm @@ -4,7 +4,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; use base qw(Crypt::Digest Exporter); our %EXPORT_TAGS = ( all => [qw( ripemd320 ripemd320_hex ripemd320_b64 ripemd320_b64u ripemd320_file ripemd320_file_hex ripemd320_file_b64 ripemd320_file_b64u )] ); diff --git a/lib/Crypt/Digest/SHA1.pm b/lib/Crypt/Digest/SHA1.pm index 00e5bb8..67a2cab 100644 --- a/lib/Crypt/Digest/SHA1.pm +++ b/lib/Crypt/Digest/SHA1.pm @@ -4,7 +4,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; use base qw(Crypt::Digest Exporter); our %EXPORT_TAGS = ( all => [qw( sha1 sha1_hex sha1_b64 sha1_b64u sha1_file sha1_file_hex sha1_file_b64 sha1_file_b64u )] ); diff --git a/lib/Crypt/Digest/SHA224.pm b/lib/Crypt/Digest/SHA224.pm index e96aba2..bd884cb 100644 --- a/lib/Crypt/Digest/SHA224.pm +++ b/lib/Crypt/Digest/SHA224.pm @@ -4,7 +4,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; use base qw(Crypt::Digest Exporter); our %EXPORT_TAGS = ( all => [qw( sha224 sha224_hex sha224_b64 sha224_b64u sha224_file sha224_file_hex sha224_file_b64 sha224_file_b64u )] ); diff --git a/lib/Crypt/Digest/SHA256.pm b/lib/Crypt/Digest/SHA256.pm index 0002eb0..53793bc 100644 --- a/lib/Crypt/Digest/SHA256.pm +++ b/lib/Crypt/Digest/SHA256.pm @@ -4,7 +4,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; use base qw(Crypt::Digest Exporter); our %EXPORT_TAGS = ( all => [qw( sha256 sha256_hex sha256_b64 sha256_b64u sha256_file sha256_file_hex sha256_file_b64 sha256_file_b64u )] ); diff --git a/lib/Crypt/Digest/SHA384.pm b/lib/Crypt/Digest/SHA384.pm index f5f3be0..4ac09e4 100644 --- a/lib/Crypt/Digest/SHA384.pm +++ b/lib/Crypt/Digest/SHA384.pm @@ -4,7 +4,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; use base qw(Crypt::Digest Exporter); our %EXPORT_TAGS = ( all => [qw( sha384 sha384_hex sha384_b64 sha384_b64u sha384_file sha384_file_hex sha384_file_b64 sha384_file_b64u )] ); diff --git a/lib/Crypt/Digest/SHA3_224.pm b/lib/Crypt/Digest/SHA3_224.pm index 1a33de1..b81dab6 100644 --- a/lib/Crypt/Digest/SHA3_224.pm +++ b/lib/Crypt/Digest/SHA3_224.pm @@ -4,7 +4,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; use base qw(Crypt::Digest Exporter); our %EXPORT_TAGS = ( all => [qw( sha3_224 sha3_224_hex sha3_224_b64 sha3_224_b64u sha3_224_file sha3_224_file_hex sha3_224_file_b64 sha3_224_file_b64u )] ); diff --git a/lib/Crypt/Digest/SHA3_256.pm b/lib/Crypt/Digest/SHA3_256.pm index 8728e16..f61e23e 100644 --- a/lib/Crypt/Digest/SHA3_256.pm +++ b/lib/Crypt/Digest/SHA3_256.pm @@ -4,7 +4,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; use base qw(Crypt::Digest Exporter); our %EXPORT_TAGS = ( all => [qw( sha3_256 sha3_256_hex sha3_256_b64 sha3_256_b64u sha3_256_file sha3_256_file_hex sha3_256_file_b64 sha3_256_file_b64u )] ); diff --git a/lib/Crypt/Digest/SHA3_384.pm b/lib/Crypt/Digest/SHA3_384.pm index 15b58e0..8860be3 100644 --- a/lib/Crypt/Digest/SHA3_384.pm +++ b/lib/Crypt/Digest/SHA3_384.pm @@ -4,7 +4,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; use base qw(Crypt::Digest Exporter); our %EXPORT_TAGS = ( all => [qw( sha3_384 sha3_384_hex sha3_384_b64 sha3_384_b64u sha3_384_file sha3_384_file_hex sha3_384_file_b64 sha3_384_file_b64u )] ); diff --git a/lib/Crypt/Digest/SHA3_512.pm b/lib/Crypt/Digest/SHA3_512.pm index e3c929c..2c77cc6 100644 --- a/lib/Crypt/Digest/SHA3_512.pm +++ b/lib/Crypt/Digest/SHA3_512.pm @@ -4,7 +4,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; use base qw(Crypt::Digest Exporter); our %EXPORT_TAGS = ( all => [qw( sha3_512 sha3_512_hex sha3_512_b64 sha3_512_b64u sha3_512_file sha3_512_file_hex sha3_512_file_b64 sha3_512_file_b64u )] ); diff --git a/lib/Crypt/Digest/SHA512.pm b/lib/Crypt/Digest/SHA512.pm index 64efbca..c6f5b61 100644 --- a/lib/Crypt/Digest/SHA512.pm +++ b/lib/Crypt/Digest/SHA512.pm @@ -4,7 +4,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; use base qw(Crypt::Digest Exporter); our %EXPORT_TAGS = ( all => [qw( sha512 sha512_hex sha512_b64 sha512_b64u sha512_file sha512_file_hex sha512_file_b64 sha512_file_b64u )] ); diff --git a/lib/Crypt/Digest/SHA512_224.pm b/lib/Crypt/Digest/SHA512_224.pm index bd1f66c..42a2a22 100644 --- a/lib/Crypt/Digest/SHA512_224.pm +++ b/lib/Crypt/Digest/SHA512_224.pm @@ -4,7 +4,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; use base qw(Crypt::Digest Exporter); our %EXPORT_TAGS = ( all => [qw( sha512_224 sha512_224_hex sha512_224_b64 sha512_224_b64u sha512_224_file sha512_224_file_hex sha512_224_file_b64 sha512_224_file_b64u )] ); diff --git a/lib/Crypt/Digest/SHA512_256.pm b/lib/Crypt/Digest/SHA512_256.pm index 2a09f34..fcf01d5 100644 --- a/lib/Crypt/Digest/SHA512_256.pm +++ b/lib/Crypt/Digest/SHA512_256.pm @@ -4,7 +4,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; use base qw(Crypt::Digest Exporter); our %EXPORT_TAGS = ( all => [qw( sha512_256 sha512_256_hex sha512_256_b64 sha512_256_b64u sha512_256_file sha512_256_file_hex sha512_256_file_b64 sha512_256_file_b64u )] ); diff --git a/lib/Crypt/Digest/SHAKE.pm b/lib/Crypt/Digest/SHAKE.pm index e6a1989..875eb31 100644 --- a/lib/Crypt/Digest/SHAKE.pm +++ b/lib/Crypt/Digest/SHAKE.pm @@ -2,7 +2,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; use Carp; $Carp::Internal{(__PACKAGE__)}++; diff --git a/lib/Crypt/Digest/Tiger192.pm b/lib/Crypt/Digest/Tiger192.pm index 0cfbc50..7e63c2b 100644 --- a/lib/Crypt/Digest/Tiger192.pm +++ b/lib/Crypt/Digest/Tiger192.pm @@ -4,7 +4,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; use base qw(Crypt::Digest Exporter); our %EXPORT_TAGS = ( all => [qw( tiger192 tiger192_hex tiger192_b64 tiger192_b64u tiger192_file tiger192_file_hex tiger192_file_b64 tiger192_file_b64u )] ); diff --git a/lib/Crypt/Digest/Whirlpool.pm b/lib/Crypt/Digest/Whirlpool.pm index 60505cc..a4b3d76 100644 --- a/lib/Crypt/Digest/Whirlpool.pm +++ b/lib/Crypt/Digest/Whirlpool.pm @@ -4,7 +4,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; use base qw(Crypt::Digest Exporter); our %EXPORT_TAGS = ( all => [qw( whirlpool whirlpool_hex whirlpool_b64 whirlpool_b64u whirlpool_file whirlpool_file_hex whirlpool_file_b64 whirlpool_file_b64u )] ); diff --git a/lib/Crypt/Digest.pm b/lib/Crypt/Digest.pm index 389da32..9f72739 100644 --- a/lib/Crypt/Digest.pm +++ b/lib/Crypt/Digest.pm @@ -2,7 +2,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; require Exporter; our @ISA = qw(Exporter); ### use Exporter 5.57 'import'; our %EXPORT_TAGS = ( all => [qw( digest_data digest_data_hex digest_data_b64 digest_data_b64u digest_file digest_file_hex digest_file_b64 digest_file_b64u )] ); diff --git a/lib/Crypt/KeyDerivation.pm b/lib/Crypt/KeyDerivation.pm index b625fe4..b52d6f7 100644 --- a/lib/Crypt/KeyDerivation.pm +++ b/lib/Crypt/KeyDerivation.pm @@ -2,7 +2,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; require Exporter; our @ISA = qw(Exporter); ### use Exporter 5.57 'import'; our %EXPORT_TAGS = ( all => [qw(pbkdf1 pbkdf2 hkdf hkdf_expand hkdf_extract)] ); diff --git a/lib/Crypt/Mac/BLAKE2b.pm b/lib/Crypt/Mac/BLAKE2b.pm index 7a2a104..732b161 100644 --- a/lib/Crypt/Mac/BLAKE2b.pm +++ b/lib/Crypt/Mac/BLAKE2b.pm @@ -4,7 +4,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; use base qw(Crypt::Mac Exporter); our %EXPORT_TAGS = ( all => [qw( blake2b blake2b_hex blake2b_b64 blake2b_b64u )] ); diff --git a/lib/Crypt/Mac/BLAKE2s.pm b/lib/Crypt/Mac/BLAKE2s.pm index 9f72b37..e9a2b4c 100644 --- a/lib/Crypt/Mac/BLAKE2s.pm +++ b/lib/Crypt/Mac/BLAKE2s.pm @@ -4,7 +4,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; use base qw(Crypt::Mac Exporter); our %EXPORT_TAGS = ( all => [qw( blake2s blake2s_hex blake2s_b64 blake2s_b64u )] ); diff --git a/lib/Crypt/Mac/F9.pm b/lib/Crypt/Mac/F9.pm index 185a7a3..338178a 100644 --- a/lib/Crypt/Mac/F9.pm +++ b/lib/Crypt/Mac/F9.pm @@ -4,7 +4,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; use base qw(Crypt::Mac Exporter); our %EXPORT_TAGS = ( all => [qw( f9 f9_hex f9_b64 f9_b64u )] ); diff --git a/lib/Crypt/Mac/HMAC.pm b/lib/Crypt/Mac/HMAC.pm index da8eb20..305bff2 100644 --- a/lib/Crypt/Mac/HMAC.pm +++ b/lib/Crypt/Mac/HMAC.pm @@ -4,7 +4,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; use base qw(Crypt::Mac Exporter); our %EXPORT_TAGS = ( all => [qw( hmac hmac_hex hmac_b64 hmac_b64u )] ); diff --git a/lib/Crypt/Mac/OMAC.pm b/lib/Crypt/Mac/OMAC.pm index 1f0ed63..a7fe4d6 100644 --- a/lib/Crypt/Mac/OMAC.pm +++ b/lib/Crypt/Mac/OMAC.pm @@ -4,7 +4,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; use base qw(Crypt::Mac Exporter); our %EXPORT_TAGS = ( all => [qw( omac omac_hex omac_b64 omac_b64u )] ); diff --git a/lib/Crypt/Mac/PMAC.pm b/lib/Crypt/Mac/PMAC.pm index 66c1dbd..b729a40 100644 --- a/lib/Crypt/Mac/PMAC.pm +++ b/lib/Crypt/Mac/PMAC.pm @@ -4,7 +4,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; use base qw(Crypt::Mac Exporter); our %EXPORT_TAGS = ( all => [qw( pmac pmac_hex pmac_b64 pmac_b64u )] ); diff --git a/lib/Crypt/Mac/Pelican.pm b/lib/Crypt/Mac/Pelican.pm index 3f190d1..90aff3c 100644 --- a/lib/Crypt/Mac/Pelican.pm +++ b/lib/Crypt/Mac/Pelican.pm @@ -4,7 +4,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; use base qw(Crypt::Mac Exporter); our %EXPORT_TAGS = ( all => [qw( pelican pelican_hex pelican_b64 pelican_b64u )] ); diff --git a/lib/Crypt/Mac/Poly1305.pm b/lib/Crypt/Mac/Poly1305.pm index 79664e8..96df968 100644 --- a/lib/Crypt/Mac/Poly1305.pm +++ b/lib/Crypt/Mac/Poly1305.pm @@ -4,7 +4,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; use base qw(Crypt::Mac Exporter); our %EXPORT_TAGS = ( all => [qw( poly1305 poly1305_hex poly1305_b64 poly1305_b64u )] ); diff --git a/lib/Crypt/Mac/XCBC.pm b/lib/Crypt/Mac/XCBC.pm index 1e764c0..06af159 100644 --- a/lib/Crypt/Mac/XCBC.pm +++ b/lib/Crypt/Mac/XCBC.pm @@ -4,7 +4,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; use base qw(Crypt::Mac Exporter); our %EXPORT_TAGS = ( all => [qw( xcbc xcbc_hex xcbc_b64 xcbc_b64u )] ); diff --git a/lib/Crypt/Mac.pm b/lib/Crypt/Mac.pm index 85d5075..fe9d5f9 100644 --- a/lib/Crypt/Mac.pm +++ b/lib/Crypt/Mac.pm @@ -2,7 +2,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; use Carp; $Carp::Internal{(__PACKAGE__)}++; diff --git a/lib/Crypt/Misc.pm b/lib/Crypt/Misc.pm index e4df149..14c0308 100644 --- a/lib/Crypt/Misc.pm +++ b/lib/Crypt/Misc.pm @@ -2,7 +2,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; require Exporter; our @ISA = qw(Exporter); ### use Exporter 5.57 'import'; use Carp 'croak'; diff --git a/lib/Crypt/Mode/CBC.pm b/lib/Crypt/Mode/CBC.pm index d9738d3..085dfd4 100644 --- a/lib/Crypt/Mode/CBC.pm +++ b/lib/Crypt/Mode/CBC.pm @@ -4,7 +4,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; use Crypt::Cipher; diff --git a/lib/Crypt/Mode/CFB.pm b/lib/Crypt/Mode/CFB.pm index ef02c20..51dcee1 100644 --- a/lib/Crypt/Mode/CFB.pm +++ b/lib/Crypt/Mode/CFB.pm @@ -4,7 +4,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; use Crypt::Cipher; diff --git a/lib/Crypt/Mode/CTR.pm b/lib/Crypt/Mode/CTR.pm index 40726cf..eb3d13f 100644 --- a/lib/Crypt/Mode/CTR.pm +++ b/lib/Crypt/Mode/CTR.pm @@ -4,7 +4,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; use Crypt::Cipher; diff --git a/lib/Crypt/Mode/ECB.pm b/lib/Crypt/Mode/ECB.pm index 7bddf25..b8aa0f8 100644 --- a/lib/Crypt/Mode/ECB.pm +++ b/lib/Crypt/Mode/ECB.pm @@ -4,7 +4,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; use Crypt::Cipher; diff --git a/lib/Crypt/Mode/OFB.pm b/lib/Crypt/Mode/OFB.pm index 1e7cddc..7abd0aa 100644 --- a/lib/Crypt/Mode/OFB.pm +++ b/lib/Crypt/Mode/OFB.pm @@ -4,7 +4,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; use Crypt::Cipher; diff --git a/lib/Crypt/Mode.pm b/lib/Crypt/Mode.pm index 1b4f5a7..743f515 100644 --- a/lib/Crypt/Mode.pm +++ b/lib/Crypt/Mode.pm @@ -2,7 +2,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; ### not used diff --git a/lib/Crypt/PK/DH.pm b/lib/Crypt/PK/DH.pm index 4b77d43..fd5c0a8 100644 --- a/lib/Crypt/PK/DH.pm +++ b/lib/Crypt/PK/DH.pm @@ -2,7 +2,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; require Exporter; our @ISA = qw(Exporter); ### use Exporter 5.57 'import'; our %EXPORT_TAGS = ( all => [qw( dh_shared_secret )] ); @@ -227,7 +227,9 @@ } elsif (ref $param eq 'SCALAR') { my $data = $$param; - $data = pem_to_der($data) if $data =~ /-----BEGIN DH PARAMETERS-----\s*(.+)\s*-----END DH PARAMETERS-----/s; + if ($data =~ /-----BEGIN DH PARAMETERS-----\s*(.+)\s*-----END DH PARAMETERS-----/s) { + $data = pem_to_der($data) or croak "FATAL: PEM/params decode failed"; + } return $self->_generate_key_dhparam($data); } elsif (ref $param eq 'HASH') { diff --git a/lib/Crypt/PK/DSA.pm b/lib/Crypt/PK/DSA.pm index f7df618..3445206 100644 --- a/lib/Crypt/PK/DSA.pm +++ b/lib/Crypt/PK/DSA.pm @@ -2,7 +2,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; require Exporter; our @ISA = qw(Exporter); ### use Exporter 5.57 'import'; our %EXPORT_TAGS = ( all => [qw( dsa_encrypt dsa_decrypt dsa_sign_message dsa_verify_message dsa_sign_hash dsa_verify_hash )] ); @@ -36,7 +36,9 @@ } elsif (@_ == 1 && ref $_[0] eq 'SCALAR') { my $data = ${$_[0]}; - $data = pem_to_der($data) if $data =~ /-----BEGIN DSA PARAMETERS-----\s*(.+)\s*-----END DSA PARAMETERS-----/s; + if ($data =~ /-----BEGIN DSA PARAMETERS-----\s*(.+)\s*-----END DSA PARAMETERS-----/s) { + $data = pem_to_der($data) or croak "FATAL: PEM/params decode failed"; + } return $self->_generate_key_dsaparam($data); } croak "FATAL: DSA generate_key - invalid args"; @@ -76,11 +78,11 @@ croak "FATAL: invalid key data" unless $data; if ($data =~ /-----BEGIN (DSA PRIVATE|DSA PUBLIC|PRIVATE|PUBLIC) KEY-----(.*?)-----END/sg) { - $data = pem_to_der($data, $password); + $data = pem_to_der($data, $password) or croak "FATAL: PEM/key decode failed"; return $self->_import($data); } elsif ($data =~ /---- BEGIN SSH2 PUBLIC KEY ----(.*?)---- END SSH2 PUBLIC KEY ----/sg) { - $data = pem_to_der($data); + $data = pem_to_der($data) or croak "FATAL: PEM/key decode failed"; my ($typ, $p, $q, $g, $y) = Crypt::PK::_ssh_parse($data); return $self->_import_hex(unpack('H*',$p), unpack('H*',$q), unpack('H*',$g), undef, unpack('H*',$y)) if $typ && $p && $q && $g && $y && $typ eq 'ssh-dss'; } diff --git a/lib/Crypt/PK/ECC.pm b/lib/Crypt/PK/ECC.pm index f320a42..dd8a664 100644 --- a/lib/Crypt/PK/ECC.pm +++ b/lib/Crypt/PK/ECC.pm @@ -2,7 +2,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; require Exporter; our @ISA = qw(Exporter); ### use Exporter 5.57 'import'; our %EXPORT_TAGS = ( all => [qw( ecc_encrypt ecc_decrypt ecc_sign_message ecc_verify_message ecc_sign_hash ecc_verify_hash ecc_shared_secret )] ); @@ -219,16 +219,16 @@ croak "FATAL: invalid key data" unless $data; if ($data =~ /-----BEGIN (EC PRIVATE|EC PUBLIC|PUBLIC) KEY-----(.*?)-----END/sg) { - $data = pem_to_der($data, $password); + $data = pem_to_der($data, $password) or croak "FATAL: PEM/key decode failed"; my $rv = eval { $self->_import($data) } || eval { $self->_import_old($data) }; return $rv if $rv; } elsif ($data =~ /-----BEGIN PRIVATE KEY-----(.*?)-----END/sg) { - $data = pem_to_der($data, $password); + $data = pem_to_der($data, $password) or croak "FATAL: PEM/key decode failed"; return $self->_import_pkcs8($data, $password); } elsif ($data =~ /-----BEGIN ENCRYPTED PRIVATE KEY-----(.*?)-----END/sg) { - $data = pem_to_der($data, $password); + $data = pem_to_der($data, $password) or croak "FATAL: PEM/key decode failed"; return $self->_import_pkcs8($data, $password); } elsif ($data =~ /^\s*(\{.*?\})\s*$/s) { @@ -244,11 +244,11 @@ } } elsif ($data =~ /-----BEGIN CERTIFICATE-----(.*?)-----END CERTIFICATE-----/sg) { - $data = pem_to_der($data); + $data = pem_to_der($data) or croak "FATAL: PEM/cert decode failed"; return $self->_import_x509($data); } elsif ($data =~ /---- BEGIN SSH2 PUBLIC KEY ----(.*?)---- END SSH2 PUBLIC KEY ----/sg) { - $data = pem_to_der($data); + $data = pem_to_der($data) or croak "FATAL: PEM/key decode failed"; my ($typ, $skip, $pubkey) = Crypt::PK::_ssh_parse($data); return $self->import_key_raw($pubkey, "$2") if $pubkey && $typ =~ /^ecdsa-(.+?)-(.*)$/; } diff --git a/lib/Crypt/PK/Ed25519.pm b/lib/Crypt/PK/Ed25519.pm index e28f899..dbff879 100644 --- a/lib/Crypt/PK/Ed25519.pm +++ b/lib/Crypt/PK/Ed25519.pm @@ -2,7 +2,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; require Exporter; our @ISA = qw(Exporter); ### use Exporter 5.57 'import'; our %EXPORT_TAGS = ( all => [qw( )] ); @@ -64,19 +64,19 @@ croak "FATAL: invalid key data" unless $data; if ($data =~ /-----BEGIN PUBLIC KEY-----(.*?)-----END/sg) { - $data = pem_to_der($data, $password); + $data = pem_to_der($data, $password) or croak "FATAL: PEM/key decode failed"; return $self->_import($data); } elsif ($data =~ /-----BEGIN PRIVATE KEY-----(.*?)-----END/sg) { - $data = pem_to_der($data, $password); + $data = pem_to_der($data, $password) or croak "FATAL: PEM/key decode failed"; return $self->_import_pkcs8($data, $password); } elsif ($data =~ /-----BEGIN ENCRYPTED PRIVATE KEY-----(.*?)-----END/sg) { - $data = pem_to_der($data, $password); + $data = pem_to_der($data, $password) or croak "FATAL: PEM/key decode failed"; return $self->_import_pkcs8($data, $password); } elsif ($data =~ /-----BEGIN ED25519 PRIVATE KEY-----(.*?)-----END/sg) { - $data = pem_to_der($data, $password); + $data = pem_to_der($data, $password) or croak "FATAL: PEM/key decode failed"; return $self->_import_pkcs8($data, $password); } elsif ($data =~ /^\s*(\{.*?\})\s*$/s) { # JSON @@ -87,7 +87,7 @@ } } elsif ($data =~ /-----BEGIN CERTIFICATE-----(.*?)-----END CERTIFICATE-----/sg) { - $data = pem_to_der($data); + $data = pem_to_der($data) or croak "FATAL: PEM/cert decode failed"; return $self->_import_x509($data); } elsif ($data =~ /-----BEGIN OPENSSH PRIVATE KEY-----(.*?)-----END/sg) { @@ -97,7 +97,7 @@ croak "FATAL: OPENSSH PRIVATE KEY not supported"; } elsif ($data =~ /---- BEGIN SSH2 PUBLIC KEY ----(.*?)---- END SSH2 PUBLIC KEY ----/sg) { - $data = pem_to_der($data); + $data = pem_to_der($data) or croak "FATAL: PEM/key decode failed"; my ($typ, $pubkey) = Crypt::PK::_ssh_parse($data); return $self->_import_raw($pubkey, 0) if $typ eq 'ssh-ed25519' && length($pubkey) == 32; } diff --git a/lib/Crypt/PK/RSA.pm b/lib/Crypt/PK/RSA.pm index cec73b7..4a00f0f 100644 --- a/lib/Crypt/PK/RSA.pm +++ b/lib/Crypt/PK/RSA.pm @@ -2,7 +2,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; require Exporter; our @ISA = qw(Exporter); ### use Exporter 5.57 'import'; our %EXPORT_TAGS = ( all => [qw(rsa_encrypt rsa_decrypt rsa_sign_message rsa_verify_message rsa_sign_hash rsa_verify_hash)] ); @@ -122,17 +122,17 @@ # PKCS#1 RSAPublicKey (PEM header: BEGIN RSA PUBLIC KEY) # PKCS#1 RSAPrivateKey (PEM header: BEGIN RSA PRIVATE KEY) # X.509 SubjectPublicKeyInfo (PEM header: BEGIN PUBLIC KEY) - $data = pem_to_der($data, $password); + $data = pem_to_der($data, $password) or croak "FATAL: PEM/key decode failed"; return $self->_import($data) if $data; } elsif ($data =~ /-----BEGIN PRIVATE KEY-----(.*?)-----END/sg) { # PKCS#8 PrivateKeyInfo (PEM header: BEGIN PRIVATE KEY) - $data = pem_to_der($data, $password); + $data = pem_to_der($data, $password) or croak "FATAL: PEM/key decode failed"; return $self->_import_pkcs8($data, $password); } elsif ($data =~ /-----BEGIN ENCRYPTED PRIVATE KEY-----(.*?)-----END/sg) { # PKCS#8 PrivateKeyInfo (PEM header: BEGIN ENCRYPTED PRIVATE KEY) - $data = pem_to_der($data, $password); + $data = pem_to_der($data, $password) or croak "FATAL: PEM/key decode failed"; return $self->_import_pkcs8($data, $password); } elsif ($data =~ /^\s*(\{.*?\})\s*$/s) { @@ -147,11 +147,11 @@ } } elsif ($data =~ /-----BEGIN CERTIFICATE-----(.*?)-----END CERTIFICATE-----/sg) { - $data = pem_to_der($data); + $data = pem_to_der($data) or croak "FATAL: PEM/cert decode failed"; return $self->_import_x509($data); } elsif ($data =~ /---- BEGIN SSH2 PUBLIC KEY ----(.*?)---- END SSH2 PUBLIC KEY ----/sg) { - $data = pem_to_der($data); + $data = pem_to_der($data) or croak "FATAL: PEM/key decode failed"; my ($typ, $N, $e) = Crypt::PK::_ssh_parse($data); return $self->_import_hex(unpack("H*", $e), unpack("H*", $N)) if $typ && $e && $N && $typ eq 'ssh-rsa'; } diff --git a/lib/Crypt/PK/X25519.pm b/lib/Crypt/PK/X25519.pm index 2c57806..7bb5990 100644 --- a/lib/Crypt/PK/X25519.pm +++ b/lib/Crypt/PK/X25519.pm @@ -2,7 +2,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; require Exporter; our @ISA = qw(Exporter); ### use Exporter 5.57 'import'; our %EXPORT_TAGS = ( all => [qw( )] ); @@ -64,19 +64,19 @@ croak "FATAL: invalid key data" unless $data; if ($data =~ /-----BEGIN PUBLIC KEY-----(.*?)-----END/sg) { - $data = pem_to_der($data, $password); + $data = pem_to_der($data, $password) or croak "FATAL: PEM/key decode failed"; return $self->_import($data); } elsif ($data =~ /-----BEGIN PRIVATE KEY-----(.*?)-----END/sg) { - $data = pem_to_der($data, $password); + $data = pem_to_der($data, $password) or croak "FATAL: PEM/key decode failed"; return $self->_import_pkcs8($data, $password); } elsif ($data =~ /-----BEGIN ENCRYPTED PRIVATE KEY-----(.*?)-----END/sg) { - $data = pem_to_der($data, $password); + $data = pem_to_der($data, $password) or croak "FATAL: PEM/key decode failed"; return $self->_import_pkcs8($data, $password); } elsif ($data =~ /-----BEGIN X25519 PRIVATE KEY-----(.*?)-----END/sg) { - $data = pem_to_der($data, $password); + $data = pem_to_der($data, $password) or croak "FATAL: PEM/key decode failed"; return $self->_import_pkcs8($data, $password); } elsif ($data =~ /^\s*(\{.*?\})\s*$/s) { # JSON diff --git a/lib/Crypt/PK.pm b/lib/Crypt/PK.pm index de962c0..55d444a 100644 --- a/lib/Crypt/PK.pm +++ b/lib/Crypt/PK.pm @@ -2,7 +2,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; use Carp; diff --git a/lib/Crypt/PRNG/ChaCha20.pm b/lib/Crypt/PRNG/ChaCha20.pm index f0dd691..3f3a6be 100644 --- a/lib/Crypt/PRNG/ChaCha20.pm +++ b/lib/Crypt/PRNG/ChaCha20.pm @@ -2,7 +2,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; use base qw(Crypt::PRNG Exporter); our %EXPORT_TAGS = ( all => [qw(random_bytes random_bytes_hex random_bytes_b64 random_bytes_b64u random_string random_string_from rand irand)] ); diff --git a/lib/Crypt/PRNG/Fortuna.pm b/lib/Crypt/PRNG/Fortuna.pm index 559cb4c..ebb8a1a 100644 --- a/lib/Crypt/PRNG/Fortuna.pm +++ b/lib/Crypt/PRNG/Fortuna.pm @@ -2,7 +2,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; use base qw(Crypt::PRNG Exporter); our %EXPORT_TAGS = ( all => [qw(random_bytes random_bytes_hex random_bytes_b64 random_bytes_b64u random_string random_string_from rand irand)] ); diff --git a/lib/Crypt/PRNG/RC4.pm b/lib/Crypt/PRNG/RC4.pm index b1b818e..1e59431 100644 --- a/lib/Crypt/PRNG/RC4.pm +++ b/lib/Crypt/PRNG/RC4.pm @@ -2,7 +2,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; use base qw(Crypt::PRNG Exporter); our %EXPORT_TAGS = ( all => [qw(random_bytes random_bytes_hex random_bytes_b64 random_bytes_b64u random_string random_string_from rand irand)] ); diff --git a/lib/Crypt/PRNG/Sober128.pm b/lib/Crypt/PRNG/Sober128.pm index 0fc5ae1..5b24f1b 100644 --- a/lib/Crypt/PRNG/Sober128.pm +++ b/lib/Crypt/PRNG/Sober128.pm @@ -2,7 +2,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; use base qw(Crypt::PRNG Exporter); our %EXPORT_TAGS = ( all => [qw(random_bytes random_bytes_hex random_bytes_b64 random_bytes_b64u random_string random_string_from rand irand)] ); diff --git a/lib/Crypt/PRNG/Yarrow.pm b/lib/Crypt/PRNG/Yarrow.pm index b502ce4..f111af1 100644 --- a/lib/Crypt/PRNG/Yarrow.pm +++ b/lib/Crypt/PRNG/Yarrow.pm @@ -2,7 +2,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; use base qw(Crypt::PRNG Exporter); our %EXPORT_TAGS = ( all => [qw(random_bytes random_bytes_hex random_bytes_b64 random_bytes_b64u random_string random_string_from rand irand)] ); diff --git a/lib/Crypt/PRNG.pm b/lib/Crypt/PRNG.pm index c30173a..94361c5 100644 --- a/lib/Crypt/PRNG.pm +++ b/lib/Crypt/PRNG.pm @@ -2,7 +2,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; require Exporter; our @ISA = qw(Exporter); ### use Exporter 5.57 'import'; our %EXPORT_TAGS = ( all => [qw(random_bytes random_bytes_hex random_bytes_b64 random_bytes_b64u random_string random_string_from rand irand)] ); diff --git a/lib/Crypt/Stream/ChaCha.pm b/lib/Crypt/Stream/ChaCha.pm index fc12da8..c57efed 100644 --- a/lib/Crypt/Stream/ChaCha.pm +++ b/lib/Crypt/Stream/ChaCha.pm @@ -2,7 +2,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; use CryptX; diff --git a/lib/Crypt/Stream/RC4.pm b/lib/Crypt/Stream/RC4.pm index cba8385..f0d3c32 100644 --- a/lib/Crypt/Stream/RC4.pm +++ b/lib/Crypt/Stream/RC4.pm @@ -2,7 +2,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; use CryptX; diff --git a/lib/Crypt/Stream/Rabbit.pm b/lib/Crypt/Stream/Rabbit.pm index 60cc972..4a01f19 100644 --- a/lib/Crypt/Stream/Rabbit.pm +++ b/lib/Crypt/Stream/Rabbit.pm @@ -2,7 +2,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; use CryptX; diff --git a/lib/Crypt/Stream/Salsa20.pm b/lib/Crypt/Stream/Salsa20.pm index ad88790..aa7a371 100644 --- a/lib/Crypt/Stream/Salsa20.pm +++ b/lib/Crypt/Stream/Salsa20.pm @@ -2,7 +2,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; use CryptX; diff --git a/lib/Crypt/Stream/Sober128.pm b/lib/Crypt/Stream/Sober128.pm index ec8a8fe..c76fa82 100644 --- a/lib/Crypt/Stream/Sober128.pm +++ b/lib/Crypt/Stream/Sober128.pm @@ -2,7 +2,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; use CryptX; diff --git a/lib/Crypt/Stream/Sosemanuk.pm b/lib/Crypt/Stream/Sosemanuk.pm index 8a87b17..7cb667d 100644 --- a/lib/Crypt/Stream/Sosemanuk.pm +++ b/lib/Crypt/Stream/Sosemanuk.pm @@ -2,7 +2,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; use CryptX; diff --git a/lib/CryptX.pm b/lib/CryptX.pm index d16431c..99b80fc 100644 --- a/lib/CryptX.pm +++ b/lib/CryptX.pm @@ -2,7 +2,7 @@ use strict; use warnings ; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; require XSLoader; XSLoader::load('CryptX', $VERSION); @@ -11,21 +11,7 @@ my $has_json; BEGIN { - if (eval { require Cpanel::JSON::XS }) { - Cpanel::JSON::XS->import(qw(encode_json decode_json)); - $has_json = 1; - } - elsif (eval { require JSON::XS }) { - JSON::XS->import(qw(encode_json decode_json)); - $has_json = 2; - } - elsif (eval { require JSON::PP }) { - JSON::PP->import(qw(encode_json decode_json)); - $has_json = 3; - } - else { - $has_json = 0; - } + $has_json = 1 if eval { require JSON; 1 }; } sub _croak { @@ -38,18 +24,13 @@ } sub _decode_json { - croak "FATAL: cannot find JSON::PP or JSON::XS or Cpanel::JSON::XS" if !$has_json; - decode_json(shift); + croak "FATAL: cannot find JSON module" if !$has_json; + return JSON->new->utf8->decode(shift); } sub _encode_json { - croak "FATAL: cannot find JSON::PP or JSON::XS or Cpanel::JSON::XS" if !$has_json; - my $data = shift; - my $rv = encode_json($data); # non-canonical fallback - return(eval { Cpanel::JSON::XS->new->canonical->encode($data) } || $rv) if $has_json == 1; - return(eval { JSON::XS->new->canonical->encode($data) } || $rv) if $has_json == 2; - return(eval { JSON::PP->new->canonical->encode($data) } || $rv) if $has_json == 3; - return($rv); + croak "FATAL: cannot find JSON module" if !$has_json; + return JSON->new->utf8->canonical->encode(shift); } 1; @@ -130,6 +111,6 @@ =head1 COPYRIGHT -Copyright (c) 2013-2020 DCIT, a.s. L / Karel Miko +Copyright (c) 2013-2021 DCIT, a.s. L / Karel Miko =cut diff --git a/lib/Math/BigInt/LTM.pm b/lib/Math/BigInt/LTM.pm index ebf71ca..cabb45a 100644 --- a/lib/Math/BigInt/LTM.pm +++ b/lib/Math/BigInt/LTM.pm @@ -2,7 +2,7 @@ use strict; use warnings; -our $VERSION = '0.070'; +our $VERSION = '0.073_001'; use CryptX; use Carp; diff --git a/src/ltc/encauth/ccm/ccm_add_nonce.c b/src/ltc/encauth/ccm/ccm_add_nonce.c index bda7441..a48d48d 100644 --- a/src/ltc/encauth/ccm/ccm_add_nonce.c +++ b/src/ltc/encauth/ccm/ccm_add_nonce.c @@ -25,6 +25,9 @@ if ((15 - ccm->noncelen) > ccm->L) { ccm->L = 15 - ccm->noncelen; } + if (ccm->L > 8) { + return CRYPT_INVALID_ARG; + } /* decrease noncelen to match L */ if ((ccm->noncelen + ccm->L) > 15) { @@ -38,7 +41,7 @@ (ccm->L-1)); /* nonce */ - for (y = 0; y < (16 - (ccm->L + 1)); y++) { + for (y = 0; y < 15 - ccm->L; y++) { ccm->PAD[x++] = nonce[y]; } diff --git a/src/ltc/encauth/ccm/ccm_init.c b/src/ltc/encauth/ccm/ccm_init.c index c98929e..527c6af 100644 --- a/src/ltc/encauth/ccm/ccm_init.c +++ b/src/ltc/encauth/ccm/ccm_init.c @@ -35,7 +35,7 @@ } /* make sure the taglen is valid */ - if (taglen < 4 || taglen > 16 || (taglen % 2) == 1) { + if (taglen < 4 || taglen > 16 || (taglen % 2) == 1 || aadlen < 0 || ptlen < 0) { return CRYPT_INVALID_ARG; } ccm->taglen = taglen; diff --git a/src/ltc/encauth/ccm/ccm_memory.c b/src/ltc/encauth/ccm/ccm_memory.c index d22c0fb..fdb5172 100644 --- a/src/ltc/encauth/ccm/ccm_memory.c +++ b/src/ltc/encauth/ccm/ccm_memory.c @@ -75,7 +75,7 @@ } /* make sure the taglen is valid */ - if (*taglen < 4 || *taglen > 16 || (*taglen % 2) == 1) { + if (*taglen < 4 || *taglen > 16 || (*taglen % 2) == 1 || headerlen > 0x7fffffffu) { return CRYPT_INVALID_ARG; } @@ -108,6 +108,9 @@ if ((15 - noncelen) > L) { L = 15 - noncelen; } + if (L > 8) { + return CRYPT_INVALID_ARG; + } /* allocate mem for the symmetric key */ if (uskey == NULL) { @@ -141,7 +144,7 @@ (L-1)); /* nonce */ - for (y = 0; y < (16 - (L + 1)); y++) { + for (y = 0; y < 15 - L; y++) { PAD[x++] = nonce[y]; } diff --git a/src/ltc/headers/tomcrypt_cfg.h b/src/ltc/headers/tomcrypt_cfg.h index 6392c54..994a084 100644 --- a/src/ltc/headers/tomcrypt_cfg.h +++ b/src/ltc/headers/tomcrypt_cfg.h @@ -105,7 +105,7 @@ #define ENDIAN_64BITWORD #if defined(_MIPSEB) || defined(__MIPSEB) || defined(__MIPSEB__) #define ENDIAN_BIG - #endif + #else #define ENDIAN_LITTLE #endif #endif @@ -182,7 +182,8 @@ defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ || \ defined(__BIG_ENDIAN__) || \ defined(__ARMEB__) || defined(__THUMBEB__) || defined(__AARCH64EB__) || \ - defined(_MIPSEB) || defined(__MIPSEB) || defined(__MIPSEB__) + defined(_MIPSEB) || defined(__MIPSEB) || defined(__MIPSEB__) || \ + defined(__m68k__) #define ENDIAN_BIG #elif defined(_BYTE_ORDER) && _BYTE_ORDER == _LITTLE_ENDIAN || \ defined(__BYTE_ORDER) && __BYTE_ORDER == __LITTLE_ENDIAN || \ @@ -286,6 +287,12 @@ #if !defined(LTC_NO_ROTATE) && (__has_builtin(__builtin_rotateleft32) && __has_builtin(__builtin_rotateright32)) #define LTC_HAVE_ROTATE_BUILTIN +#endif + +#if defined(__GNUC__) + #define LTC_ALIGN(n) __attribute__((aligned(n))) +#else + #define LTC_ALIGN(n) #endif #if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 405) @@ -303,3 +310,5 @@ # define LTC_DEPRECATED(s) # define LTC_DEPRECATED_PRAGMA(s) #endif + +#endif /* TOMCRYPT_CFG_H */ diff --git a/src/ltc/headers/tomcrypt_cipher.h b/src/ltc/headers/tomcrypt_cipher.h index 7d8d5ad..a3ba8f3 100644 --- a/src/ltc/headers/tomcrypt_cipher.h +++ b/src/ltc/headers/tomcrypt_cipher.h @@ -318,9 +318,9 @@ ctrlen; /** The counter */ - unsigned char ctr[MAXBLOCKSIZE], + unsigned char ctr[MAXBLOCKSIZE]; /** The pad used to encrypt/decrypt */ - pad[MAXBLOCKSIZE]; + unsigned char pad[MAXBLOCKSIZE] LTC_ALIGN(16); /** The scheduled key */ symmetric_key key; } symmetric_CTR; diff --git a/src/ltc/headers/tomcrypt_mac.h b/src/ltc/headers/tomcrypt_mac.h index 60ab1ac..549903c 100644 --- a/src/ltc/headers/tomcrypt_mac.h +++ b/src/ltc/headers/tomcrypt_mac.h @@ -395,7 +395,7 @@ typedef struct { symmetric_key K; int cipher, /* which cipher */ - taglen, /* length of the tag */ + taglen, /* length of the tag (encoded in M value) */ x; /* index in PAD */ unsigned long L, /* L value */ @@ -405,7 +405,7 @@ current_aadlen, /* length of the currently provided add */ noncelen; /* length of the nonce */ - unsigned char PAD[16], + unsigned char PAD[16], /* flags | Nonce N | l(m) */ ctr[16], CTRPAD[16], CTRlen; @@ -482,7 +482,7 @@ #ifdef LTC_GCM_TABLES unsigned char PC[16][256][16] /* 16 tables of 8x128 */ #ifdef LTC_GCM_TABLES_SSE2 -__attribute__ ((aligned (16))) +LTC_ALIGN(16) #endif ; #endif diff --git a/src/ltc/headers/tomcrypt_pk.h b/src/ltc/headers/tomcrypt_pk.h index 01b8126..a47fc68 100644 --- a/src/ltc/headers/tomcrypt_pk.h +++ b/src/ltc/headers/tomcrypt_pk.h @@ -384,11 +384,14 @@ #ifdef LTC_MDSA -/* Max diff between group and modulus size in bytes */ -#define LTC_MDSA_DELTA 512 - -/* Max DSA group size in bytes (default allows 4k-bit groups) */ -#define LTC_MDSA_MAX_GROUP 512 +/* Max diff between group and modulus size in bytes (max case: L=8192bits, N=256bits) */ +#define LTC_MDSA_DELTA 992 + +/* Max DSA group size in bytes */ +#define LTC_MDSA_MAX_GROUP 64 + +/* Max DSA modulus size in bytes (the actual DSA size, max 8192 bits) */ +#define LTC_MDSA_MAX_MODULUS 1024 /** DSA key structure */ typedef struct { diff --git a/src/ltc/misc/compare_testvector.c b/src/ltc/misc/compare_testvector.c index 3e0f6c4..bb3c8cb 100644 --- a/src/ltc/misc/compare_testvector.c +++ b/src/ltc/misc/compare_testvector.c @@ -64,12 +64,12 @@ } #if defined(LTC_TEST) && defined(LTC_TEST_DBG) if (res != 0) { - fprintf(stderr, "Testvector #%i of %s failed:\n", which, what); + fprintf(stderr, "Testvector #%i(0x%x) of %s failed:\n", which, which, what); s_print_hex("SHOULD", should, should_len); s_print_hex("IS ", is, is_len); #if LTC_TEST_DBG > 1 } else { - fprintf(stderr, "Testvector #%i of %s passed!\n", which, what); + fprintf(stderr, "Testvector #%i(0x%x) of %s passed!\n", which, which, what); #endif } #else diff --git a/src/ltc/misc/crypt/crypt_constants.c b/src/ltc/misc/crypt/crypt_constants.c index 9c1ed83..eac6dae 100644 --- a/src/ltc/misc/crypt/crypt_constants.c +++ b/src/ltc/misc/crypt/crypt_constants.c @@ -102,6 +102,7 @@ {"LTC_MDSA", 1}, C_STRINGIFY(LTC_MDSA_DELTA), C_STRINGIFY(LTC_MDSA_MAX_GROUP), + C_STRINGIFY(LTC_MDSA_MAX_MODULUS), #else {"LTC_MDSA", 0}, #endif diff --git a/src/ltc/pk/asn1/der/custom_type/der_decode_custom_type.c b/src/ltc/pk/asn1/der/custom_type/der_decode_custom_type.c index 978621f..4c4d52d 100644 --- a/src/ltc/pk/asn1/der/custom_type/der_decode_custom_type.c +++ b/src/ltc/pk/asn1/der/custom_type/der_decode_custom_type.c @@ -155,6 +155,22 @@ } switch (type) { + case LTC_ASN1_CUSTOM_TYPE: + case LTC_ASN1_SET: + case LTC_ASN1_SETOF: + case LTC_ASN1_SEQUENCE: + break; + default: + /* Verify that all basic types are indeed UNIVERSAL&PRIMITIVE */ + if (((flags & LTC_DER_SEQ_STRICT) == LTC_DER_SEQ_STRICT) && (inlen > 0)) { + if (in[x] & 0xE0u) { + err = CRYPT_PK_ASN1_ERROR; + goto LBL_ERR; + } + } + } + + switch (type) { case LTC_ASN1_BOOLEAN: z = inlen; if ((err = der_decode_boolean(in + x, z, ((int *)data))) != CRYPT_OK) { diff --git a/src/ltc/pk/dsa/dsa_generate_pqg.c b/src/ltc/pk/dsa/dsa_generate_pqg.c index af1b202..a2d5438 100644 --- a/src/ltc/pk/dsa/dsa_generate_pqg.c +++ b/src/ltc/pk/dsa/dsa_generate_pqg.c @@ -26,9 +26,10 @@ int err, res, mr_tests_q, mr_tests_p, found_p, found_q, hash; unsigned char *wbuf, *sbuf, digest[MAXBLOCKSIZE]; void *t2L1, *t2N1, *t2q, *t2seedlen, *U, *W, *X, *c, *h, *e, *seedinc; + const char *accepted_hashes[] = { "sha3-512", "sha512", "sha3-384", "sha384", "sha3-256", "sha256" }; /* check size */ - if (group_size >= LTC_MDSA_MAX_GROUP || group_size < 1 || group_size >= modulus_size) { + if (group_size > LTC_MDSA_MAX_GROUP || group_size < 1 || group_size >= modulus_size || modulus_size > LTC_MDSA_MAX_MODULUS) { return CRYPT_INVALID_ARG; } @@ -87,16 +88,15 @@ else { mr_tests_q = 64; } #endif - if (N <= 256) { - hash = register_hash(&sha256_desc); - } - else if (N <= 384) { - hash = register_hash(&sha384_desc); - } - else if (N <= 512) { - hash = register_hash(&sha512_desc); - } - else { + hash = -1; + for (i = 0; i < sizeof(accepted_hashes)/sizeof(accepted_hashes[0]); ++i) { + hash = find_hash(accepted_hashes[i]); + if (hash != -1) break; + } + if (hash == -1) { + return CRYPT_INVALID_ARG; /* no appropriate hash function found */ + } + if (N > hash_descriptor[hash].hashsize * 8) { return CRYPT_INVALID_ARG; /* group_size too big */ } diff --git a/t/jwk.t b/t/jwk.t index 1438520..d4ec8bb 100644 --- a/t/jwk.t +++ b/t/jwk.t @@ -2,7 +2,7 @@ use warnings; use Test::More; -plan skip_all => "No JSON::* module installed" unless eval { require JSON::PP } || eval { require JSON::XS } || eval { require Cpanel::JSON::XS }; +plan skip_all => "JSON module not installed" unless eval { require JSON }; plan tests => 97; use Crypt::PK::RSA; diff --git a/t/mbi_ltm_biglog.t b/t/mbi_ltm_biglog.t index 34ea355..ffc0cad 100644 --- a/t/mbi_ltm_biglog.t +++ b/t/mbi_ltm_biglog.t @@ -20,7 +20,7 @@ } use Math::BigFloat only => 'LTM'; -use Math::BigInt; +use Math::BigInt only => 'LTM'; my $cl = "Math::BigInt"; diff --git a/t/mbi_ltm_bigroot.t b/t/mbi_ltm_bigroot.t index f9d11df..225e450 100644 --- a/t/mbi_ltm_bigroot.t +++ b/t/mbi_ltm_bigroot.t @@ -17,7 +17,7 @@ } use Math::BigFloat only => 'LTM'; -use Math::BigInt; +use Math::BigInt only => 'LTM'; is (Math::BigInt->config()->{lib}, 'Math::BigInt::LTM', 'LTM loaded'); diff --git a/t/pk_ed25519.t b/t/pk_ed25519.t index b724af2..28368dc 100644 --- a/t/pk_ed25519.t +++ b/t/pk_ed25519.t @@ -1,6 +1,10 @@ use strict; use warnings; -use Test::More tests => 91; + +use Test::More; + +plan skip_all => "JSON module not installed" unless eval { require JSON }; +plan tests => 91; use Crypt::PK::Ed25519; use Crypt::Misc qw(read_rawfile); diff --git a/t/pk_rsa.t b/t/pk_rsa.t index 7e49a18..7583129 100644 --- a/t/pk_rsa.t +++ b/t/pk_rsa.t @@ -1,6 +1,6 @@ use strict; use warnings; -use Test::More tests => 49; +use Test::More tests => 52; use Crypt::PK::RSA qw(rsa_encrypt rsa_decrypt rsa_sign_message rsa_verify_message rsa_sign_hash rsa_verify_hash); @@ -112,3 +112,56 @@ ok($sig, 'rsa_sign_hash'); ok(rsa_verify_hash('t/data/cryptx_pub_rsa1.der', $sig, $hash, 'SHA1'), 'rsa_verify_hash'); } + +{ + ## https://github.com/DCIT/perl-CryptX/issues/69 + + # my $priv = Crypt::PK::RSA->new({ + # e => "03", + # N => "E932AC92252F585B3A80A4DD76A897C8B7652952FE788F6EC8DD640587A1EE5647670A8AD4C2BE0F9FA6E49C605ADF77B5174230". + # "AF7BD50E5D6D6D6D28CCF0A886A514CC72E51D209CC772A52EF419F6A953F3135929588EBE9B351FCA61CED78F346FE00DBB6306". + # "E5C2A4C6DFC3779AF85AB417371CF34D8387B9B30AE46D7A5FF5A655B8D8455F1B94AE736989D60A6F2FD5CADBFFBD504C5A756A". + # "2E6BB5CECC13BCA7503F6DF8B52ACE5C410997E98809DB4DC30D943DE4E812A47553DCE54844A78E36401D13F77DC650619FED88". + # "D8B3926E3D8E319C80C744779AC5D6ABE252896950917476ECE5E8FC27D5F053D6018D91B502C4787558A002B9283DA7", + # d => "009b771db6c374e59227006de8f9c5ba85cf98c63754505f9f30939803afc1498eda44b1b1e32c7eb51519edbd9591ea4fce0f81". + # "75ca528e09939e48f37088a07059c36332f74368c06884f718c9f8114f1b8d4cb790c63b09d46778bfdc41348fb4cd9feab3d242". + # "04992c6dd9ea824fbca591cd64cf68a233ad0526775c9848fafa31528177e1f8df9181a8b945081106fd58bd3d73799b229575c4". + # "f3b29101a03ee1f05472b3615784d9244ce0ed639c77e8e212ab52abddf4a928224b6b6f74b7114786dd6071bd9113d7870c6b52". + # "c0bc8b9c102cfe321dac357e030ed6c580040ca41c13d6b4967811807ef2a225983ea9f88d67faa42620f42a4f5bdbe03b", + # }); + # my $sig_hex = unpack("H*", $priv->sign_message('hello world!', 'SHA256', 'v1.5')); + + my $pub = Crypt::PK::RSA->new({ + e => "03", + N => "E932AC92252F585B3A80A4DD76A897C8B7652952FE788F6EC8DD640587A1EE5647670A8AD4C2BE0F9FA6E49C605ADF77B5174230". + "AF7BD50E5D6D6D6D28CCF0A886A514CC72E51D209CC772A52EF419F6A953F3135929588EBE9B351FCA61CED78F346FE00DBB6306". + "E5C2A4C6DFC3779AF85AB417371CF34D8387B9B30AE46D7A5FF5A655B8D8455F1B94AE736989D60A6F2FD5CADBFFBD504C5A756A". + "2E6BB5CECC13BCA7503F6DF8B52ACE5C410997E98809DB4DC30D943DE4E812A47553DCE54844A78E36401D13F77DC650619FED88". + "D8B3926E3D8E319C80C744779AC5D6ABE252896950917476ECE5E8FC27D5F053D6018D91B502C4787558A002B9283DA7", + }); + + my $sig1 = pack("H*", "8df69d774c6ac8b5f8aa16576ca37a4f948706c5daecb3c15cfd247a7657616b2bbb786b50158cac8c23e3". + "289d300d3fbb82380b8746d929df36bdaf43a5fc5d1d04c61c98d47c22de02d051be3ba9e42b1c47aa5192". + "66d4cae244e5ce99b24771a13a7c8c7b08868a3eccf70b4bc7570d5131a1ac8943d91b0151c39da2ad75cd". + "1b9a697d100eef6747217df581b272cfd1f549a901ff4951036a4eb28fd2ea1e9df3fa9fa457663f4259be". + "8e5f2f2fb84f831a0ca5320e2b79f04a17830f43062c4c8fc0d0b1ff90567f3342d524f682ca26661caadf". + "4272f2585e6013a92bfa68de72fe6174096890e4296aedd72da43aa508007df53fb852bd7162ab635b"); + + my $sig2 = pack("H*", "1ee08947536e6b11d8923c3b00061d26a6933b5345077ea0214fdcbcc1ad68395008ff709117047e6b01dd". + "2a371dfa032c0732abc86ab2e0273bbd0dfe6b1c769e21bb9079982801d8f72e01be3244959312ab09bb8f". + "88572dc23216719b9810c73edf826749604feb8da1345f83f0209271aca462c1235b4cb4ba538f85a9c03d". + "d1dde1856fe73fd86b95566df2dfe8b0895c34489b97e02c8e48dabad7067619edec6267a776fa416fbcac". + "0fcacf3efa7852ce33ed63a9149c685c303d98c3dc37ee87521bc5b130377345fc95c87aa48505470deaf6". + "fb1064df041e3f03322b1ec90d3608deb17bf77f47066ecc6c511bfba69eed6da42881dcce603fcb2a"); + + my $sig3 = pack("H*", "02364fdabb83d98118fe3d3bb86866038de4dc6e569f59fd6dc0360d3785e7fbded2f5a4c6d87052aeab25". + "c451a91f8dccbc0d6db3b59ddd57368180091183369221b67a399a96ca5d318a908575462fe42d1aabba27". + "7b7b5bb2aae43567ecd671dfc1d8b935c7dc06d0058a45dadabfc21b1cbae3cb719f3bca8b1365576e2eb9". + "54cba048beba174e515a919148ac4a9ae3505b3a8ad6326b63757d1dd59a9f83df60bb295b32d90053b016". + "b4cd2745eb29f12a2aad86c05f04ebd3cca3a8c63c752ccad07d7fd4e6e2adab4f353efbda04a6b5b7f4a6". + "d540c085e7ddc90f1665adb048dfc707eac2db28246e1bffe53f115a02f7c74defccafa7213cb22245"); + + is($pub->verify_message($sig1, 'hello world!', 'SHA256', 'v1.5'), 0, "github issue 69 - invalid signature/1"); + is($pub->verify_message($sig2, 'hello world!', 'SHA256', 'v1.5'), 0, "github issue 69 - invalid signature/2"); + is($pub->verify_message($sig3, 'hello world!', 'SHA256', 'v1.5'), 1, "github issue 69 - valid signature/3"); +} diff --git a/t/pk_x25519.t b/t/pk_x25519.t index fd762b1..24e0d55 100644 --- a/t/pk_x25519.t +++ b/t/pk_x25519.t @@ -1,6 +1,10 @@ use strict; use warnings; -use Test::More tests => 69; + +use Test::More; + +plan skip_all => "JSON module not installed" unless eval { require JSON }; +plan tests => 69; use Crypt::PK::X25519; use Crypt::Misc qw(read_rawfile);