You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
trezor-firmware/core/mocks/generated/trezorcrypto/bip340.pyi

41 lines
980 B

from typing import *
def generate_secret() -> bytes:
"""
Generate secret key.
"""
def publickey(secret_key: bytes) -> bytes:
"""
Computes public key from secret key.
"""
def sign(
secret_key: bytes,
digest: bytes,
) -> bytes:
"""
Uses secret key to produce the signature of the digest.
"""
def verify_publickey(public_key: bytes) -> bool:
"""
Verifies whether the public key is valid.
Returns True on success.
"""
def verify(public_key: bytes, signature: bytes, digest: bytes) -> bool:
"""
Uses public key to verify the signature of the digest.
Returns True on success.
"""
def tweak_public_key(
public_key: bytes,
root_hash: bytes | None = None,
) -> bytes:
"""
Tweaks the public key with the specified root_hash.
"""
def tweak_secret_key(
secret_key: bytes,
root_hash: bytes | None = None,
) -> bytes:
"""
Tweaks the secret key with the specified root_hash.
"""