Security Advisories (2)
CVE-2020-17478 (2020-08-10)

ECDSA/EC/Point.pm in Crypt::Perl before 0.33 does not properly consider timing attacks against the EC point multiplication algorithm.

CVE-2020-13895 (2020-06-07)

Crypt::Perl::ECDSA in the Crypt::Perl (aka p5-Crypt-Perl) module before 0.32 for Perl fails to verify correct ECDSA signatures when r and s are small and when s = 1. This happens when using the curve secp256r1 (prime256v1). This could conceivably have a security-relevant impact if an attacker wishes to use public r and s values when guessing whether signature verification will fail.

NAME

Crypt::Perl::Ed25519::PrivateKey

SYNOPSIS

my $new_key = Crypt::Perl::Ed25519::PrivateKey->new();

# The passed-in string should contain ONLY the private pieces.
my $import_key = Crypt::Perl::Ed25519::PrivateKey->new( $priv_str );

# … or do this if you’ve got the public component:
$import_key = Crypt::Perl::Ed25519::PrivateKey->new( $priv_str, $pub_str );

# Returns an octet string
my $signature = $key->sign( $message );

$key->verify( $message, $signature ) or die "Invalid sig for msg!";

#----------------------------------------------------------------------

# These return an octet string.
my $pub_str = $key->get_public();
my $priv_str = $key->get_private();

# Returns an object
my $pub_obj = $key->get_public_key();

# These return a hash reference, NOT a JSON string.
my $priv_hr = $key->get_struct_for_private_jwk();
my $pub_hr  = $key->get_struct_for_public_jwk();

DESCRIPTION

This class implements Ed25519 signing and verification.