Showing posts with label bitcoin. Show all posts
Showing posts with label bitcoin. Show all posts

Wednesday, September 30, 2026

Replay Attacks, Replay Protection, and Safely Splitting Bitcoin Blake2b XBT and BTC

How do I spend my BTC without accidentally spending my XBT — or spend my XBT without accidentally spending my BTC?

This is where replay attacks and replay protection become important.

The XBT/BLAKE2b fork provides a particularly interesting example because the two networks share the historical UTXO set, while using different consensus rules after the fork. A transaction that is valid under both sets of rules can potentially be replayed from one network onto the other.

There are several ways to protect against this, including XBT's SIGHASH_UNIFIED mechanism and deliberately constructing a transaction that is valid on one chain but invalid on the other.

This article explains how replay attacks work, how XBT protects against them, how BTC transactions can be separated from XBT, and how to verify that your coins have actually been separated.


What Is a Replay Attack?

A replay attack occurs when a transaction created for one blockchain is copied and broadcast onto another blockchain where the same transaction is also valid.

Imagine that Alice owns 1 BTC before the fork.

After the fork, the same underlying UTXO exists under both sets of consensus rules.

Alice creates this transaction:

Alice → Bob: 1 BTC

If the transaction is valid under both networks' rules, someone can take the exact transaction and broadcast it to both chains.

Alice intended to make one payment.

Instead, the same UTXO may be spent on both networks.

Conceptually:

Before the fork

1 BTC

↓

Fork

1 BTC and 1 XBT

↓

Alice signs a transaction

Alice → Bob

↓

Without replay protection

BTC: accepted

XBT: potentially accepted

The important point is that the coins are not duplicated by the transaction itself. The two networks simply continue to recognize the same pre-fork UTXOs until transactions make them distinct under their respective rules.


XBT Replay Protection

XBT uses a mechanism called:

SIGHASH_UNIFIED

The implementation adds a new 0x20 flag to the signature hash type. The ordinary SIGHASH_ALL, for example, becomes 0x21.

The important consequence is that the resulting signature is not valid under the pre-fork SHA-256d consensus rules. Therefore, a transaction signed using the unified hash cannot simply be copied onto the old chain and accepted.

This is important because replay protection does not depend on the wallet asking the other network to behave differently.

Instead, the signature itself is different.

The old rules simply reject it.

In simplified form

Normal signature

SIGHASH_ALL

→ valid under the old rules

→ potentially valid on both sides

XBT unified signature

SIGHASH_UNIFIED + SIGHASH_ALL

→ valid under XBT's upgraded rules

→ rejected by the pre-fork SHA-256d rules

That is the fundamental mechanism behind XBT's replay protection.


Shrike Wallet

One wallet designed specifically around these changes is Shrike, an unofficial fork of Sparrow Wallet. I have not used this wallet, so I can not vouch for it or endorse it. Use at your own risk.

Shrike signs transactions using SIGHASH_UNIFIED when replay protection is enabled. Its send screen reports whether the transaction being created actually received replay protection.

This is an important distinction:

Having Shrike installed does not mean that every transaction is automatically protected.

The wallet needs to know that the signer — particularly a hardware wallet — can actually produce the required signature type.

Shrike therefore allows replay protection to be marked on individual keystores, and the transaction itself is checked before it is broadcast.

Hardware-wallet users need to pay particular attention to this. Current Shrike documentation notes that stock firmware does not yet produce SIGHASH_UNIFIED, while unofficial firmware builds exist for certain devices. Those builds are unaudited and carry their own risks.


What About Coins You Held Before the Fork?

This is one of the most important parts of the process.

Coins that existed before activation are recognized by both sets of rules.

Therefore, simply importing a pre-fork wallet into an XBT wallet does not magically separate the coins.

Shrike recommends sending the pre-fork coins to yourself using a transaction with the unified signature. Once that transaction confirms under the upgraded rules, the resulting UTXOs have been moved under the new transaction rules.

In other words:

Old UTXO

↓

Protected XBT transaction

↓

New XBT UTXO

That self-transfer is an important step before spending the coins in situations where replay could otherwise be possible.


Does BTC Have Replay Protection?

This question needs to be phrased carefully.

The better question isn't simply:

"Does BTC have replay protection?"

The more useful question is:

"Can I create a BTC transaction that is valid on BTC but invalid on XBT?"

The answer is yes, provided the transaction uses a consensus distinction between the two networks.

