mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-22 14:28:07 +00:00
trezor.crypto: regenerate documentation mocks
This commit is contained in:
parent
6e658ff2f1
commit
2ede564cbd
@ -47,6 +47,12 @@ def chain_code() -> bytes:
|
||||
Returns a chain code of the HD node.
|
||||
'''
|
||||
|
||||
# ../extmod/modtrezorcrypto/modtrezorcrypto-bip32.h
|
||||
def private_key() -> bytes:
|
||||
'''
|
||||
Returns a private key of the HD node.
|
||||
'''
|
||||
|
||||
# ../extmod/modtrezorcrypto/modtrezorcrypto-bip32.h
|
||||
def public_key() -> bytes:
|
||||
'''
|
||||
@ -54,7 +60,7 @@ def public_key() -> bytes:
|
||||
'''
|
||||
|
||||
# ../extmod/modtrezorcrypto/modtrezorcrypto-bip32.h
|
||||
def private_key() -> bytes:
|
||||
def address(version: int) -> str:
|
||||
'''
|
||||
Returns a private key of the HD node.
|
||||
Compute a base58-encoded address string from the HD node.
|
||||
'''
|
||||
|
19
mocks/trezor/crypto/curve/curve25519.py
Normal file
19
mocks/trezor/crypto/curve/curve25519.py
Normal file
@ -0,0 +1,19 @@
|
||||
|
||||
# ../extmod/modtrezorcrypto/modtrezorcrypto-curve25519.h
|
||||
def generate_secret() -> bytes:
|
||||
'''
|
||||
Generate secret key.
|
||||
'''
|
||||
|
||||
# ../extmod/modtrezorcrypto/modtrezorcrypto-curve25519.h
|
||||
def publickey(secret_key: bytes) -> bytes:
|
||||
'''
|
||||
Computes public key from secret key.
|
||||
'''
|
||||
|
||||
# ../extmod/modtrezorcrypto/modtrezorcrypto-curve25519.h
|
||||
def multiply(secret_key: bytes, public_key: bytes) -> bytes:
|
||||
'''
|
||||
Multiplies point defined by public_key with scalar defined by secret_key
|
||||
Useful for ECDH
|
||||
'''
|
@ -1,4 +1,10 @@
|
||||
|
||||
# ../extmod/modtrezorcrypto/modtrezorcrypto-ed25519.h
|
||||
def generate_secret() -> bytes:
|
||||
'''
|
||||
Generate secret key.
|
||||
'''
|
||||
|
||||
# ../extmod/modtrezorcrypto/modtrezorcrypto-ed25519.h
|
||||
def publickey(secret_key: bytes) -> bytes:
|
||||
'''
|
||||
|
@ -1,4 +1,10 @@
|
||||
|
||||
# ../extmod/modtrezorcrypto/modtrezorcrypto-nist256p1.h
|
||||
def generate_secret() -> bytes:
|
||||
'''
|
||||
Generate secret key.
|
||||
'''
|
||||
|
||||
# ../extmod/modtrezorcrypto/modtrezorcrypto-nist256p1.h
|
||||
def publickey(secret_key: bytes, compressed: bool=True) -> bytes:
|
||||
'''
|
||||
@ -17,3 +23,10 @@ def verify(public_key: bytes, signature: bytes, message: bytes) -> bool:
|
||||
Uses public key to verify the signature of the message
|
||||
Returns True on success.
|
||||
'''
|
||||
|
||||
# ../extmod/modtrezorcrypto/modtrezorcrypto-nist256p1.h
|
||||
def multiply(secret_key: bytes, public_key: bytes) -> bytes:
|
||||
'''
|
||||
Multiplies point defined by public_key with scalar defined by secret_key
|
||||
Useful for ECDH
|
||||
'''
|
||||
|
@ -1,4 +1,10 @@
|
||||
|
||||
# ../extmod/modtrezorcrypto/modtrezorcrypto-secp256k1.h
|
||||
def generate_secret() -> bytes:
|
||||
'''
|
||||
Generate secret key.
|
||||
'''
|
||||
|
||||
# ../extmod/modtrezorcrypto/modtrezorcrypto-secp256k1.h
|
||||
def publickey(secret_key: bytes, compressed: bool=True) -> bytes:
|
||||
'''
|
||||
@ -17,3 +23,10 @@ def verify(public_key: bytes, signature: bytes, message: bytes) -> bool:
|
||||
Uses public key to verify the signature of the message
|
||||
Returns True on success.
|
||||
'''
|
||||
|
||||
# ../extmod/modtrezorcrypto/modtrezorcrypto-secp256k1.h
|
||||
def multiply(secret_key: bytes, public_key: bytes) -> bytes:
|
||||
'''
|
||||
Multiplies point defined by public_key with scalar defined by secret_key
|
||||
Useful for ECDH
|
||||
'''
|
||||
|
Loading…
Reference in New Issue
Block a user