Bitcoin Forum
November 09, 2024, 05:17:29 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Signing a transaction using Electrum without using a USB stick  (Read 117 times)
btc123thatthere (OP)
Member
**
Offline Offline

Activity: 131
Merit: 29


View Profile
February 07, 2021, 03:40:06 AM
 #1

So let's say I have an Electrum cold machine and an Electrum internet-connected machine running.
I generate a transaction on the connected machine using Electrum.
Instead of moving this unsigned transaction on to a USB stick, can I type it into the cold machine instead of using a USB stick? Can hash it on notepad++ to make sure it's got no typos.
Can I do this?
(And then type the signed transaction back into the connected machine to broadcast.)

Just need to know there's a way of signing a transaction without using a USB stick! It kinda feels like cheating as it's not so cold once a USB stick is used.
(Assuming that nothing malicious manages to leak the private key through a fake signed transaction I guess..)
ranochigo
Legendary
*
Offline Offline

Activity: 3038
Merit: 4420


Crypto Swap Exchange


View Profile
February 07, 2021, 03:42:26 AM
 #2

Yes you can. You can use whichever transfer medium that you need as long as the raw transaction gets transferred between the online and offline computer.

Electrum supports QR codes natively, if you have a camera you can use it to transfer the raw TXes as well.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
nc50lc
Legendary
*
Online Online

Activity: 2590
Merit: 6360


Self-proclaimed Genius


View Profile
February 07, 2021, 03:51:25 AM
 #3

Wow, that'll be a laborious process but will definitely work   Shocked
Use the options: "Tools->Load transaction->From text".

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
HCP
Legendary
*
Offline Offline

Activity: 2086
Merit: 4361

<insert witty quote here>


View Profile
February 07, 2021, 04:31:53 AM
 #4

It's just text... so you can transfer it however you light... the most common way is to simply transfer a file containing the exported, unsigned transaction using a usb stick. Some folks use cameras and QR Codes...

But if you're a complete masochist, you can definitely type it in manually if you wish Shocked Shocked Shocked Although, why anyone in their right mind would even attempt something like this is beyond me... it's hard enough typing a Bitcoin Address in by hand without making any errors... let along a long unsigned transaction hex string! Tongue


█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
btc123thatthere (OP)
Member
**
Offline Offline

Activity: 131
Merit: 29


View Profile
February 07, 2021, 04:39:44 AM
 #5

I wonder if the end of the transaction data contains a hash for error prevention, like a bitcoin address does?
HCP
Legendary
*
Offline Offline

Activity: 2086
Merit: 4361

<insert witty quote here>


View Profile
February 07, 2021, 04:44:32 AM
 #6

It does not... but if the error causes the underlying script to be invalid, when the wallet attempts to decode and check the script, it'll likely generate errors... or, you might find you just accidentally change that output amount from 0.1 BTC to 1 BTC Tongue

It kind of depends where the error occurs... and what bytes were changed by the error... and what they were changed to.

Obviously, this is only an issue with the "unsigned" transaction... after it is "signed" any modifications will break the signature and it will fail to broadcast etc... and with the "unsigned" transaction, you should be double checking all the details before signing it anyway Wink


Or, you could just use a usb stick Tongue

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
pooya87
Legendary
*
Offline Offline

Activity: 3626
Merit: 11020


Crypto Swap Exchange


View Profile
February 07, 2021, 05:08:14 AM
 #7

If you could write a small code you would be able to make "typing by hand" a lot easier for yourself if you simply converted the transaction (raw bytes) into a mnemonic (set of words) since typing words is easier than typing hex. In any case this is just an idea:

* You could use an altered BIP39 method (which also has a checksum for error detection). It will select 11 bits at a time and convert them to a word from the 2048 word long list it has. You will have to add the length at the beginning and pad it all with checksum.
The benefit of this is a slightly shorter result due to the larger word list. You may also already have the word list and the method to easily modify. It could also be added on top of any wallet.
The downside is that it is a little harder to implement since it selects 11 bits and we don't have any value type that is 11 bits.

* You could also use the more common PGP word list which contains two sets of 256 words and selects 8 bits (one byte) at a time and converts them to a word from that list depending on if it is an odd or an even index. If you want checksum you'll have to add it yourself.
The benefit of this is the easy implementation since we already have a value type that is 8 bits (a byte) and it is easier to select them.
The downside is a slightly bigger result and the fact that it needs its own word list which isn't available on wallets already.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
ABCbits
Legendary
*
Offline Offline

Activity: 3052
Merit: 8073


Crypto Swap Exchange


View Profile
February 07, 2021, 12:20:27 PM
Merited by DireWolfM14 (1), btc123thatthere (1)
 #8

Since you seriously plan to do it, i would suggest you to break the signed transaction into smaller parts. For example i'm using following RAW transaction in my node mempool

Code:
02000000000101aad7a7422e12581cfda9bbaa5d35c1120675c517dae2c75bcb7e539f1791b3b60100000000feffffff02cf24110000000000160014d7946ee649bf57b01695a75d4345ac8e3f9a4317e52200000000000017a9141b3bcc23e1a7fac9d4894bd4d9a1721c933d7b0c8702473044022027a9832c66ddbe593cb69e6dcfce6ece1ed7452123022aef731afaedc1a75e4e022026a80a4a5fd142ec4523d62031ba38e667e47416ca894d411a1ff1322fae99f30121037da087a4c64d1153fd26b7290b8782ae91d580a0b75b48e9448071907b3fedc834330a00