This gives us a second form of replay protection.

Instead of changing the signature so that BTC rejects it, we can construct a transaction that BTC accepts but XBT rejects.


Using a Consensus Difference to Separate BTC From XBT

One example is the treatment of OP_RETURN data.

Under the XBT/BLAKE2b consensus rules, the OP_RETURN data restriction provides a way to construct a transaction that BTC can accept while XBT rejects.

For example, a BTC transaction can contain an OP_RETURN output whose payload is larger than the XBT limit.

The result is:

BTC

Transaction → valid

XBT

Same transaction → invalid

This is fundamentally different from SIGHASH_UNIFIED.

With SIGHASH_UNIFIED, the signature distinguishes the transaction.

With the OP_RETURN method, the transaction itself violates an XBT consensus rule.

Current on-chain examples and community documentation describe an OP_RETURN payload above the XBT/BIP-110 limit as a way of creating a BTC-only transaction. The commonly cited boundary is that 83 bytes are allowed while larger payloads are rejected under the XBT rules.

Conceptually

BTC transaction

↓

Valid BTC transaction

↓

XBT node examines transaction

↓

XBT consensus rule violated

↓

XBT rejects transaction

Therefore the transaction cannot simply be replayed onto XBT.


An Example: Sending BTC Without Sending XBT

The basic procedure is to first make sure the coins have been separated appropriately, then create a BTC transaction that XBT will reject.

A simplified example looks like this:

Step 1 — Identify the UTXOs

Determine which UTXOs contain the coins you are trying to separate.

Do not assume that because your wallet shows a BTC balance and an XBT balance that the underlying UTXOs are already separated.

Verify them.

Step 2 — Create a BTC transaction

Create a transaction that sends your BTC to an address you control.

For example:

Your old UTXO

↓

Your new BTC address

And add an OP_RETURN output containing data that exceeds the XBT consensus limit.

The OP_RETURN output carries no spendable value. Its purpose in this example is to make the transaction invalid under XBT's rules.

Make sure you are sending it to yourself. You need to send it to a wallet you control.


Verify Your Wallet Before and After the Transfer

This is one of the most important practical steps.

Do not simply send the transaction and assume everything worked.

Check your wallet before the transfer and again after the transfer.

For XBT, you can use:

mempool.guide

For BTC, you can use:

mempool.space

These explorers allow you to inspect addresses, transactions and UTXOs on their respective networks. Please use your own nodes to check your balances'es, this helps preserve your privacy.

Before the transfer

Record:

  • Your address

  • Your balance

  • Your UTXOs

  • The transaction IDs associated with those UTXOs

  • Which UTXOs you intend to spend

Then check the same wallet/address on both networks.

After the transfer

Once the transaction confirms, check both networks again.

For a BTC-only separation transaction, the desired result is:

BTC

The transaction is accepted and eventually confirmed.

XBT

The same transaction is rejected and does not spend the corresponding XBT UTXO.

This provides a practical way to confirm that the transaction actually separated the coins.


But There Is an Even Better Way: Use Your Own Node

Public block explorers are convenient, but they are not the best option for privacy.

When you enter an address into a public explorer, you are revealing that address to the operator of that service.

If you repeatedly search addresses belonging to the same wallet, the operator can potentially associate:

  • your addresses

  • your balances

  • your transaction history

  • your UTXOs

  • your future transactions

Shrike's own documentation makes this point explicitly: a server you connect to can see the addresses you query, which can associate your wallet's activity and potentially your IP address. Running your own node avoids sending those wallet queries to someone else's server.

The privacy-first approach

Instead of:

Wallet → Public Explorer

use:

Wallet → Your Node

For BTC:

Wallet → Your Bitcoin node

For XBT:

Wallet → Your XBT/BLAKE2b-compatible node

Then verify the transaction directly against the nodes you control.

This is especially important when dealing with addresses and UTXOs that you do not want to associate with a third-party explorer.

Public explorers such as mempool.space and mempool.guide are useful as an independent secondary check, but your own node should be the primary source of truth when privacy matters.


Why Check Both Networks?

Checking only one network isn't enough.

Suppose you create a transaction and see it confirmed on BTC.

That proves that BTC accepted it.

It does not automatically prove that XBT rejected it.

Likewise, seeing a transaction rejected by XBT does not prove that BTC accepted and confirmed it.

You want to establish both sides independently.

The ideal test

