Bitcoin Forum
May 07, 2024, 01:06:46 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: [GUIDE] Secure paper wallets.  (Read 1059 times)
7Priest7 (OP)
Sr. Member
****
Offline Offline

Activity: 392
Merit: 250


View Profile
December 08, 2013, 09:25:26 PM
 #1

A paper wallet is a great way to ensure the longevity of your bitcoins.
If your OS/hardware fails, it will allow you to access your funds.

When you print the paper wallets that are currently commonplace,
it is not secure against physical theft.

This guide aims to inform individuals a few ways
they could go about securing their paper wallet.


Encryption at its core is altering data in a way that makes
it difficult/impossible to access by unauthorized individuals.

The easiest way for a end user to secure their private key would be to use a easily available tool.
Such as WebCrypt.

If you are more adventurous/concerned you could choose to do custom encryption.
To give a example I will share a excerpt from a open source php script I created when I was young.

Code: (php)
// The two functions below borrowed from http://www.phpit.net/code/binary-text/
function bin2text($bin_str)  // A function to convert Binary to Text
{
    $text_str = '';  // Initilize a blank string
    $chars = explode("\n", chunk_split(str_replace("\n", '', $bin_str), 8)); // Split the Binary into groups of 8
    $_I = count($chars);  // Figure out how many characters there are
    for($i = 0; $i < $_I; $i++  ) // As long as a charcter exists
$text_str .= chr(bindec($chars[$i])); // Convert it to binary
    return $text_str; // Give the converted text
}

function text2bin($txt_str) // Convert text to binary
{
    $len = strlen($txt_str); // Figure out how long the string is
    $bin = ''; // Initilize a blank string
    for($i = 0; $i < $len; $i++ )  // As long as there are more chars to convert
    {
        $bin .= strlen(decbin(ord($txt_str[$i]))) < 8 ? str_pad(decbin(ord($txt_str[$i])), 8, 0, STR_PAD_LEFT) : decbin(ord($txt_str[$i])); // Convert them to Binary
    }
    return $bin; // Give the binary
}
// The two functions above borrowed from http://www.phpit.net/code/binary-text/

function encrypt($txt) // Encrypt the data
{
   $mtxt = $txt; // Copy the given data
   $len = strlen($txt); // Check the length of given data
   $o = array("A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"); // An array with the alphabet
   $n = array("A","S","D","F","G","H","J","K","L","Q","W","E","R","T","Y","U","I","O","P","Z","X","C","V","B","N","M","a","s","d","f","g","h","j","k","l","q","w","e","r","t","y","u","i","o","p","z","x","c","v","b","n","m"); // An array of alphabet substitutes
   for ($cur_pos = 0; $cur_pos < $len; $cur_pos++) // As long as the string is still going
for($i=0;$i < 52;$i++) // Run through the letters
if ($txt[$cur_pos] == $o[$i]) // If you find a letter needing to be encrypted
$mtxt[$cur_pos] = $n[$i]; // Encrypt it
   return $mtxt; // Return the encrypted text
}

function decrypt($txt) // Decrypt data
{
   $mtxt = $txt; // Copy the given data
   $len = strlen($txt); // Check the length
   $o = array("A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z");
   $n = array("A","S","D","F","G","H","J","K","L","Q","W","E","R","T","Y","U","I","O","P","Z","X","C","V","B","N","M","a","s","d","f","g","h","j","k","l","q","w","e","r","t","y","u","i","o","p","z","x","c","v","b","n","m");
   for ($cur_pos = 0; $cur_pos < $len; $cur_pos++) // As long as the string is still going
for($i=0;$i < 52;$i++) // Run through the letters
if ($txt[$cur_pos] == $n[$i]) // If you find a letter needing decrypt
$mtxt[$cur_pos] = $o[$i]; // Decrypt it
   return $mtxt; // Return the decrypted text
}

function encrypt2($bin) // Convert binary to something less obvious
{
   $mbin = $bin; //  copy the given binary
   $b = array("0","1"); //  An array with binary
   $r = array("Haa","Ha"); // An array to replace binary
   for($i=0;$i < 2;$i++)// For 0 and 1
   {
      $mbin = ereg_replace($b[$i],$r[$i],$mbin); // convert them
   }
   return $mbin; // Return a less suspicious string
}

function decrypt2($bin) // Convert a less obvious string to binary
{
   $mbin = $bin; // Copy the given string
   $b = array("0","1");
   $r = array("Haa","Ha");
   for($i=0;$i<2;$i++) // For 1 and 0
   {
      $mbin = ereg_replace($r[$i],$b[$i],$mbin); // Change your less suspicous string back to binary
   }
   return $mbin; // Return the binary
}

if(isset($_GET['e'])) // If the user want to encrypt
{
   // GTU stands for Give To User
   $gtu = encrypt($_GET['e']); // Change the letters around
   $gtu = text2bin($gtu); // Convert the changed letters to binary
   $gtu = encrypt2($gtu); // Encrypt the binary
   if($am == 1 && isset($_GET['et'])) // If you have chosen to allow email and they filled out the email address
   {
      if(mail($_GET['et'],$_GET['es'],$gtu)) // Send a mail
         $mail = "Mail Sent"; // If the mail was sent tell them
      else
         $mail= "Failed to send mail"; // If the mail failed to send tell them
   }
}
else if(isset($_GET['d']))
{
   $gtu = decrypt2($_GET['d']); // Get a weird string and convert to binary
   $gtu = bin2text($gtu); // Convert the binary to text
   $gtu = decrypt($gtu); // Change the letters to how they should be
}

