From 790604dc3c946390a3144ad3cb487744aad83ff7 Mon Sep 17 00:00:00 2001 From: odudex Date: Wed, 6 Nov 2024 14:21:59 -0300 Subject: [PATCH] rename tc code file --- mkdocs.yml | 2 +- pyproject.toml | 2 +- src/boot.py | 3 +-- src/krux/krux_settings.py | 3 +-- src/krux/metadata.py | 2 +- src/krux/pages/tc_code_verification.py | 11 ----------- 6 files changed, 5 insertions(+), 18 deletions(-) diff --git a/mkdocs.yml b/mkdocs.yml index 24ce2e56..8e9de2b6 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -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 diff --git a/pyproject.toml b/pyproject.toml index 2285b203..ba665229 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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 "] diff --git a/src/boot.py b/src/boot.py index 2e27ea89..09c5b1f3 100644 --- a/src/boot.py +++ b/src/boot.py @@ -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: @@ -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 diff --git a/src/krux/krux_settings.py b/src/krux/krux_settings.py index 2a677e76..bb563844 100644 --- a/src/krux/krux_settings.py +++ b/src/krux/krux_settings.py @@ -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" diff --git a/src/krux/metadata.py b/src/krux/metadata.py index f37f9b4f..4103829f 100644 --- a/src/krux/metadata.py +++ b/src/krux/metadata.py @@ -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" diff --git a/src/krux/pages/tc_code_verification.py b/src/krux/pages/tc_code_verification.py index 626e8898..5cebd61f 100644 --- a/src/krux/pages/tc_code_verification.py +++ b/src/krux/pages/tc_code_verification.py @@ -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