Skip to content

A broken, hardly working proof-of-concept of pushing Bitcoin transactions over DTMF

Notifications You must be signed in to change notification settings

haiyanksa/bitcoin-tone

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WARNING - This proof-of-concept is almost broken, and only just works. Use at own risk, no warranty! It was made to test some stuff and should not be used with any reasonable amount of Bitcoin. DO NOT USE WALLET FILES THAT CONTAIN A LOT OF BITCOIN

I cannot state this enough: USE AT OWN RISK

Introduction

This repo was made to test out of a DTMF way (telephone key tones) method of sending a transaction would work. This could be used to sent out a transaction from a location that only has Landline or Cellphone coverage, without the need for a trusted party. The transaction that is pushed out cannot be forged (as far as I know). I used an old issue from Phrack for the DTFM tones. The code is included and does not have a license as far as I know....

Schematic of possible way to implement:

[Offline wallet]
      |
[bitcoin-tone script]
      |
[DTFM String over landline]
      |
[POTS Network]
      |
[DTFM Bitcoin node]
      |
[Internet/Blockchain]

Preparation

This test-script takes in a raw transaction this can be done (From Electrum) by typing

electrum mktx 1YourDestinationaddress6ERxFWvwuZ6UCx 0.1

This gives you a raw transaction text. Starts with a 01.....

Workings

This proof-of-concept does a few things.

  • Main.sh - This is the test script that does the most stuff. Parse the raw transaction as an argument (./Main.sh )
  • gen - this is the tool to generate the decimal version of the transaction
  • detect - this tool can read back the transaction from a .wav file (8000Hz, 8-bit, 1 Channel works best)

Main.sh uses Sox to convert the RAW Unsigned audio generated by gen to a readable wav for testing.

Compiling gen & detec

Like this

gcc gen.c -o gen
gcc -DUNSIGNED deteect.c -o detect

Checksum

Main.sh uses a very simple and possibly broken method to determine of the entire DTMF string is still sane. It counts all the single digits together, and checks this against the last 4 (checksum) digits. If these match, there is a pretty high chance the string came through in one piece.

My Testing method

While offline:

  • Created an Electrum transaction
  • Used Main.sh to create the DTMF wav file
  • Played this to my voicemail of my phone (took 5 minutes)

While online:

  • Recorded the Wav voicemail containing the DTMF transaction to my online laptop
  • Used the last part of Main.sh to extract the transaction, and convert back to hex
  • Pushed the transaction onto the network using https://blockchain.info/nl/pushtx

The transaction came to my wallet.

Bugs, lessons learned

This was all a learning experience. What I have done

  • I takes anywhere from 3 to 7 minutes of DTMF tones to transfer a transaction over a landline.
  • My code is really bad
  • The quality of the audio really matters - 1 digit can mess up the entire file

Donations welcome for my hobby stuff: 15Rkg1q6oqCb918WW2ioY21kiokP6wAZsq

About

A broken, hardly working proof-of-concept of pushing Bitcoin transactions over DTMF

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published