Skip to content

Commit

Permalink
rename tc code file
Browse files Browse the repository at this point in the history
  • Loading branch information
odudex committed Nov 6, 2024
1 parent c8fc697 commit 790604d
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 18 deletions.
2 changes: 1 addition & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ edit_uri: edit/main/docs
docs_dir: docs
site_dir: public
extra:
latest_krux: krux-v24.10.beta11
latest_krux: krux-v24.11.0
latest_installer: v0.0.20-beta
latest_installer_rpm: krux-installer-0.0.20_beta-1.x86_64.rpm
latest_installer_deb: krux-installer_0.0.20-beta_amd64.deb
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

[tool.poetry]
name = "krux"
version = "24.10.beta11"
version = "24.11.0"
description = "Open-source signing device firmware for Bitcoin"
authors = ["Jeff S <[email protected]>"]

Expand Down
3 changes: 1 addition & 2 deletions src/boot.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def check_for_updates():

def tc_code_verification(ctx_pin):
"""Loads and run the Pin Verification page"""
TC_CODE_PATH = "/flash/pin"
from krux.krux_settings import Settings, TC_CODE_PATH

# Checks if there is a pin set
try:
Expand All @@ -76,7 +76,6 @@ def tc_code_verification(ctx_pin):
return True

ctx_pin.tc_code_enabled = True
from krux.krux_settings import Settings

if not Settings().security.boot_flash_hash:
return True
Expand Down
3 changes: 1 addition & 2 deletions src/krux/krux_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@

BAUDRATES = [1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200]

# TODO: Change this to "flash/tcc" before release, beta users will have to re-create their TC code
TC_CODE_PATH = "/flash/pin"
TC_CODE_PATH = "/flash/tcc"
TC_CODE_PBKDF2_ITERATIONS = 100000

DEFAULT_LOCALE = "en-US"
Expand Down
2 changes: 1 addition & 1 deletion src/krux/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
VERSION = "24.10.beta11"
VERSION = "24.11.0"
SIGNER_PUBKEY = "03339e883157e45891e61ca9df4cd3bb895ef32d475b8e793559ea10a36766689b"
11 changes: 0 additions & 11 deletions src/krux/pages/tc_code_verification.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,17 +66,6 @@ def capture(self, changing_tc_code=False, return_hash=False):
self.ctx.display.clear()
self.ctx.display.draw_centered_text(t("Processing.."))

# Tries with non-stretched secret (obsolete)
# TODO: Remove obsolete before first release
sha256 = hashlib.sha256()
sha256.update(tc_code_hash)
sha256.update(unique_id())
non_stretched_secret = sha256.digest()
if non_stretched_secret == file_secret:
if return_hash:
return tc_code_hash
return True

# Generate PBKDF2 stretched secret
secret = hashlib.pbkdf2_hmac(
"sha256", tc_code_hash, unique_id(), TC_CODE_PBKDF2_ITERATIONS
Expand Down

0 comments on commit 790604d

Please sign in to comment.