Skip to content

Commit 460c7bd

Browse files
committed
Merge remote-tracking branch 'benma/bip85-2'
2 parents 7c9170a + fa3fed5 commit 460c7bd

File tree

21 files changed

+407
-86
lines changed

21 files changed

+407
-86
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ customers cannot upgrade their bootloader, its changes are recorded separately.
1414
For 24 words, this feature was already introduced in 9.4.0.
1515
- Bitcoin: don't warn about "unusual" sequence numbers in transactions anymore
1616
- Add EIP-1559 transaction support for Ethereum
17+
- Add support for deriving BIP-39 mnemonics according to BIP-85
1718

1819
### 9.15.0
1920
- Security bugfix: check index of an input's previous output to prevent the fee attack originally

messages/hww.proto

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ message Request {
6666
BTCRequest btc = 25;
6767
ElectrumEncryptionKeyRequest electrum_encryption_key = 26;
6868
CardanoRequest cardano = 27;
69+
BIP85Request bip85 = 28;
6970
}
7071
}
7172

@@ -87,5 +88,6 @@ message Response {
8788
BTCResponse btc = 13;
8889
ElectrumEncryptionKeyResponse electrum_encryption_key = 14;
8990
CardanoResponse cardano = 15;
91+
BIP85Response bip85 = 16;
9092
}
9193
}

messages/keystore.proto

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,9 @@ message ElectrumEncryptionKeyRequest {
1111
message ElectrumEncryptionKeyResponse {
1212
string key = 1;
1313
}
14+
15+
message BIP85Request {
16+
}
17+
18+
message BIP85Response {
19+
}

py/bitbox02/bitbox02/bitbox02/bitbox02.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -678,6 +678,15 @@ def electrum_encryption_key(self, keypath: Sequence[int]) -> str:
678678
)
679679
return self._msg_query(request).electrum_encryption_key.key
680680

681+
def bip85(self) -> None:
682+
"""Invokes the BIP-85 workflow on the device"""
683+
self._require_atleast(semver.VersionInfo(9, 16, 0))
684+
685+
# pylint: disable=no-member
686+
request = hww.Request()
687+
request.bip85.CopyFrom(keystore.BIP85Request())
688+
self._msg_query(request)
689+
681690
def enable_mnemonic_passphrase(self) -> None:
682691
"""
683692
Enable the bip39 passphrase.

py/bitbox02/bitbox02/communication/generated/hww_pb2.py

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)