Blockchain & Digital Assets / Bitcoin Transaction
What you will do: Run nine steps: generate the source key, extract its public key, create the source address, generate a recipient key and address, format the transaction, visualize the message, sign it and verify the signature.
Worked example: Format a 0.5 BTC transfer with a 0.0001 BTC fee between the two generated addresses, sign it with secp256k1 ECDSA, and Verify Signature reports VALID against the sender's public key.
Runtime and privacy: The cryptographic exercise runs in this browser. Review the site privacy terms before entering sensitive material; use synthetic inputs for learning and evaluation.
For your role
- Developer / Engineer
- Walk the nine steps from Generate Source Key: the secp256k1 key is created inside the softhsmv3 token, and each step explains the transaction structure being built and signed.
- Researcher / Academic
- The Shor's Algorithm note on the first step is the threat model; follow the steps to see which values in a transaction expose the public key and when.
Live HSM Mode Active
SoftHSM3 · PKCS#11 v3.2 · Rust · session open
Educational demo — keys and transactions generated here are not for production use.
1. Generate Source Key
Generate a key pair for the sender inside SoftHSMv3 (PKCS#11 via WebAssembly). The private key is a 256-bit scalar (32 bytes) generated by the HSM's internal CSPRNG and never leaves the token. Note: breaks secp256k1 — this algorithm will require migration when a cryptographically relevant quantum computer (CRQC) arrives.
// Generate secp256k1 key pair inside the SoftHSMv3 token
const { pubHandle, privHandle } = hsm_generateECKeyPair(
module, hSession,
'secp256k1',
false, // extractable = false — private key stays in HSM
'sign' // usage: CKA_SIGN on private, CKA_VERIFY on public
)No keys yet — click Execute to run the provisioning flow.
Production Tool Capabilities & Verification Requirements
What this sample check establishes: Compares Bitcoin secp256k1 ECDSA/Schnorr (BIP-340) transaction signing and Taproot witness structures against post-quantum signature size and verification constraints.
Browser sandbox limitation (non-certification boundary): Educational transaction-flow model; the live Bitcoin network consensus does not currently support ML-DSA or SLH-DSA opcodes.
What to require and test in your production tools:
- Strict address-hygiene enforcement in custody platforms: never reuse P2PKH/P2WPKH addresses once an outgoing spend reveals the public key on-chain.
- Custody HSM readiness for post-quantum signing schemes and hash-based emergency recovery paths.
- Continuous monitoring of BIP / protocol governance proposals for quantum-resistant witness soft forks.
Try it
- 1. Predict before you run it.
- 2. Run or change the tool above.
- 3. Explain what the result shows.
In Generate Source Key, where does the secp256k1 private key live?
Next step
Turn it into a plan: Deployment PlaybookThis tool practises the Digital Assets module, phase 5 (Pilots & Migration); Deployment Playbook produces a deliverable of that phase.
Related content
Next in Blockchain & Digital Assets