What the above custom encryption will spit out is a bunch of "HaaHaHaaHaHa".
Printed on a paper it would like utter nonsense waste of ink.

With a little creativity and patience you can create your own encryption.


I hope that this guide will aid/inform somebody.
Perhaps make BTC in general feel just a little bit safer. Wink
1715087206
Hero Member
*
Offline Offline

Posts: 1715087206

View Profile Personal Message (Offline)

Ignore
1715087206
Reply with quote  #2

1715087206
Report to moderator
1715087206
Hero Member
*
Offline Offline

Posts: 1715087206

View Profile Personal Message (Offline)

Ignore
1715087206
Reply with quote  #2

1715087206
Report to moderator
1715087206
Hero Member
*
Offline Offline

Posts: 1715087206

View Profile Personal Message (Offline)

Ignore
1715087206
Reply with quote  #2

1715087206
Report to moderator
Every time a block is mined, a certain amount of BTC (called the subsidy) is created out of thin air and given to the miner. The subsidy halves every four years and will reach 0 in about 130 years.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715087206
Hero Member
*
Offline Offline

Posts: 1715087206

View Profile Personal Message (Offline)

Ignore
1715087206
Reply with quote  #2

1715087206
Report to moderator
1715087206
Hero Member
*
Offline Offline

Posts: 1715087206

View Profile Personal Message (Offline)

Ignore
1715087206
Reply with quote  #2

1715087206
Report to moderator
1715087206
Hero Member
*
Offline Offline

Posts: 1715087206

View Profile Personal Message (Offline)

Ignore
1715087206
Reply with quote  #2

1715087206
Report to moderator
dwdoc
Legendary
*
Offline Offline

Activity: 966
Merit: 1000


- - -Caveat Aleo- - -


View Profile
December 10, 2013, 12:04:05 AM
 #2

I posted a video showing how to create a secure paper wallet using a windows PC and a single CD. No usb drive necessary.

http://youtu.be/azZYO4FuBCs
7Priest7 (OP)
Sr. Member
****
Offline Offline

Activity: 392
Merit: 250


View Profile
December 10, 2013, 12:59:57 AM
 #3

I posted a video showing how to create a secure paper wallet using a windows PC and a single CD. No usb drive necessary.

http://youtu.be/azZYO4FuBCs
That video is pretty long to just create a paper wallet offline.

One can easily download vanitygen to do the same thing on a offline machine.

The video only briefly mentions added security at the very end.

I doubt that video would be within the scope of the average persons skill set.
dwdoc
Legendary
*
Offline Offline

Activity: 966
Merit: 1000


- - -Caveat Aleo- - -


View Profile
December 10, 2013, 01:09:41 AM
 #4

I posted a video showing how to create a secure paper wallet using a windows PC and a single CD. No usb drive necessary.

http://youtu.be/azZYO4FuBCs
That video is pretty long to just create a paper wallet offline.

One can easily download vanitygen to do the same thing on a offline machine.

The video only briefly mentions added security at the very end.

I doubt that video would be within the scope of the average persons skill set.

You can use vanitygen instead of bitaddress.org but if you are going to use a virgin operating system you will need to install one on a CD and/or USB drive.
The video shows how to make a CD that contains both the encryption software and the operating system.
7Priest7 (OP)
Sr. Member
****
Offline Offline

Activity: 392
Merit: 250


View Profile
December 10, 2013, 02:09:34 AM
 #5

You can use vanitygen instead of bitaddress.org but if you are going to use a virgin operating system you will need to install one on a CD and/or USB drive.
The video shows how to make a CD that contains both the encryption software and the operating system.

I skipped large portions of the video.
Good job.
I should probably cobble together a custom tinycore distro for creating Secure Bitcoin Wallets.
Would defiantly make it much easier for the end users.

Perhaps a freedos distro, I will check on some options later.
dwdoc
Legendary
*
Offline Offline

Activity: 966
Merit: 1000


- - -Caveat Aleo- - -


View Profile
December 10, 2013, 02:58:34 AM
Last edit: December 10, 2013, 03:20:23 AM by dwdoc
 #6

You can use vanitygen instead of bitaddress.org but if you are going to use a virgin operating system you will need to install one on a CD and/or USB drive.
The video shows how to make a CD that contains both the encryption software and the operating system.

I skipped large portions of the video.
Good job.
I should probably cobble together a custom tinycore distro for creating Secure Bitcoin Wallets.
Would defiantly make it much easier for the end users.

Perhaps a freedos distro, I will check on some options later.

That's a good idea. I will post a link to the modified iso file in case anyone wants to download and burn it directly without them having to create it.
The video is for those who only have trust in DIY.

Here's the link (just burn the image to a CD, turn off your computer, disconnect the internet and hard drive and turn your computer back on-it should boot from the CD).

https://drive.google.com/file/d/0B8Iem6UdgSqMTXNIb0FNR0x1MUE/edit?usp=sharing
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!