diff --git a/core/src/apps/bitcoin/ownership.py b/core/src/apps/bitcoin/ownership.py index c00873ba09..587bbfa226 100644 --- a/core/src/apps/bitcoin/ownership.py +++ b/core/src/apps/bitcoin/ownership.py @@ -20,7 +20,9 @@ if False: from trezor.messages.TxInputType import EnumTypeInputScriptType from apps.common.coininfo import CoinInfo -# This module implements the SLIP-0019 proof of ownership format. +# This module implements the SLIP-0019 proof of ownership format, see +# https://github.com/satoshilabs/slips/blob/master/slip-0019.md. + _VERSION_MAGIC = b"SL\x00\x19" _FLAG_USER_CONFIRMED = 0x01 diff --git a/core/src/apps/cardano/seed.py b/core/src/apps/cardano/seed.py index b12e26372a..e965d2b411 100644 --- a/core/src/apps/cardano/seed.py +++ b/core/src/apps/cardano/seed.py @@ -83,7 +83,7 @@ async def get_keychain(ctx: wire.Context) -> Keychain: assert secret_bytes is not None root = bip32.from_mnemonic_cardano(secret_bytes.decode(), passphrase) else: - # derive the root node via SLIP-0023 + # derive the root node via SLIP-0023 https://github.com/satoshilabs/slips/blob/master/slip-0022.md seed = await get_seed(ctx) root = bip32.from_seed(seed, "ed25519 cardano seed") diff --git a/core/src/apps/common/seed.py b/core/src/apps/common/seed.py index 3d161e0bcb..81f5003b07 100644 --- a/core/src/apps/common/seed.py +++ b/core/src/apps/common/seed.py @@ -10,6 +10,11 @@ if False: class Slip21Node: + """ + This class implements the SLIP-0021 hierarchical derivation of symmetric keys, see + https://github.com/satoshilabs/slips/blob/master/slip-0021.md. + """ + def __init__(self, seed: bytes = None, data: bytes = None) -> None: assert seed is None or data is None, "Specify exactly one of: seed, data" if data is not None: diff --git a/core/src/apps/misc/cipher_key_value.py b/core/src/apps/misc/cipher_key_value.py index 5177de151b..b88d5055df 100644 --- a/core/src/apps/misc/cipher_key_value.py +++ b/core/src/apps/misc/cipher_key_value.py @@ -11,6 +11,9 @@ if False: from trezor.messages.CipherKeyValue import CipherKeyValue from trezor.wire import Context +# This module implements the SLIP-0011 symmetric encryption of key-value pairs using a +# deterministic hierarchy, see https://github.com/satoshilabs/slips/blob/master/slip-0011.md. + async def cipher_key_value(ctx: Context, msg: CipherKeyValue) -> CipheredKeyValue: keychain = await get_keychain(ctx, "secp256k1", [AlwaysMatchingSchema]) diff --git a/core/src/apps/misc/get_ecdh_session_key.py b/core/src/apps/misc/get_ecdh_session_key.py index 42250c71c0..da6692797e 100644 --- a/core/src/apps/misc/get_ecdh_session_key.py +++ b/core/src/apps/misc/get_ecdh_session_key.py @@ -19,6 +19,9 @@ if False: from apps.common.paths import Bip32Path +# This module implements the SLIP-0017 Elliptic Curve Diffie-Hellman algorithm, using a +# determinstic hierarchy, see https://github.com/satoshilabs/slips/blob/master/slip-0017.md. + async def get_ecdh_session_key( ctx: wire.Context, msg: GetECDHSessionKey diff --git a/core/src/apps/misc/sign_identity.py b/core/src/apps/misc/sign_identity.py index dffa59cab3..fc8945b0d8 100644 --- a/core/src/apps/misc/sign_identity.py +++ b/core/src/apps/misc/sign_identity.py @@ -20,6 +20,9 @@ if False: from apps.common.paths import Bip32Path +# This module implements the SLIP-0013 authentication using a deterministic hierarchy, see +# https://github.com/satoshilabs/slips/blob/master/slip-0013.md. + async def sign_identity(ctx: wire.Context, msg: SignIdentity) -> SignedIdentity: if msg.ecdsa_curve_name is None: diff --git a/core/src/apps/webauthn/credential.py b/core/src/apps/webauthn/credential.py index 082b9a46e5..1034962193 100644 --- a/core/src/apps/webauthn/credential.py +++ b/core/src/apps/webauthn/credential.py @@ -103,8 +103,12 @@ class Credential: return U2fCredential.from_key_handle(data, rp_id_hash) -# SLIP-0022: FIDO2 credential ID format for HD wallets class Fido2Credential(Credential): + """ + This class implements the SLIP-0022 FIDO2 Credential ID format for HD wallets, see + https://github.com/satoshilabs/slips/blob/master/slip-0022.md. + """ + def __init__(self) -> None: super().__init__() self.rp_name: Optional[str] = None