private static function getNistName($curve)
{
switch ($curve) {
case 'P-256':
return NistCurve::NAME_P256;
case 'P-384':
return NistCurve::NAME_P384;
case 'P-521':
return NistCurve::NAME_P521;
default:
throw new \InvalidArgumentException(sprintf('The curve "%s" is not supported.', $curve));
}
}