Bitcoin Forum
April 05, 2026, 08:16:52 PM *
News: Latest Bitcoin Core release: 30.2 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Move BTC from Cold Paper Wallet (P2PKH) to SegWit via PBST  (Read 362 times)
qixinsame (OP)
Newbie
*
Offline Offline

Activity: 5
Merit: 0


View Profile
April 19, 2025, 02:44:09 PM
 #1

Dear Experts,

Here is my setup:

- An airgapped Windows PC
- An online Macbook
- BTC stored on my cold paper wallet which was generated from bitaddress.org (PGP verified) on that airgapped PC many years ago.

now I want to move my fund to a cold Segwit address via PBST approach without exposing my current private key to internet.

I tried with Sparrow on my airgapped PC but it seems like i cannot import legacy address into the cold Sparrow so cannot move forward.

Anyone can kindly help and advise how should I do? any alternatives?

P.S: I am living in China and have no access to any reliable hardwallet supplier here thus airgapped PC is the best device i can have.
Charles-Tim
Legendary
*
Offline Offline

Activity: 2240
Merit: 6290


Leading Crypto Sports Betting & Casino Platform


View Profile
April 19, 2025, 03:03:27 PM
Merited by Pmalek (2)
 #2

Why not use Electrum on the airgapped device?
This is Electrum official site: https://electrum.org/

To import the private key on Electrum, you will click on 'import bitcoin addresses or private keys' after you finish setting up the Electrum. Your bitcoin address start from 1? Just paste it there and you will see you coins on Electrum.

Or you can use Electrum to send the coin to Sparrow instead.

https://electrum.readthedocs.io/en/latest/coldstorage.html

..Stake.com..   ▄████████████████████████████████████▄
   ██ ▄▄▄▄▄▄▄▄▄▄            ▄▄▄▄▄▄▄▄▄▄ ██  ▄████▄
   ██ ▀▀▀▀▀▀▀▀▀▀ ██████████ ▀▀▀▀▀▀▀▀▀▀ ██  ██████
   ██ ██████████ ██      ██ ██████████ ██   ▀██▀
   ██ ██      ██ ██████  ██ ██      ██ ██    ██
   ██ ██████  ██ █████  ███ ██████  ██ ████▄ ██
   ██ █████  ███ ████  ████ █████  ███ ████████
   ██ ████  ████ ██████████ ████  ████ ████▀
   ██ ██████████ ▄▄▄▄▄▄▄▄▄▄ ██████████ ██
   ██            ▀▀▀▀▀▀▀▀▀▀            ██ 
   ▀█████████▀ ▄████████████▄ ▀█████████▀
  ▄▄▄▄▄▄▄▄▄▄▄▄███  ██  ██  ███▄▄▄▄▄▄▄▄▄▄▄▄
 ██████████████████████████████████████████
▄▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▄
█  ▄▀▄             █▀▀█▀▄▄
█  █▀█             █  ▐  ▐▌
█       ▄██▄       █  ▌  █
█     ▄██████▄     █  ▌ ▐▌
█    ██████████    █ ▐  █
█   ▐██████████▌   █ ▐ ▐▌
█    ▀▀██████▀▀    █ ▌ █
█     ▄▄▄██▄▄▄     █ ▌▐▌
█                  █▐ █
█                  █▐▐▌
█                  █▐█
▀▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▀█
▄▄█████████▄▄
▄██▀▀▀▀█████▀▀▀▀██▄
▄█▀       ▐█▌       ▀█▄
██         ▐█▌         ██
████▄     ▄█████▄     ▄████
████████▄███████████▄████████
███▀    █████████████    ▀███
██       ███████████       ██
▀█▄       █████████       ▄█▀
▀█▄    ▄██▀▀▀▀▀▀▀██▄  ▄▄▄█▀
▀███████         ███████▀
▀█████▄       ▄█████▀
▀▀▀███▄▄▄███▀▀▀
..PLAY NOW..
Forsyth Jones
Legendary
*
Offline Offline

Activity: 1862
Merit: 2030


I love Bitcoin!


View Profile WWW
April 19, 2025, 10:07:52 PM
Merited by Pmalek (2), nc50lc (1)
 #3

