Hi Abdelkrim,
You are not creating a valid PEM-encoded key in this way.
You could instead:
* Use scrypt() to derive a secret seed from the password taken from
the input (as opposed to a single round of hash, which is not secure
against dictionary attacks)
* Create a PRNG using Hash.SHAKE128 (for instance) and passing the
seed from the previous step. As an example, see the function
get_fixed_prng() in test_import_ECC.py
* Generate the key using ECC.generate() and the parameter "randfunc"
set to the PRNG created in the previous step
The result is an ECC key pair that depends only on the password.
It also means that the ECC key pair will not be more secure than the
password you choose of course...
H.E.
> --
> You received this message because you are subscribed to the Google Groups
> "PyCryptodome" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
pycryptodome...@googlegroups.com.
> To post to this group, send email to
pycryp...@googlegroups.com.
> For more options, visit
https://groups.google.com/d/optout.