1
0
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:
Pavol Rusnak 2016-10-24 15:44:49 +02:00
parent 6e658ff2f1
commit 2ede564cbd
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D
5 changed files with 59 additions and 2 deletions

View File

@ -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.
'''

View 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
'''

View File

@ -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:
'''

View File

@ -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
'''

View File

@ -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
'''