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

openssl dgst -sha256 -binary #7

Open
alexanderkent opened this issue Nov 14, 2014 · 1 comment
Open

openssl dgst -sha256 -binary #7

alexanderkent opened this issue Nov 14, 2014 · 1 comment

Comments

@alexanderkent
Copy link

Useful tool but wouldn't it be better do it inline instead of input redirection? Perhaps something like RIPEMD160(SHA256(s, 65, 0), SHA256_DIGEST_LENGTH, rmd + 1) to encode the coin using openssl headers.

@matja
Copy link
Owner

matja commented Nov 28, 2014

I meant the example on the main page of echo'ing a string through openssl dgst -sha256 -binary as a means for creating a private key, to purely be a simple functional example of using the output of an external program for the private key data, rather than an actual recommendation of how to invoke bitcoin-tool in order to create private keys.

I agree that if this was a common method of invoking bitcoin-tool then it would be better (more efficient) to do the SHA256 hash inside bitcoin-tool itself rather than in a subshell, but I want to follow the Unix philosophy of separating the tasks of Bitcoin and hashing into separate programs (bitcoin-tool and openssl in that example), especially because I think it would be better practice to use either purely random data or output from a key derivation function such as scrypt.

If anything I believe that the example should be removed and replaced with a simple and secure example which can be used in typical usage, rather than the rather theoretical example as it stands now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants