I am attempting to generate a public/private elliptic curve key pair in python using hazmat in cryptography. Below is the current code that I have. When I run, it is generating the error 'NoneType' object has no attribute 'generate_elliptic_curve_private_key'
ecurve = asymmetric.ec.EllipticCurve
ecurve.name = 'secp256r1'
ecurve.key_size = 128
ec_backend = cryptography.hazmat.backends.interfaces.EllipticCurveBackend.generate_elliptic_curve_private_key(cryptography.hazmat.backends.interfaces.EllipticCurveBackend, ecurve)
key = asymmetric.ec.generate_private_key(curve=ecurve, backend=ec_backend)
Here is the documentation https://cryptography.io/en/latest/hazmat/primitives/asymmetric/ec/#