Add range safety check to EllipticCurveKey.