mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-15 19:08:07 +00:00
core/webauthn: Generate random part of U2F key handles with uniform distribution.
This commit is contained in:
parent
5020ae9757
commit
26193245d4
@ -220,7 +220,7 @@ class U2fCredential(Credential):
|
||||
|
||||
def generate_key_handle(self) -> None:
|
||||
# derivation path is m/U2F'/r'/r'/r'/r'/r'/r'/r'/r'
|
||||
path = [HARDENED | random.uniform(0xF0000000) for _ in range(0, 8)]
|
||||
path = [HARDENED | random.uniform(0x80000000) for _ in range(0, 8)]
|
||||
nodepath = [_U2F_KEY_PATH] + path
|
||||
|
||||
# prepare signing key from random path, compute decompressed public key
|
||||
|
Loading…
Reference in New Issue
Block a user