CheckDesired result
BTC nodeTransaction accepted
BTC blockchainTransaction confirmed
XBT nodeSame transaction rejected
XBT blockchainOriginal XBT UTXO remains unspent

That is much stronger evidence that the transaction actually separated the two coins.


Two Different Ways to Protect Against Replay

There are therefore two fundamentally different approaches.

1. SIGHASH_UNIFIED

The signature itself is changed.

XBT

Transaction + SIGHASH_UNIFIED

↓

XBT accepts

BTC

Same transaction

↓

Signature does not satisfy old rules

↓

BTC rejects

This is the mechanism Shrike uses for XBT replay protection.


2. Chain-Specific Consensus Rule

The transaction itself is constructed so that one chain accepts it while the other rejects it.

For example:

BTC

OP_RETURN within BTC rules

↓

BTC accepts

XBT

OP_RETURN exceeds XBT consensus limit

↓

XBT rejects

This approach doesn't require the signature itself to be different.

Instead, the transaction is made incompatible with the other chain's consensus rules.


Post-Fork Coins Are Native to Their Own Chain

There is an important distinction between coins that existed before the fork and coins that are created after the fork.

The replay concern applies primarily to pre-fork UTXOs because those UTXOs were recognized by both chains when the networks split.

Coins created after the fork are different.

Once the two networks are operating under their separate consensus rules, newly mined coins are created by the blockchain on which they were mined. An XBT block creates XBT, while a BTC block creates BTC.

In other words:

XBT mining → new XBT

BTC mining → new BTC

There is no corresponding post-fork BTC UTXO created every time an XBT coin is mined, and there is no corresponding XBT UTXO created every time a BTC coin is mined.

This means that post-fork coins are not inherently mixed across the two chains in the same way that pre-fork coins are.

Why This Matters

Consider an XBT miner who receives a block reward after the fork.

That reward exists as an XBT UTXO on the XBT blockchain.

There is no matching BTC block reward sitting on the Bitcoin blockchain waiting to be replayed.

Likewise, when a Bitcoin miner receives a post-fork BTC block reward, that newly created BTC exists on the Bitcoin blockchain and does not simultaneously create an XBT balance.

The distinction can be illustrated simply:

Pre-fork UTXO

One historical UTXO

↓

BTC recognizes it

XBT recognizes it

↓

Replay protection may be necessary


Post-fork XBT coin

XBT block

↓

New XBT UTXO

↓

XBT recognizes it

BTC does not have the corresponding newly created UTXO


Post-fork BTC coin

BTC block

↓

New BTC UTXO

↓

BTC recognizes it

XBT does not have the corresponding newly created UTXO

The Practical Takeaway

The coins that require the most attention when separating BTC and XBT are therefore the coins that existed at the time of the fork.

Once you have received coins that were created natively on one chain after the fork, those coins are already associated with that chain's post-fork transaction history.

That does not mean that every later transaction is automatically replay-safe. You should still follow the rules of the particular wallet and chain and verify transactions when necessary.

But it is important not to confuse pre-fork shared UTXOs with post-fork native coins.

The simplest way to think about it is:

The fork created two chains from a shared starting point. It did not create a permanent mechanism whereby every new BTC coin also becomes XBT, or every new XBT coin also becomes BTC.

The shared history matters at the point of the fork. From there forward, each chain creates and tracks its own new UTXOs according to its own consensus rules.

Wednesday, September 16, 2026

How to Enable SSH on Innosilicon S11 Siamaster Blake2b (Root Password & Remote Management Guide) Bitcoin XBT


The Innosilicon S11 SiaMaster has SSH capability, but access is password-protected, and Innosilicon has not publicly provided the default SSH password.

Fortunately, the S11 controller board provides a serial console, through uart, that can be used to access the miner's bootloader.

By interrupting the normal boot process and booting Linux (which is already installed on your S11) with a modified kernel command line, it is possible to obtain a temporary root shell. From this shell, the root password can be changed, allowing persistent SSH access to the miner.

FYI, I used Linux to connect to the S11. Its also possible to use other Operating Systems, you would just have to change 1 or 2 steps to make it work for you.

This guide walks through the process step by step.

Warning: This procedure modifies the miner's system configuration. Make sure you understand each step before proceeding. Having a backup of the original firmware and configuration is strongly recommended. Proceed at your own risk

