mirror of
https://github.com/bitcoinbook/bitcoinbook
synced 2025-01-09 07:10:56 +00:00
Edited ch04.asciidoc with Atlas code editor
This commit is contained in:
parent
ee3d231ba8
commit
f7500790e1
@ -524,7 +524,7 @@ If a bitcoin wallet is able to implement compressed public keys, it will use tho
|
||||
|
||||
=== Implementing Keys and Addresses in Python
|
||||
|
||||
The most comprehensive bitcoin library in Python is https://github.com/vbuterin/pybitcointools[pybitcointools] by Vitalik Buterin. In <<key-to-address_script>>, we use the pybitcointools library (imported as "bitcoin") to generate and display keys and addresses in various formats.
|
||||
((("keys and addresses", "implementing in Python", id="KApython04")))((("pybitcointools")))The most comprehensive bitcoin library in Python is https://github.com/vbuterin/pybitcointools[pybitcointools] by Vitalik Buterin. In <<key-to-address_script>>, we use the pybitcointools library (imported as "bitcoin") to generate and display keys and addresses in various formats.
|
||||
|
||||
[[key-to-address_script]]
|
||||
.Key and address generation and formatting with the pybitcointools library
|
||||
@ -585,7 +585,7 @@ include::code/ec-math.py[]
|
||||
|
||||
[NOTE]
|
||||
====
|
||||
<<ec_math>> uses +os.urandom+, which reflects a cryptographically secure random number generator (CSRNG) provided by the underlying operating system. In the case of an Unix-like operating system such as Linux, it draws from +/dev/urandom+; and in the case of Windows, calls +CryptGenRandom()+. If a suitable randomness source is not found, +NotImplementedError+ will be raised. While the random number generator used here is for demonstration purposes, it is _not_ appropriate for generating production-quality bitcoin keys as it is not implemented with sufficient security.
|
||||
<<ec_math>> uses +os.urandom+, which reflects a cryptographically secure random number generator (CSRNG) provided by the underlying operating system. In the case of an Unix-like operating system such as Linux, it draws from +/dev/urandom+; and in the case of Windows, calls +CryptGenRandom()+. If a suitable randomness source is not found, +NotImplementedError+ will be raised. While the random number generator used here is for demonstration purposes, it is _not_ appropriate for generating production-quality bitcoin keys as it is not implemented with sufficient security.((("", startref="KApython04")))
|
||||
====
|
||||
|
||||
[[ec_math_run]]
|
||||
|
Loading…
Reference in New Issue
Block a user