Skip to content

Commit

Permalink
Merge remote-tracking branch 'benma/bip85-2'
Browse files Browse the repository at this point in the history
  • Loading branch information
benma committed Dec 28, 2023
2 parents 7c9170a + fa3fed5 commit 460c7bd
Show file tree
Hide file tree
Showing 21 changed files with 407 additions and 86 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ customers cannot upgrade their bootloader, its changes are recorded separately.
For 24 words, this feature was already introduced in 9.4.0.
- Bitcoin: don't warn about "unusual" sequence numbers in transactions anymore
- Add EIP-1559 transaction support for Ethereum
- Add support for deriving BIP-39 mnemonics according to BIP-85

### 9.15.0
- Security bugfix: check index of an input's previous output to prevent the fee attack originally
Expand Down
2 changes: 2 additions & 0 deletions messages/hww.proto
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ message Request {
BTCRequest btc = 25;
ElectrumEncryptionKeyRequest electrum_encryption_key = 26;
CardanoRequest cardano = 27;
BIP85Request bip85 = 28;
}
}

Expand All @@ -87,5 +88,6 @@ message Response {
BTCResponse btc = 13;
ElectrumEncryptionKeyResponse electrum_encryption_key = 14;
CardanoResponse cardano = 15;
BIP85Response bip85 = 16;
}
}
6 changes: 6 additions & 0 deletions messages/keystore.proto
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,9 @@ message ElectrumEncryptionKeyRequest {
message ElectrumEncryptionKeyResponse {
string key = 1;
}

message BIP85Request {
}

message BIP85Response {
}
9 changes: 9 additions & 0 deletions py/bitbox02/bitbox02/bitbox02/bitbox02.py
Original file line number Diff line number Diff line change
Expand Up @@ -678,6 +678,15 @@ def electrum_encryption_key(self, keypath: Sequence[int]) -> str:
)
return self._msg_query(request).electrum_encryption_key.key

def bip85(self) -> None:
"""Invokes the BIP-85 workflow on the device"""
self._require_atleast(semver.VersionInfo(9, 16, 0))

# pylint: disable=no-member
request = hww.Request()
request.bip85.CopyFrom(keystore.BIP85Request())
self._msg_query(request)

def enable_mnemonic_passphrase(self) -> None:
"""
Enable the bip39 passphrase.
Expand Down
8 changes: 4 additions & 4 deletions py/bitbox02/bitbox02/communication/generated/hww_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 460c7bd

Please sign in to comment.