This guide explains how to encrypt and decrypt a Cashu token using Krux Android App and clipboard.
- Start at Cashu.me
Copy a Cashu token (a UTF-8 string).
This guide explains how to encrypt and decrypt a Cashu token using Krux Android App and clipboard.
This guide details how to set up a Taproot miniscript wallet using:
The process involves key management, backups, and data exchange via an SD card.
class Node: | |
""" | |
A simple tree node that only stores: | |
- text: The 'prefix' of the expression before an open parenthesis, | |
or the entire expression if no parentheses exist. | |
- children: Any sub-expressions contained within parentheses (split by commas at top level). | |
- level: An integer used to control indentation depth. | |
""" | |
def __init__(self, text, children=None, level=0): |
END_OPERATORS = [ | |
"pk_k", | |
"pk_h", | |
"older", | |
"after", | |
"sha256", | |
"hash256", | |
"ripemd160", | |
"hash160", | |
"multi", |
class Node: | |
""" | |
A simple parse-tree node to represent Miniscript expressions. | |
""" | |
def __init__(self, node_type, children=None, value=None, level=0): | |
self.node_type = node_type # e.g. "AND", "OR", "PK", "OLDER" | |
self.children = children if children is not None else [] | |
self.value = value # used by PK(...) or OLDER(...) | |
self.level = level # for indentation |
# The MIT License (MIT) | |
# Copyright (c) 2024-2024 Krux contributors | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: |
# The MIT License (MIT) | |
# Copyright (c) 2021-2023 Krux contributors | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: |
After a user reported that the settings on their Krux device changed unexpectedly, and with the disclosure of threads like "Dark Skippy" I decided to invest time in protecting Krux from tampering.
My first objective was to investigate if it was possible to implement some type of tamper protection for Krux K210-based boards, such as secure boot. The K210 specifications mention firmware encryption and One-Time Programmable (OTP) memory, which could make secure boot viable, but there was no documentation on how to implement it.
The lack of documentation didn't stop us from exploring K210 features before, so I started a quick investigation.
My first finding was that I was not the first to explore these poorly documented characteristics of the K210. Wladimir van der Laan, while still the lead Bitcoin Core maintainer, conducted a deep investigation into the K210, also trying to determine how to use the chip's OTP memory.
[Wladimir's OTP Layout Documentation](https://github.com/laanwj/
The purpose of this ethos is not to virtue signal, but to introduce newcomers to Krux's philosophy and provide a guiding reference for decision-making and the long-term mission for dedicated Krux users.
To implement ideas that make self-custody more powerful, accessible, and user-friendly.
Do not trust developers’ intentions or competence. Krux is a DIY, use-at-your-own-risk project. We are committed to continuously improving security, but will not make claims or create marketing narratives about it.
import os | |
import tkinter as tk | |
from tkinter import filedialog | |
from PIL import Image, ImageTk | |
def create_image_from_file(filename, start_pos): | |
def maxv(number_of_bits): | |
return (2**number_of_bits) - 1 | |
with open(filename, 'rb') as f: |