You have three options for getting SSH root access on an Innosilicon S11:

  1. Manual Configuration (Covered in this guide): The standard process for gaining direct command-line control.
    1. Firmware v  s11_20181026_024244 Build Date 26th of October 2018 02:42 AM
      1. I have confirmed this method to work for this version of the firmware.
    2. Firmware v s11_20190424_095412 Build Date 24th of April 2019 09:54 AM
      1. This method does not work on this version. 
  2. Default Password Discovery: Waiting on the community to crack the default SSH credentials.
  3. Pre-patched Custom Firmware: I can share a custom build pre-configured with known SSH credentials if there is enough interest. Note: Running unofficial firmware always carries a risk of bricking the ASIC, so proceed with caution.

The Default SSH Password Hash

The default root SSH password is stored in /etc/shadow as a SHA-512 crypt password hash:

$6$LDl3NtVWLpmGp1$52ivJuFI39PLeUerTxouNpwZn/WsJNlxhvQyUwPjJdxnoo2f93D1d904xFefd91qVWWjrC2jnj7Xz5oMaWAep1

The hash follows the standard crypt format:

$6$<salt>$<hash>

Breaking it down:

  • $6$ — Indicates the SHA-512 crypt hashing algorithm.
  • LDl3NtVWLpmGp1 — The unique salt used when generating the password hash.
  • The remaining string — The resulting password hash.

Because the password itself is not stored in plaintext, the value in /etc/shadow cannot simply be read as the SSH password. The purpose of this guide is to use the S11's bootloader and serial console to gain temporary root access and set a new password that you control.

 


What You Will Need

The serial adapter is used only for communicating with the S11's controller board.


1. Connect the CP2102 to the S11


Make sure your S11 is powered off and unplugged.

To gain access to the serial pins on the S11, remove the controller board by following these steps:

  • Remove the back fan and the metal separator plate.
  • Pull out all three hashboards just far enough to free the controller board.

Leave the power to all hashboards unplugged; they do not need to be powered on for this process.


Connect the CP2102 serial adapter to the S11 controller board as follows:
CP2102 S11
GNDGND
TXDRXD
RXDTXD

The transmit and receive lines are crossed:

CP2102 TXD → S11 RXD

CP2102 RXD → S11 TXD

CP2102 GND → S11 GND




Do not connect the CP2102's power/VCC pin to the S11 unless you specifically know that it is required. For the serial console, GND, TXD, and RXD are sufficient.

Once the connections are made, connect the CP2102 to your computer's usb port. To make it a little easier on myself, I used a usb extension.

Reconnect everything to your miner, ethernet cable, fans, hash boards and controller board. Leave the controller board out of the machine and make sure its on a non conductive, non static material. The controller board can not fit back into its slot in the s11 because of the cables we have connected to the serial pins.

Do not turn on the power yet.





2. Configure PuTTY


Open PuTTY and select:

Connection type: Serial

Serial line: /dev/ttyUSB0

Speed: 115200

On Linux, the CP2102 will commonly appear as:

/dev/ttyUSB0

On Windows, it will normally appear as a COM port such as:

COM4

Select the appropriate port for your computer.

Click Open and you will get a blank black window.


Pasting Commands into PuTTY

When entering the commands later in this guide, each command should be sent one at a time.

PuTTY has an option that allows text copied from outside PuTTY to be pasted into the terminal. On Linux, Shift+Insert can be used to paste text into the terminal.

Be careful when copying commands.

For example, Ctrl+C should be used to copy text rather than relying on the right mouse button, depending on how your PuTTY configuration is set up.

Also note that highlighting text in PuTTY can place that text into the clipboard.


3. Power On the S11

With PuTTY connected to the serial console, and window open, power on the S11.

You should see a large amount of boot information scrolling through the terminal.

Under normal circumstances, the S11 will eventually continue through its normal boot process and present a login prompt. If none of your hashboards are connected, then you may not see the login prompt.

The root credentials used by the factory firmware are not provided through the normal user interface, so the serial console provides another way to gain access to the underlying Linux system.


4. Interrupt the Normal Boot Process


This is the important part.

With the PuTTY window selected, restart or power-cycle the S11.

As the miner begins booting, repeatedly press a keyboard key in the PuTTY window.

The goal is to interrupt the normal boot process and stop at the U-Boot command prompt.

If successful, you should see:

Zynq>

This is the U-Boot prompt.

At this point, we can manually load the FPGA, kernel, device tree, and root filesystem and modify the Linux boot arguments.


5. Boot Linux With a Root Shell


