Crypto.add_user_random(): increase dfl osrand_bytes to 32
This commit is contained in:
parent
9672837cfb
commit
320edd4b0e
4 changed files with 4 additions and 4 deletions
|
|
@ -305,6 +305,7 @@ class Crypto:
|
|||
|
||||
return self.add_user_random(
|
||||
rand_bytes = os_rand,
|
||||
osrand_bytes = 8, # we’ve already gathered OS entropy, so reduce
|
||||
desc = 'from your operating system')
|
||||
|
||||
def add_user_random(
|
||||
|
|
@ -312,7 +313,7 @@ class Crypto:
|
|||
rand_bytes,
|
||||
*,
|
||||
desc,
|
||||
osrand_bytes = 8,
|
||||
osrand_bytes = 32,
|
||||
urand = {'data': b'', 'counter': 0}):
|
||||
|
||||
assert type(rand_bytes) is bytes, 'add_user_random_chk1'
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
16.2.dev6
|
||||
16.2.dev7
|
||||
|
|
|
|||
|
|
@ -59,7 +59,6 @@ class wallet(wallet):
|
|||
from ..crypto import Crypto
|
||||
seed_bytes = Crypto(self.cfg).add_user_random(
|
||||
rand_bytes = seed_bytes,
|
||||
osrand_bytes = 32,
|
||||
desc = 'gathered from your die rolls')
|
||||
self.desc += ' plus OS and user-supplied entropy'
|
||||
msg('')
|
||||
|
|
|
|||
|
|
@ -11,5 +11,5 @@ if overlay_fake_os.getenv('MMGEN_TEST_SUITE_DETERMINISTIC'):
|
|||
Crypto.get_random = lambda self, length: overlay_fake_urandom(
|
||||
len(overlay_fake_get_random_orig(self, length)))
|
||||
|
||||
Crypto.add_user_random = lambda self, rand_bytes, *, desc, osrand_bytes=8: overlay_fake_urandom(
|
||||
Crypto.add_user_random = lambda self, rand_bytes, *, desc, osrand_bytes=32: overlay_fake_urandom(
|
||||
len(overlay_fake_add_user_random_orig(self, rand_bytes, desc=desc, osrand_bytes=osrand_bytes)))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue