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/optiga.pyi

34 lines
799 B

from typing import *
# extmod/modtrezorcrypto/modtrezorcrypto-optiga.h
class OptigaError(Exception):
"""Error returned by the Optiga chip."""
# extmod/modtrezorcrypto/modtrezorcrypto-optiga.h
class SigningInaccessible(OptigaError):
"""The signing key is inaccessible.
Typically, this will happen after the bootloader has been unlocked.
"""
# extmod/modtrezorcrypto/modtrezorcrypto-optiga.h
def get_certificate(cert_index: int) -> bytes:
"""
Return the certificate stored at the given index.
"""
# extmod/modtrezorcrypto/modtrezorcrypto-optiga.h
def sign(
key_index: int,
digest: bytes,
) -> bytes:
"""
Uses the private key at key_index to produce a DER-encoded signature of
the digest.
"""
DEVICE_CERT_INDEX: int
DEVICE_ECC_KEY_INDEX: int