mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-04-19 00:29:03 +00:00
fixup! refactor(python): implement anti-exfil protocol helper functions
This commit is contained in:
parent
767774f479
commit
5176d5950c
@ -1,3 +1,4 @@
|
||||
import secrets
|
||||
from dataclasses import dataclass
|
||||
from hashlib import sha256
|
||||
from typing import Optional
|
||||
@ -13,9 +14,7 @@ class AntiExfilSignature:
|
||||
|
||||
|
||||
def generate_entropy() -> bytes:
|
||||
import os
|
||||
|
||||
return os.urandom(32)
|
||||
return secrets.token_bytes(32)
|
||||
|
||||
|
||||
def sha256_data(message: bytes) -> bytes:
|
||||
|
Loading…
Reference in New Issue
Block a user