For example i split by inserting space every 4 character and new line every 64 character, so the RAW transaction will look like this

Code:
0200 0000 0001 01aa d7a7 422e 1258 1cfd a9bb aa5d 35c1 1206 75c5 17da e2c7 5bcb
7e53 9f17 91b3 b601 0000 0000 feff ffff 02cf 2411 0000 0000 0016 0014 d794 6ee6
49bf 57b0 1695 a75d 4345 ac8e 3f9a 4317 e522 0000 0000 0000 17a9 141b 3bcc 23e1
a7fa c9d4 894b d4d9 a172 1c93 3d7b 0c87 0247 3044 0220 27a9 832c 66dd be59 3cb6
9e6d cfce 6ece 1ed7 4521 2302 2aef 731a faed c1a7 5e4e 0220 26a8 0a4a 5fd1 42ec
4523 d620 31ba 38e6 67e4 7416 ca89 4d41 1a1f f132 2fae 99f3 0121 037d a087 a4c6
4d11 53fd 26b7 290b 8782 ae91 d580 a0b7 5b48 e944 8071 907b 3fed c834 330a 00

Alternatively, generate QR code from the cold machine and scan it with your smartphone where you can broadcast from your phone or transfer the RAW transaction to your computer/laptop.

If you could write a small code you would be able to make "typing by hand" a lot easier for yourself if you simply converted the transaction (raw bytes) into a mnemonic (set of words) since typing words is easier than typing hex. In any case this is just an idea:

Alternatively you can convert to HEX to representation which uses more character (such as Base58 or Base64) if you can't/don't bother write small code.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
btc123thatthere (OP)
Member
**
Offline Offline

Activity: 131
Merit: 29


View Profile
January 06, 2023, 10:36:22 AM
 #9

Well if it's half a kilobyte that should be doable in 20 minutes. Over an hour might start to get masochistic  Grin (He says taking 2 years to reply..)
DireWolfM14
Copper Member
Legendary
*
Offline Offline

Activity: 2338
Merit: 4543


Join the world-leading crypto sportsbook NOW!


View Profile WWW
January 06, 2023, 08:02:26 PM
 #10

If your goal is to avoid USB sticks due the risk of transferring viruses or malware, you can also use QR codes and cameras to transfer the data.  Both machines will need to be equipped with webcams, obviously.

  ▄▄███████▄███████▄▄▄
 █████████████
▀▀▀▀▀▀████▄▄
███████████████
       ▀▀███▄
███████████████
          ▀███
 █████████████
             ███
███████████▀▀               ███
███                         ███
███                         ███
 ███                       ███
  ███▄                   ▄███
   ▀███▄▄             ▄▄███▀
     ▀▀████▄▄▄▄▄▄▄▄▄████▀▀
         ▀▀▀███████▀▀▀
░░░████▄▄▄▄
░▄▄░
▄▄███████▄▀█████▄▄
██▄████▌▐█▌█████▄██
████▀▄▄▄▌███░▄▄▄▀████
██████▄▄▄█▄▄▄██████
█░███████░▐█▌░███████░█
▀▀██▀░██░▐█▌░██░▀██▀▀
▄▄▄░█▀░█░██░▐█▌░██░█░▀█░▄▄▄
██▀░░░░▀██░▐█▌░██▀░░░░▀██
▀██
█████▄███▀▀██▀▀███▄███████▀
▀███████████████████████▀
▀▀▀▀███████████▀▀▀▀
█████████████LEADING CRYPTO SPORTSBOOK & CASINO█████████████
MULTI
CURRENCY
1500+
CASINO GAMES
CRYPTO EXCLUSIVE
CLUBHOUSE
FAST & SECURE
PAYMENTS
.
..PLAY NOW!..
LoyceMobile
Hero Member
*****
Offline Offline

Activity: 1697
Merit: 701


LoyceV on the road. Or couch.


View Profile WWW
January 06, 2023, 08:35:37 PM
 #11

Well if it's half a kilobyte that should be doable in 20 minutes. Over an hour might start to get masochistic  Grin (He says taking 2 years to reply..)
500 bytes takes a minute to type. Then type it again to find mistakes.

LoyceV on the road Advertise here for LN Don't deal with this account (exception)
Advertise here for LN Tip my kids Exchange LN (20 coins). 1% fee. No KYC <€50/month
My useful topics: Meritt & Trust & Moreee Art Advertise here for LN Foru[url=https://bitcointalk.org/m
nc50lc
Legendary
*
Online Online

Activity: 2590
Merit: 6360


Self-proclaimed Genius


View Profile
January 07, 2023, 01:32:30 PM
 #12

Well if it's half a kilobyte that should be doable in 20 minutes. Over an hour might start to get masochistic  Grin (He says taking 2 years to reply..)
Seeing this reply after two years means that you remarkably haven't made an error that replaced the output's amount
or worse, sent to a "blackhole" recipient by typo~ing the pubKeyHash.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
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!