At the Zynq> prompt, enter the following commands.

Enter each command separately and wait for it to finish before entering the next one.

Command 1

setenv image_flag 0

Command 2

nand read 0x400000 0x580000 0x400000

Command 3

fpga loadb 0 0x400000 0x400000

Command 4

nand read 0x2000000 0x480000 0x80000

Command 5

nand read 0x2080000 0xd80000 0x500000

Command 6

setenv bootargs 'console=ttyPS0,115200 noinitrd root=ubi0:rootfs ro ubi.mtd=8 earlyprintk rootfstype=ubifs rootwait init=/bin/sh'

Command 7

bootm 0x2080000 - 0x2000000

The system should now boot Linux using the modified boot arguments.


6. Confirm Root Shell Access


If everything worked, Linux should eventually stop at a shell prompt:

/#

The /# prompt indicates that you have a root shell.

Type in

cd /

ls -la

You should be able to see a large amount of folders and files.

At this point you have temporary root access to the S11's Linux operating system.

However, this access will disappear when the miner is rebooted.

To make SSH access persistent, we need to set a root password.


7. Remount the Root Filesystem Read/Write

The root filesystem was intentionally booted read-only.

First, in the shell prompt, remount it as read/write:

mount -o remount,rw /

8. Set a New Root Password

Run:

passwd

Linux will ask you to enter a new password. Enter the password you want to use for SSH.

For example, you could use:

admin

Use a strong password on any miner that is accessible from an untrusted network.


9. Remove the Root Password Expiration Date

The S11 firmware's /etc/shadow entry contains a password-aging value.

The following command removes the password date field from the root entry:

sed -i 's|^root:\([^:]*\):[0-9]*:|root:\1::|' /etc/shadow

This prevents the password from being treated as expired based on the existing date value.


10. Return the Root Filesystem to Read-Only

Once the changes are complete, remount the filesystem read-only:

mount -o remount,ro /

You can now power-cycle the miner.

The usb adapter will not be needed for the rest of the tutorial. You should keep it connected just incase you need to resend the commands.


11. Find the S11's IP Address

After powering the S11 back on, allow it a couple of minutes to complete its normal startup process.

Make sure that your computer and your s11 are on the same network.

You can use a network scanner such as Angry IP Scanner to locate the miner.

Once you find the IP address, enter it into your web browser.

For example:

http://10.0.0.15/

If the normal Innosilicon web dashboard interface appears, you have identified the correct IP address.


12. Connect to the S11 Using SSH

Open a terminal on your computer and run:

ssh root@10.0.0.15

Replace 10.0.0.15 with the actual IP address of your S11.

You should be prompted for the root password you created earlier.

After successfully authenticating, you should receive a root shell similar to:

#

Type in

cd /

ls -la

You should be able to see a large amount of folders and files.


You now have persistent root access to the S11 through SSH.


13. Optional: Configure Passwordless SSH

If you are going to administer the S11 frequently, you can configure SSH public-key authentication.

This is especially useful if you want scripts or automation software to connect to the miner without prompting for a password every time.

Generate an SSH Key

On your computer, run:

ssh-keygen -t rsa -b 4096 -f ~/.ssh/id_s11 -N ""

If the specified key already exists, SSH will ask whether you want to overwrite it.

Do not overwrite an existing key unless you intend to replace it.


Open a Second Terminal

Keep the first terminal open.

In the second terminal, connect to the S11:

ssh root@10.0.0.15

After logging in, remount the filesystem as read/write:

mount -o remount,rw /

Leave this second terminal open.


Copy the SSH Key to the S11

Return to the first terminal and run:

ssh-copy-id -i ~/.ssh/id_s11.pub root@10.0.0.15

Enter the root password when prompted.

This copies your public SSH key to the S11's authorized keys file.


Return the Filesystem to Read-Only

Go back to the second terminal connected to the S11 and run:

mount -o remount,ro /

14. Test Passwordless SSH

Return to the first terminal.

Run:

ssh root@10.0.0.15

If everything was configured correctly, SSH should connect without asking for the root password.

You should receive a root shell:

#

You have now successfully configured passwordless SSH access to your Innosilicon S11 SiaMaster.


Conclusion

Using the S11's serial console and U-Boot environment, you can interrupt the normal boot process and launch the installed Linux system with a shell as root.

This provides a much more convenient way to work with the S11 than relying exclusively on the web interface or serial console.