Depending on how the ec key gets created or imported key2hash() returns the curve_name property either in lower- or uppercase.
The value is lowercase if the curve parameters are imported or set by the user and uppercase if the name is directly returned from libtomcrypt.
Since generate_key() expects the name in lowercase, we convert the value to lowercase as well.
As a sideeffect this also avoids unneccessary curve parameter lookups in Crypt::PK::ECC::_curve_name_lookup().
Depending on how the ec key gets created or imported
key2hash()
returns thecurve_name
property either in lower- or uppercase. The value is lowercase if the curve parameters are imported or set by the user and uppercase if the name is directly returned from libtomcrypt.Since
generate_key()
expects the name in lowercase, we convert the value to lowercase as well. As a sideeffect this also avoids unneccessary curve parameter lookups inCrypt::PK::ECC::_curve_name_lookup()
.