Migrated from: https://gitlab.com/m2crypto/m2crypto/-/issues/316
Created by: Dr-Noob (@Dr-Noob)
Created at: 2022-05-27T22:30:41.866Z
I'm running a program that uses M2Crypto under the hood. The program fails with the Elliptic curve sect233k1 is not available on this system
error message.
The strange thing is that the sect233k1 curve is available in my system:
[noob@server test]$ openssl ecparam -list_curves | grep sect233k1
I also tried calling M2Crypto directly to see the list of supported curves:
def gen_params(curve):
print(m2.ec_get_builtin_curves())
...
And I got:
[noob@server test]$ python2.7 test.py
({'comment': 'NIST/SECG curve over a 224 bit prime field', 'sname': 'secp224r1', 'NID': 713}, {'comment': 'SECG curve over a 256 bit prime field', 'sname': 'secp256k1', 'NID': 714}, {'comment': 'NIST/SECG curve over a 384 bit prime field', 'sname': 'secp384r1', 'NID': 715}, {'comment': 'NIST/SECG curve over a 521 bit prime field', 'sname': 'secp521r1', 'NID': 716}, {'comment': 'X9.62/SECG curve over a 256 bit prime field', 'sname': 'prime256v1', 'NID': 415})
Traceback (most recent call last):
File "test.py", line 14, in <module>
init()
File "test.py", line 11, in init
generate_keypair()
File "test.py", line 6, in generate_keypair
ec_keypair = EC.gen_params(keypair_ecc_curve)
File "/home/noob/test/M2Crypto/EC.py", line 340, in gen_params
m2.obj_nid2sn(curve)
AssertionError: Elliptic curve sect233k1 is not available on this system.
which shows a list of curves way shorter than what openssl ecparam -list_curves
reports. Any idea of what's happening?
On 2023-03-08T12:01:52.891Z, Matěj Cepl wrote:
This seems like a result of badly fixed #290.