Why use Windows as your airgapped OS? Wouldn't Linux be better? Anyway, as long as you stay offline, you should be fine. I recommend that you learn how to use Linux to manage your airgapped wallet.

Do you want to transfer funds from your paperwallet to a segwit address, do you want to create a unique private key or a Hierarchical Deterministic (HD) wallet protected by a seed phrase that will always generate a sequence cryptographically related to the wallet? I suggest opting for the second option.

I tried with Sparrow on my airgapped PC but it seems like i cannot import legacy address into the cold Sparrow so cannot move forward.
In Sparrow you can sweep the balance of the private key by going to: Tools: Sweep private keys, select the script type (probably legacy, check if your address starts with prefix 1).

NOTE: You should create a new wallet in Sparrow, backup the 12 or 24 word seed phrase, encrypt your newly created wallet with a strong password before sweeping. Export the backup (keystore encrypted with your password) to the offline PC.

You can also use Sparrow as a watch-only wallet, where you will create transactions. To do this, simply:

1 - Go to File > enter a name for your watch-only wallet.

2 - Select the wallet type in Policy Type: single-sig for a wallet with only one key (requires a signature), standard setup or multisig (more complex usage that requires more than one signature, I won't go into details here).

3 - In Script Type, select: native segwit (p2wpkh) - by default, this option will already be selected...



4 - In Keystores, select xPub/Watch Only Wallet, then paste your xpub. You can get the xpub from your offline wallet by going to Settings > Keystores > xpub/zpub, scan the xpub with your cell phone or copy the xpub to a USB drive and transfer it to Sparrow on the online computer.

If you choose to use Sparrow, check the docs: https://sparrowwallet.com/docs/

███████████████████████████
███████▄████████████▄██████
████████▄████████▄████████
███▀█████▀▄███▄▀█████▀███
█████▀█▀▄██▀▀▀██▄▀█▀█████
███████▄███████████▄███████
███████████████████████████
███████▀███████████▀███████
████▄██▄▀██▄▄▄██▀▄██▄████
████▄████▄▀███▀▄████▄████
██▄███▀▀█▀██████▀█▀███▄███
██▀█▀████████████████▀█▀███
███████████████████████████
.
.Duelbits PREDICT..
█████████████████████████
█████████████████████████
███████████▀▀░░░░▀▀██████
██████████░░▄████▄░░████
█████████░░████████░░████
█████████░░████████░░████
█████████▄▀██████▀▄████
████████▀▀░░░▀▀▀▀░░▄█████
██████▀░░░░██▄▄▄▄████████
████▀░░░░▄███████████████
█████▄▄█████████████████
█████████████████████████
█████████████████████████
.
.WHERE EVERYTHING IS A MARKET..
█████
██
██







██
██
██████
Will Bitcoin hit $200,000
before January 1st 2027?

    No @1.15         Yes @6.00    
█████
██
██







██
██
██████

  CHECK MORE > 
BitMaxz
Legendary
*
Offline Offline

Activity: 3948
Merit: 3592


Take the risk or lose the chance?


View Profile WWW
April 19, 2025, 11:09:04 PM
 #4

Follow what Charles-Tim suggested above Electrum should work on offline or cold storage PC; it supports both MacBook and Windows PC.
Take note that Sparrow also supports Electrum PSBT. If you want to keep using Sparrow Wallet on your online MacBook, you can do that and use Electrum in your cold storage wallet on your Windows PC.

The only problem is you can't take xPub in Electrum with a single private key, so I suggest use only Electrum on both online and offline and then import the private key to your offline Electrum and copy the BTC address and import it to Electrum online.

In online Electrum as a watch-only wallet, you can make unsigned transactions there; you can copy the raw or save it as a PSBT file. Since you want PSBT, save it as a file. The rest should be easy: transfer it to an offline wallet, then import it to sign, and take the signed transaction, transfer it back to your MacBook, and import it to Electrum online to broadcast the transaction.

To avoid installing fake Electrum I suggest verify Electrum first you can follow this "[GUIDE] How to Safely Download and Verify Electrum [Guide]".


BTC is still bearish at the moment, but it is getting weak. The market might shift while the RSI is making a reversal pattern.

To get more advantage analyzing the market, why not try to subscribe to TradingView and unlock the $15 reward from your first subscription?
nc50lc
Legendary
*
Offline Offline

Activity: 3108
Merit: 8544


Self-proclaimed Genius


View Profile
April 20, 2025, 03:46:45 AM
 #5

In Sparrow you can sweep the balance of the private key by going to: Tools: Sweep private keys, select the script type (probably legacy, check if your address starts with prefix 1).
That's a good quick option for smaller amounts but that'll expose it in the online device even for a short time.

I tried with Sparrow on my airgapped PC but it seems like i cannot import legacy address into the cold Sparrow so cannot move forward.
If you're fine with Electrum, you can use its imported wallet option to create a non-HD Cold Storage set-up.
Follow this for the steps: /index.php?topic=5524213.msg64885706#msg64885706 (complete with screenshots)
Just replace the step about "mini-private key" with your "WIF", Electrum supports both format.

Of course, use the watch-only Electrum wallet to send to your preferred wallet with SegWit address.

███████████████████████████
███████▄████████████▄██████
████████▄████████▄████████
███▀█████▀▄███▄▀█████▀███
█████▀█▀▄██▀▀▀██▄▀█▀█████
███████▄███████████▄███████
███████████████████████████
███████▀███████████▀███████
████▄██▄▀██▄▄▄██▀▄██▄████
████▄████▄▀███▀▄████▄████
██▄███▀▀█▀██████▀█▀███▄███
██▀█▀████████████████▀█▀███
███████████████████████████
.
.Duelbits PREDICT..
█████████████████████████
█████████████████████████
███████████▀▀░░░░▀▀██████
██████████░░▄████▄░░████
█████████░░████████░░████
█████████░░████████░░████
█████████▄▀██████▀▄████
████████▀▀░░░▀▀▀▀░░▄█████
██████▀░░░░██▄▄▄▄████████
████▀░░░░▄███████████████
█████▄▄█████████████████
█████████████████████████
█████████████████████████
.
.WHERE EVERYTHING IS A MARKET..
█████
██
██







██
██
██████
Will Bitcoin hit $200,000
before January 1st 2027?

    No @1.15         Yes @6.00    
█████
██
██







██
██
██████

  CHECK MORE > 
qixinsame (OP)
Newbie
*
Offline Offline

Activity: 5
Merit: 0


View Profile
April 23, 2025, 12:07:06 PM
Last edit: April 26, 2025, 10:22:16 PM by achow101
 #6

Why not use Electrum on the airgapped device?

It's because I am not particularly tech-savvy and Electrum seems too advanced for me Grin, since every guru on this forum is referring to Electrum, I'll start to learn about Electrum. big Thanks!



NOTE: You should create a new wallet in Sparrow, backup the 12 or 24 word seed phrase, encrypt your newly created wallet with a strong password before sweeping. Export the backup (keystore encrypted with your password) to the offline PC.

Appreciate your comprehensive explanation here. Although it's a bit embarrassing, I actually have an OCD-like request: I really want to know the actual private key corresponding to our addresses, whether it's a Legacy address or a SegWit address. hahaha. however, it seems nowadays most of the experts/SME would recommend "keystore" i/o Private key in WIF. I left the area for quite a long time, it's time for me to catch up. Grin

Mod note: Consecutive posts merged
Charles-Tim
Legendary
*
Offline Offline

Activity: 2240
Merit: 6290


Leading Crypto Sports Betting & Casino Platform


View Profile
April 23, 2025, 12:42:25 PM
 #7

It's because I am not particularly tech-savvy and Electrum seems too advanced for me Grin, since every guru on this forum is referring to Electrum, I'll start to learn about Electrum. big Thanks!
There is nothing hard about Electrum. If you are able to know how to make use of your coins on Sparrow wallet, you should be able to know how to make use of your coins on Electrum wallet. With what you explained above, I will prefer to make use of Electrum on an airgapped wallet for it.

..Stake.com..   ▄████████████████████████████████████▄
   ██ ▄▄▄▄▄▄▄▄▄▄            ▄▄▄▄▄▄▄▄▄▄ ██  ▄████▄
   ██ ▀▀▀▀▀▀▀▀▀▀ ██████████ ▀▀▀▀▀▀▀▀▀▀ ██  ██████
   ██ ██████████ ██      ██ ██████████ ██   ▀██▀
   ██ ██      ██ ██████  ██ ██      ██ ██    ██
   ██ ██████  ██ █████  ███ ██████  ██ ████▄ ██
   ██ █████  ███ ████  ████ █████  ███ ████████
   ██ ████  ████ ██████████ ████  ████ ████▀
   ██ ██████████ ▄▄▄▄▄▄▄▄▄▄ ██████████ ██
   ██            ▀▀▀▀▀▀▀▀▀▀            ██ 
   ▀█████████▀ ▄████████████▄ ▀█████████▀
  ▄▄▄▄▄▄▄▄▄▄▄▄███  ██  ██  ███▄▄▄▄▄▄▄▄▄▄▄▄
 ██████████████████████████████████████████
▄▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▄
█  ▄▀▄             █▀▀█▀▄▄
█  █▀█             █  ▐  ▐▌
█       ▄██▄       █  ▌  █
█     ▄██████▄     █  ▌ ▐▌
█    ██████████    █ ▐  █
█   ▐██████████▌   █ ▐ ▐▌
█    ▀▀██████▀▀    █ ▌ █
█     ▄▄▄██▄▄▄     █ ▌▐▌
█                  █▐ █
█                  █▐▐▌
█                  █▐█
▀▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▀█
▄▄█████████▄▄
▄██▀▀▀▀█████▀▀▀▀██▄
▄█▀       ▐█▌       ▀█▄
██         ▐█▌         ██
████▄     ▄█████▄     ▄████
████████▄███████████▄████████
███▀    █████████████    ▀███
██       ███████████       ██
▀█▄       █████████       ▄█▀
▀█▄    ▄██▀▀▀▀▀▀▀██▄  ▄▄▄█▀
▀███████         ███████▀
▀█████▄       ▄█████▀
▀▀▀███▄▄▄███▀▀▀
..PLAY NOW..
nc50lc
Legendary
*
Offline Offline

Activity: 3108
Merit: 8544


Self-proclaimed Genius


View Profile
April 23, 2025, 03:21:07 PM
Merited by Pmalek (2)
 #8

however, it seems nowadays most of the experts/SME would recommend "keystore" i/o Private key in WIF. I left the area for quite a long time, it's time for me to catch up. Grin
WIF is as old as the old version of Bitcoin, two years after the first release. (Oct 2011)
So you must be using Bitcoin before that date.

I actually have an OCD-like request: I really want to know the actual private key corresponding to our addresses, whether it's a Legacy address or a SegWit address. hahaha.
If you're going to follow my instructions, you can include prefix to the WIF private key twice (once each line) to import it and derive as both legacy and SegWit addresses.
Just click the "Info" button in the import private key window for the available prefix.

But if it's an old private key that starts with '5' it wont work for SegWit since it's non-standard.
If it's some other format (aside from bare ECDSA private key), it's mostly used for legacy but not limited to it.

███████████████████████████
███████▄████████████▄██████
████████▄████████▄████████
███▀█████▀▄███▄▀█████▀███
█████▀█▀▄██▀▀▀██▄▀█▀█████
███████▄███████████▄███████
███████████████████████████
███████▀███████████▀███████
████▄██▄▀██▄▄▄██▀▄██▄████
████▄████▄▀███▀▄████▄████
██▄███▀▀█▀██████▀█▀███▄███
██▀█▀████████████████▀█▀███
███████████████████████████
.
.Duelbits PREDICT..
█████████████████████████
█████████████████████████
███████████▀▀░░░░▀▀██████
██████████░░▄████▄░░████
█████████░░████████░░████
█████████░░████████░░████
█████████▄▀██████▀▄████
████████▀▀░░░▀▀▀▀░░▄█████
██████▀░░░░██▄▄▄▄████████
████▀░░░░▄███████████████
█████▄▄█████████████████
█████████████████████████
█████████████████████████
.
.WHERE EVERYTHING IS A MARKET..
█████
██
██







██
██
██████
Will Bitcoin hit $200,000
before January 1st 2027?

    No @1.15         Yes @6.00    
█████
██
██







██
██
██████

  CHECK MORE > 
qixinsame (OP)
Newbie
*
Offline Offline

Activity: 5
Merit: 0


View Profile
June 05, 2025, 01:34:48 PM
 #9

In Sparrow you can sweep the balance of the private key by going to: Tools: Sweep private keys, select the script type (probably legacy, check if your address starts with prefix 1).
That's a good quick option for smaller amounts but that'll expose it in the online device even for a short time.

I tried with Sparrow on my airgapped PC but it seems like i cannot import legacy address into the cold Sparrow so cannot move forward.
If you're fine with Electrum, you can use its imported wallet option to create a non-HD Cold Storage set-up.
Follow this for the steps: /index.php?topic=5524213.msg64885706#msg64885706 (complete with screenshots)
Just replace the step about "mini-private key" with your "WIF", Electrum supports both format.

Of course, use the watch-only Electrum wallet to send to your preferred wallet with SegWit address.

really appreciate your support! one more question: any good strategy in place to ensure my flash disk(USB disk) won't be "contaminated" while it's plugged into my on-line macbook?
nc50lc
Legendary
*
Offline Offline

Activity: 3108
Merit: 8544


Self-proclaimed Genius


View Profile
June 06, 2025, 05:25:26 AM
 #10

-snip-
really appreciate your support! one more question: any good strategy in place to ensure my flash disk(USB disk) won't be "contaminated" while it's plugged into my on-line macbook?
Hmm, there's barely little risk on that since malware that can perform such complicated task is rare,
As long as you do not install shady software on you MacBook you should be safe.

If you want additional layer of protection, you can purchase a reputable flash drive brand with "write-protect switch".
Tick that when plugging in to your offline machine so no data can be transferred out from it to the flash drive. (to transfer the wallet's binary)

For the transaction, you could also manually type each characters instead of using the flash drive.
But with this meticulous method, you must verify the recipient, amount and everything in the transaction before broadcasting since one wrong Byte in the right part could lead to a different recipient HASH160 or amount.

███████████████████████████
███████▄████████████▄██████
████████▄████████▄████████
███▀█████▀▄███▄▀█████▀███
█████▀█▀▄██▀▀▀██▄▀█▀█████
███████▄███████████▄███████
███████████████████████████
███████▀███████████▀███████
████▄██▄▀██▄▄▄██▀▄██▄████
████▄████▄▀███▀▄████▄████
██▄███▀▀█▀██████▀█▀███▄███
██▀█▀████████████████▀█▀███
███████████████████████████
.
.Duelbits PREDICT..
█████████████████████████
█████████████████████████
███████████▀▀░░░░▀▀██████
██████████░░▄████▄░░████
█████████░░████████░░████
█████████░░████████░░████
█████████▄▀██████▀▄████
████████▀▀░░░▀▀▀▀░░▄█████
██████▀░░░░██▄▄▄▄████████
████▀░░░░▄███████████████
█████▄▄█████████████████
█████████████████████████
█████████████████████████
.
.WHERE EVERYTHING IS A MARKET..
█████
██
██







██
██
██████
Will Bitcoin hit $200,000
before January 1st 2027?

    No @1.15         Yes @6.00    
█████
██
██







██
██
██████

  CHECK MORE > 
satscraper
Legendary
*
Offline Offline

Activity: 1428
Merit: 2627



View Profile
June 06, 2025, 06:51:24 AM
 #11

really appreciate your support! one more question: any good strategy in place to ensure my flash disk(USB disk) won't be "contaminated" while it's plugged into my on-line macbook?

Just my quick addition to what nc50lc mentioned. Make sure autorun/autoplay is disabled on your USB flash stck/drive sup]or whatever you put into USB[/sup] even if it’s brand new. This helps prevent any harmful actions from malicious files, including hidden ones, if they happen to be on any media you plug into your USB port.

▄▄███████████████████▄▄
▄███████████████████████▄
████████████████████████
█████████████████████████
████████████████████████
████████████▀██████▀████
████████████████████████
█████████▄▄▄▄███████████
██████████▄▄▄████████████
████████████████████████
████████████████▀▀███████
▀███████████████████████▀
▀▀███████████████████▀▀
 
 EARNBET 
██
██
██
██
██
██
██
██
██
██
██
██
██
███████▄▄███████████
████▄██████████████████
██▀▀███████████████▀▀███
▄████████████████████████
▄▄████████▀▀▀▀▀████████▄▄██
███████████████████████████
█████████▌██▀████████████
███████████████████████████
▀▀███████▄▄▄▄▄█████████▀▀██
▀█████████████████████▀██
██▄▄███████████████▄▄███
████▀██████████████████
███████▀▀███████████
██
██
██
██
██
██
██
██
██
██
██
██
██


▄▄▄
▄▄▄███████▐███▌███████▄▄▄
█████████████████████████
▀████▄▄▄███████▄▄▄████▀
█████████████████████
▐███████████████████▌
███████████████████
███████████████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀

 King of The Castle 
 $200,000 in prizes
██
██
██
██
██
██
██
██
██
██
██
██
██

 62.5% 

 
RAKEBACK
BONUS
qixinsame (OP)
Newbie
*
Offline Offline

Activity: 5
Merit: 0


View Profile
June 08, 2025, 07:51:08 AM
 #12

Hmm, there's barely little risk on that since malware that can perform such complicated task is rare,
As long as you do not install shady software on you MacBook you should be safe.

If you want additional layer of protection, you can purchase a reputable flash drive brand with "write-protect switch".
Tick that when plugging in to your offline machine so no data can be transferred out from it to the flash drive. (to transfer the wallet's binary)

For the transaction, you could also manually type each characters instead of using the flash drive.
But with this meticulous method, you must verify the recipient, amount and everything in the transaction before broadcasting since one wrong Byte in the right part could lead to a different recipient HASH160 or amount.
[/quote]

Thanks for sharing this! however, I plug the USB stick into my online device(macbook) for reasons like transfer the verified Electrum installer to my air-gapped offline laptop which means i need to enable the writing function.

meantime, I just noticed there is an option to transfer the transaction/signed transaction between the offline and online devices via Camera. please forgive my ignorance here, does this "camera transfer" impose any risk here?
satscraper
Legendary
*
Offline Offline

Activity: 1428
Merit: 2627



View Profile
June 08, 2025, 11:29:19 AM
 #13


meantime, I just noticed there is an option to transfer the transaction/signed transaction between the offline and online devices via Camera. please forgive my ignorance here, does this "camera transfer" impose any risk here?

QR based transmission i.e. "camera transfer" is inherently safer if compared with PSBT file transferred over USB due to the strict size limitations of QR codes. For typical Bitcoin transactions the relevant QR code is nearly saturated, leaving negligible room ~ couple of bytes for attacker to insert meaningful malicious script. This makes script based injections highly impractical.

▄▄███████████████████▄▄
▄███████████████████████▄
████████████████████████
█████████████████████████
████████████████████████
████████████▀██████▀████
████████████████████████
█████████▄▄▄▄███████████
██████████▄▄▄████████████
████████████████████████
████████████████▀▀███████
▀███████████████████████▀
▀▀███████████████████▀▀
 
 EARNBET 
██
██
██
██
██
██
██
██
██
██
██
██
██
███████▄▄███████████
████▄██████████████████
██▀▀███████████████▀▀███
▄████████████████████████
▄▄████████▀▀▀▀▀████████▄▄██
███████████████████████████
█████████▌██▀████████████
███████████████████████████
▀▀███████▄▄▄▄▄█████████▀▀██
▀█████████████████████▀██
██▄▄███████████████▄▄███
████▀██████████████████
███████▀▀███████████
██
██
██
██
██
██
██
██
██
██
██
██
██


▄▄▄
▄▄▄███████▐███▌███████▄▄▄
█████████████████████████
▀████▄▄▄███████▄▄▄████▀
█████████████████████
▐███████████████████▌
███████████████████
███████████████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀

 King of The Castle 
 $200,000 in prizes
██
██
██
██
██
██
██
██
██
██
██
██
██

 62.5% 

 
RAKEBACK
BONUS
nc50lc
Legendary
*
Offline Offline

Activity: 3108
Merit: 8544


Self-proclaimed Genius


View Profile
June 09, 2025, 05:32:36 AM
Merited by Pmalek (3)
 #14

Thanks for sharing this! however, I plug the USB stick into my online device(macbook) for reasons like transfer the verified Electrum installer to my air-gapped offline laptop which means i need to enable the writing function.
The goal is to keep anything in the Air-Gap machine from leaving the Cold-storage when you transfer the Electrum Binary to it.
So, in the slightest chance that the flash drive is infected with a malware specifically designed to steal from Cold-storage systems,
It wont be able to send whatever data that needs to transfer to the online machine if the flash drive in write protected when plugged in the Air-Gap machine.

Otherwise, there's no way to install Electrum aside from manually copying the whole source code then run it from source, including the dependencies (which needs an off-site topic).
If you'd somehow consider it, here's the source code: github.com/spesmilo/electrum

Quote from: qixinsame
meantime, I just noticed there is an option to transfer the transaction/signed transaction between the offline and online devices via Camera. please forgive my ignorance here, does this "camera transfer" impose any risk here?
There was a security issue that can be utilized to run arbitrary script when a BIP70 payment request QR is scanned, but that was patched in v4.2.2.
If you're using the latest version, that attack will not work.
And also, like in the note of it being "complicated"; the attack has to be very specific with steps involving getting a script in the Air-Gap machine and making it scan the QR code, then find a way to send the script's "hacked" data to the online machine.

For the transaction, that should be a good alternative to PSBT transfer.
But take note that Electrum doesn't support animated QR so if the transaction's size is big (e.g: lots of signatures/inputs), it may not work or may omit some data.
The QR Code window has a warning for that:

This usually doesn't cause issue with transactions containing pure Native SegWit inputs.
It'll fail anyway if the cold-storage can't sign it. Just always check the final transaction before broadcasting.

███████████████████████████
███████▄████████████▄██████
████████▄████████▄████████
███▀█████▀▄███▄▀█████▀███
█████▀█▀▄██▀▀▀██▄▀█▀█████
███████▄███████████▄███████
███████████████████████████
███████▀███████████▀███████
████▄██▄▀██▄▄▄██▀▄██▄████
████▄████▄▀███▀▄████▄████
██▄███▀▀█▀██████▀█▀███▄███
██▀█▀████████████████▀█▀███
███████████████████████████
.
.Duelbits PREDICT..
█████████████████████████
█████████████████████████
███████████▀▀░░░░▀▀██████
██████████░░▄████▄░░████
█████████░░████████░░████
█████████░░████████░░████
█████████▄▀██████▀▄████
████████▀▀░░░▀▀▀▀░░▄█████
██████▀░░░░██▄▄▄▄████████
████▀░░░░▄███████████████
█████▄▄█████████████████
█████████████████████████
█████████████████████████
.
.WHERE EVERYTHING IS A MARKET..
█████
██
██







██
██
██████
Will Bitcoin hit $200,000
before January 1st 2027?

    No @1.15         Yes @6.00    
█████
██
██







██
██
██████

  CHECK MORE > 
qixinsame (OP)
Newbie
*
Offline Offline

Activity: 5
Merit: 0


View Profile
June 09, 2025, 03:03:24 PM
 #15

The goal is to keep anything in the Air-Gap machine from leaving the Cold-storage when you transfer the Electrum Binary to it.
So, in the slightest chance that the flash drive is infected with a malware specifically designed to steal from Cold-storage systems,
It wont be able to send whatever data that needs to transfer to the online machine if the flash drive in write protected when plugged in the Air-Gap machine.

Otherwise, there's no way to install Electrum aside from manually copying the whole source code then run it from source, including the dependencies (which needs an off-site topic).
If you'd somehow consider it, here's the source code: github.com/spesmilo/electrum

Aha~~ Now i get it! thanks!

There was a security issue that can be utilized to run arbitrary script when a BIP70 payment request QR is scanned, but that was patched in v4.2.2.
If you're using the latest version, that attack will not work.
And also, like in the note of it being "complicated"; the attack has to be very specific with steps involving getting a script in the Air-Gap machine and making it scan the QR code, then find a way to send the script's "hacked" data to the online machine.

For the transaction, that should be a good alternative to PSBT transfer.
But take note that Electrum doesn't support animated QR so if the transaction's size is big (e.g: lots of signatures/inputs), it may not work or may omit some data.
The QR Code window has a warning for that:
https://www.talkimg.com/images/2025/06/09/UdnNB9.png
This usually doesn't cause issue with transactions containing pure Native SegWit inputs.
It'll fail anyway if the cold-storage can't sign it. Just always check the final transaction before broadcasting.

I saw another expert's comment that transfer the transaction via QR scan is more safer than PBST file transfer between 2 devices via USB stick because each QR transmission (like a container) can only contain limited bytes, like the transaction. which i think is also resonated with the caveat you shared. since my transaction is a single signed transaction from a legacy address, assume QR scan would be a better alternative than PBST transfer, right? again, thanks for your sharing and guidance, i really learnt a lot through our conversation.
Forsyth Jones
Legendary
*
Offline Offline

Activity: 1862
Merit: 2030


I love Bitcoin!


View Profile WWW
June 09, 2025, 06:33:09 PM
 #16

If you have any issues with the signed transaction QR Code from the Electrum wallet, you can use Sparrow Wallet as an alternative. However, since your wallet is single-sig, you will usually not have any issues. I heard that Sparrow Wallet has better support for signed QR Codes. Correct me if I'm wrong.

Note: only native Electrum wallets are compatible with Sparrow Wallet. Wallets created by importing BIP39 keystores into Electrum won't work, you'll need to restore them by re-entering the original BIP39 seed phrase instead.

In Sparrow, you should go to: File > Import Wallet > Electrum and apply your Electrum passphrase.

███████████████████████████
███████▄████████████▄██████
████████▄████████▄████████
███▀█████▀▄███▄▀█████▀███
█████▀█▀▄██▀▀▀██▄▀█▀█████
███████▄███████████▄███████
███████████████████████████
███████▀███████████▀███████
████▄██▄▀██▄▄▄██▀▄██▄████
████▄████▄▀███▀▄████▄████
██▄███▀▀█▀██████▀█▀███▄███
██▀█▀████████████████▀█▀███
███████████████████████████
.
.Duelbits PREDICT..
█████████████████████████
█████████████████████████
███████████▀▀░░░░▀▀██████
██████████░░▄████▄░░████
█████████░░████████░░████
█████████░░████████░░████
█████████▄▀██████▀▄████
████████▀▀░░░▀▀▀▀░░▄█████
██████▀░░░░██▄▄▄▄████████
████▀░░░░▄███████████████
█████▄▄█████████████████
█████████████████████████
█████████████████████████
.
.WHERE EVERYTHING IS A MARKET..
█████
██
██







██
██
██████
Will Bitcoin hit $200,000
before January 1st 2027?

    No @1.15         Yes @6.00    
█████
██
██







██
██
██████

  CHECK MORE > 
nc50lc
Legendary
*
Offline Offline

Activity: 3108
Merit: 8544


Self-proclaimed Genius


View Profile
June 10, 2025, 05:48:26 AM
 #17

-snip-
-snip- since my transaction is a single signed transaction from a legacy address, assume QR scan would be a better alternative than PBST transfer, right?
I can't say "yes" for certain since your wallet is legacy and you're using Electrum's QR.
It's not just the number of signatures per input but also the number of inputs in a transaction (and a few more bytes for using pay-to-many)
that can increase the size of the PSBT specially on legacy which requires additional data per input for offline-signing.

Read this post for reference: /index.php?topic=5504548.msg64385330#msg64385330

So I'll leave it as "case-to-case" basis on which is better.

███████████████████████████
███████▄████████████▄██████
████████▄████████▄████████
███▀█████▀▄███▄▀█████▀███
█████▀█▀▄██▀▀▀██▄▀█▀█████
███████▄███████████▄███████
███████████████████████████
███████▀███████████▀███████
████▄██▄▀██▄▄▄██▀▄██▄████
████▄████▄▀███▀▄████▄████
██▄███▀▀█▀██████▀█▀███▄███
██▀█▀████████████████▀█▀███
███████████████████████████
.
.Duelbits PREDICT..
█████████████████████████
█████████████████████████
███████████▀▀░░░░▀▀██████
██████████░░▄████▄░░████
█████████░░████████░░████
█████████░░████████░░████
█████████▄▀██████▀▄████
████████▀▀░░░▀▀▀▀░░▄█████
██████▀░░░░██▄▄▄▄████████
████▀░░░░▄███████████████
█████▄▄█████████████████
█████████████████████████
█████████████████████████
.
.WHERE EVERYTHING IS A MARKET..
█████
██
██







██
██
██████
Will Bitcoin hit $200,000
before January 1st 2027?

    No @1.15         Yes @6.00    
█████
██
██







██
██
██████

  CHECK MORE > 
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!