mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-04-19 00:29:03 +00:00
style(python): use explicit keyword arguments
This commit is contained in:
parent
c0660ef34e
commit
cc188f31d4
@ -249,11 +249,11 @@ def get_ownership_proof_common(
|
||||
|
||||
# This function verifies that the signature includes the host's entropy and that its s value is less than half of the curve's order. However, it does not verify the signature itself, as trezorlib doesn't have the digest. The verification of the signature is the caller's responsibility.
|
||||
if not verify(
|
||||
None,
|
||||
res.signature,
|
||||
None,
|
||||
entropy,
|
||||
nonce_commitment,
|
||||
public_key=None,
|
||||
signature=res.signature,
|
||||
digest=None,
|
||||
entropy=entropy,
|
||||
nonce_commitment=nonce_commitment,
|
||||
):
|
||||
# This is a violation of the anti-exfil protocol.
|
||||
raise ValueError("Invalid signature")
|
||||
@ -485,11 +485,11 @@ def sign_tx_common(
|
||||
)
|
||||
# This function verifies that the signature includes the host's entropy and that its s value is less than half of the curve's order. However, it does not verify the signature itself, as trezorlib doesn't have the digest. The verification of the signature is the caller's responsibility.
|
||||
if not verify(
|
||||
None,
|
||||
sig,
|
||||
None,
|
||||
entropy_list[idx],
|
||||
nonce_commitment,
|
||||
public_key=None,
|
||||
signature=sig,
|
||||
digest=None,
|
||||
entropy=entropy_list[idx],
|
||||
nonce_commitment=nonce_commitment,
|
||||
):
|
||||
# This is a violation of the anti-exfil protocol.
|
||||
raise ValueError(f"Invalid signature for index {idx}")
|
||||
|
@ -268,11 +268,11 @@ def sign_tx_common(
|
||||
|
||||
# This function verifies that the signature includes the host's entropy and that its s value is less than half of the curve's order. However, it does not verify the signature itself, as trezorlib doesn't have the digest. The verification of the signature is the caller's responsibility.
|
||||
if nonce_commitment is None or not verify(
|
||||
None,
|
||||
response.signature_r + response.signature_s,
|
||||
None,
|
||||
entropy,
|
||||
nonce_commitment,
|
||||
public_key=None,
|
||||
signature=response.signature_r + response.signature_s,
|
||||
digest=None,
|
||||
entropy=entropy,
|
||||
nonce_commitment=nonce_commitment,
|
||||
):
|
||||
# This is a violation of the anti-exfil protocol.
|
||||
raise exceptions.TrezorException("Invalid signature")
|
||||
@ -446,11 +446,11 @@ def sign_tx_eip1559_common(
|
||||
|
||||
# This function verifies that the signature includes the host's entropy and that its s value is less than half of the curve's order. However, it does not verify the signature itself, as trezorlib doesn't have the digest. The verification of the signature is the caller's responsibility.
|
||||
if nonce_commitment is None or not verify(
|
||||
None,
|
||||
response.signature_r + response.signature_s,
|
||||
None,
|
||||
entropy,
|
||||
nonce_commitment,
|
||||
public_key=None,
|
||||
signature=response.signature_r + response.signature_s,
|
||||
digest=None,
|
||||
entropy=entropy,
|
||||
nonce_commitment=nonce_commitment,
|
||||
):
|
||||
# This is a violation of the anti-exfil protocol.
|
||||
raise exceptions.TrezorException("Invalid signature")
|
||||
|
Loading…
Reference in New Issue
Block a user