Legrandin / pycryptodome

A self-contained cryptographic library for Python
https://www.pycryptodome.org
Other
2.74k stars 492 forks source link

Make PKCS8.wrap() parameters available when exporting keypair to PEM (feature request) #791

Closed pakal closed 6 months ago

pakal commented 6 months ago

Accessing parameters like prot_params["iteration_count"] of PKCS8 would be useful to increase them (eg. 1 million rounds instead of 1000 by default for PBKDF2).

For now, helpers like RSA.export_key() do not allow to override the defaults of PKCS8.wrap() farther down the toolchain.

Legrandin commented 6 months ago

This was fixed in v3.20.0.

See for instance the example here: https://www.pycryptodome.org/src/examples#generate-an-rsa-key