Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PrivateKey generation from entropy #31

Open
SimoneBronzini opened this issue Mar 24, 2018 · 4 comments
Open

PrivateKey generation from entropy #31

SimoneBronzini opened this issue Mar 24, 2018 · 4 comments
Labels
Good first issue Issues that are easy to get started with. Ideal for beginners to dive into the code base. hacktoberfest Contribute to our project and win prizes! https://hacktoberfest.digitalocean.com/ help wanted

Comments

@SimoneBronzini
Copy link
Contributor

It would be useful to have a way to generate PrivateKeys (and their extended version) from a secure source of entropy.

@SimoneBronzini SimoneBronzini changed the title PrivateKey generation from entropy PrivateKey generation from entropy Mar 24, 2018
@peerchemist
Copy link
Contributor

Python 3.6 introduces secrets module which can be used for this: https://docs.python.org/3/library/secrets.html

@SimoneBronzini SimoneBronzini added the Good first issue Issues that are easy to get started with. Ideal for beginners to dive into the code base. label May 15, 2018
@SimoneBronzini SimoneBronzini added the hacktoberfest Contribute to our project and win prizes! https://hacktoberfest.digitalocean.com/ label Oct 9, 2018
@csyhuang
Copy link

csyhuang commented Oct 3, 2020

I'm interested in helping. To satisfy the requirement, am I supposed to modify the PrivateKey class:
https://github.com/chainside/btcpy/blob/7e95e9e43be0506f165381ae85f16705e616ff9f/btcpy/structs/crypto.py
Would you mind defining the class more precisely? Thanks! 🙂

@SimoneBronzini
Copy link
Contributor Author

Thanks for your interest in our project! The right way to do it I believe would be creating a @staticmethod in the PrivateKey class called generate that creates a PrivateKey using python's secrets standard module. If you have any further doubts please let me know.

@csyhuang
Copy link

csyhuang commented Oct 5, 2020

@SimoneBronzini Thanks! I've submitted a pull request #59 with this new function. Let me know if there are more things to add. 🙂 If you approve my pull request, may you label it as hacktoberfest-accepted? I'm participating in the HacktoberFest and wish this can be counted. Thanks in advance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Good first issue Issues that are easy to get started with. Ideal for beginners to dive into the code base. hacktoberfest Contribute to our project and win prizes! https://hacktoberfest.digitalocean.com/ help wanted
Projects
None yet
Development

No branches or pull requests

3 participants