Bitcoin Forum
April 19, 2024, 04:00:30 PM *
News: Latest Bitcoin Core release: 26.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1] 2 3 4 5 »  All
  Print  
Author Topic: GnuPG versus TrueCrypt  (Read 28717 times)
gene (OP)
Sr. Member
****
Offline Offline

Activity: 252
Merit: 250


View Profile
June 13, 2011, 12:06:19 PM
Last edit: June 13, 2011, 12:26:21 PM by gene
 #1

I see many people recommending TrueCrypt for backing up and securing wallets. I think it is important to protect wallets, but I suggest that GnuPG would be the better tool. As BTC become increasingly valuable, it becomes more and more important to use the best tools to protect your stash.

GPG is more than a tool facilitating symmetric crypto. It is a standardized and well-tested suite of tools that permit encryption/signing of arbitrary data such as files and email. Basically, anyone looking to get deeper into the bitcoin economy would be well-advised to understand and use GPG to develop and maintain a cryptographically strong reputation. TrueCrypt just isn't as flexible. GPG also follows an established standard, and it interoperable with commercial software. TrueCrypt does not. TrueCrypt also isn't available for nearly as many platforms as GPG.

TrueCrypt's novel feature is the "deniable" filesystem. Bruce Schneier has published some work on it and stated that he "wouldn't trust it."

Then there is the small matter of licensing. GnuPG is licensed under the GPL. TrueCrypt has a non-free license.

From http://en.wikipedia.org/wiki/Truecrypt#Licensing

Quote
The TrueCrypt License has not been officially approved by the Open Source Initiative and is not considered "free" by several major Linux distributions (Arch Linux,[35] Debian,[36] Ubuntu,[37] Fedora,[38] openSUSE,[39] Gentoo[40]), mainly because of distribution and copyright-liability reasons.[41]

How to use GPG?

Code:
gpg --compress-algo BZIP2 --bzip2-compress-level 9 --encrypt -a -o text_crypt_wallet.txt wallet.dat

This will compress and then encrypt your wallet using your private GPG key. The -a flag tells gpg to give you ascii-armored (printable) output. The -o flag tells gpg to name the output file "text_crypt_wallet.txt". You can then print this out. The file will look something like this:

Code:
-----BEGIN PGP MESSAGE-----

gz9DKDc3Qb+idbP5gOn0TIZ5Sg74zP7ds4eoezpG5HPSvt3RXARQcvSeUrW8htFD

<lots of stuff>

aTEOO/lqWw/BzwZN
=FdZO
-----END PGP MESSAGE-----

I recommend first moving bitcoins to a fresh wallet with a single address via a single transaction, so as to have as small a file as possible. Otherwise, you may end up with many pages of output.

Make sure the font is OCR-readable (http://en.wikipedia.org/wiki/Optical_character_recognition) and large enough to avoid scanning and transcription errors. Also, make sure to keep track of page numbers.

If you don't have a GPG key, you can encrypt it via just a symmetric cipher and password:

Code:
gpg --compress-algo BZIP2 --bzip2-compress-level 9 --symmetric -a -o text_crypt_wallet.txt wallet.dat

Just don't forget your password.

By default, GPG uses CAST5 as the symmetric cipher. Note that you can always specify which symmetric cipher you want to use (all of gpg's ciphers are considered strong) with one of these flags:

Code:
--cipher-algo 3DES
--cipher-algo AES128
--cipher-algo AES192
--cipher-algo AES256
--cipher-algo BLOWFISH
--cipher-algo CAMELLIA
--cipher-algo TWOFISH

To recover the wallet, you can scan the document and OCR it to a file. Then decrypt it:

Code:
gpg --decrypt -o wallet.dat scanned_text_file.txt

If you are running GNU/Linux, you probably already have GnuPG If you have windows, you can get GnuPG here: http://www.gpg4win.org/

*processing payment* *error 404 : funds not found*
Do you want to complain on the forum just to fall for another scam a few days later?
| YES       |        YES |
1713542430
Hero Member
*
Offline Offline

Posts: 1713542430

View Profile Personal Message (Offline)

Ignore
1713542430
Reply with quote  #2

1713542430
Report to moderator
"Your bitcoin is secured in a way that is physically impossible for others to access, no matter for what reason, no matter how good the excuse, no matter a majority of miners, no matter what." -- Greg Maxwell
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
Nesetalis
Sr. Member
****
Offline Offline

Activity: 420
Merit: 250



View Profile
June 13, 2011, 12:14:49 PM
 #2

one of the problems with using gpg, is you also have to backup your public and private key. The most likely scenario where you need to recover a backed up wallet, is if your computer has crashed. Truecrypt can allow you to decrypt something with simply a password or a keyfile or both. also, true crypt allows that if some one gets access to your computer, they cant just find your public/private key pair and unlock your wallet... (unless you of course save the decryption key in truecrypt like a dumbass)

What I personally do, is store my gpg keys and my wallet in a truecrypt volume, then email that volume to myself, to store it in 3 places, sent computer, web based email service, and recieved computer. then use a 50+ character passphrase to gain access.

ZOMG Moo!
gene (OP)
Sr. Member
****
Offline Offline

Activity: 252
Merit: 250


View Profile
June 13, 2011, 12:17:35 PM
 #3

one of the problems with using gpg, is you also have to backup your public and private key. The most likely scenario where you need to recover a backed up wallet, is if your computer has crashed. Truecrypt can allow you to decrypt something with simply a password or a keyfile or both. also, true crypt allows that if some one gets access to your computer, they cant just find your public/private key pair and unlock your wallet... (unless you of course save the decryption key in truecrypt like a dumbass)

What I personally do, is store my gpg keys and my wallet in a truecrypt volume, then email that volume to myself, to store it in 3 places, sent computer, web based email service, and recieved computer. then use a 50+ character passphrase to gain access.

Note that you can use symmetric encryption by itself. See above. No need to use a public key in that instance.

*processing payment* *error 404 : funds not found*
Do you want to complain on the forum just to fall for another scam a few days later?
| YES       |        YES |
ctoon6
Sr. Member
****
Offline Offline

Activity: 350
Merit: 251



View Profile
June 13, 2011, 12:18:17 PM
 #4

whats wrong with 7zip and use a password with a .7z archive?

Nesetalis
Sr. Member
****
Offline Offline

Activity: 420
Merit: 250



View Profile
June 13, 2011, 12:19:36 PM
 #5

one of the problems with using gpg, is you also have to backup your public and private key. The most likely scenario where you need to recover a backed up wallet, is if your computer has crashed. Truecrypt can allow you to decrypt something with simply a password or a keyfile or both. also, true crypt allows that if some one gets access to your computer, they cant just find your public/private key pair and unlock your wallet... (unless you of course save the decryption key in truecrypt like a dumbass)

What I personally do, is store my gpg keys and my wallet in a truecrypt volume, then email that volume to myself, to store it in 3 places, sent computer, web based email service, and recieved computer. then use a 50+ character passphrase to gain access.

Note that you can use symmetric encryption by itself. See above. No need to use a public key in that instance.

this is true, I always forget about that feature since I never touch it. Almost the entirety of my PGP/GPG use is email and sharing files via http

ZOMG Moo!
bcearl
Full Member
***
Offline Offline

Activity: 168
Merit: 103



View Profile
June 13, 2011, 12:21:58 PM
 #6

whats wrong with 7zip and use a password with a .7z archive?

Depends on how it does the encryption. Maybe they also have a good AES256 implementation. Maybe it's crap.

Misspelling protects against dictionary attacks NOT
gene (OP)
Sr. Member
****
Offline Offline

Activity: 252
Merit: 250


View Profile
June 13, 2011, 12:23:31 PM
 #7

whats wrong with 7zip and use a password with a .7z archive?

I wouldn't trust a tool originally designed for compressing data to safely encrypt data. GPG exists for protecting data. Also, PGP has been around for a long time. It is well-understood and has been reviewed for flaws. It is also far more flexible than things like encrypted zip/7zip files.

Encryption is hard to properly implement. GPG has earned quite a bit of trust in the community for a reason.

*processing payment* *error 404 : funds not found*
Do you want to complain on the forum just to fall for another scam a few days later?
| YES       |        YES |
ctoon6
Sr. Member
****
Offline Offline

Activity: 350
Merit: 251



View Profile
June 13, 2011, 12:26:12 PM
 #8

whats wrong with 7zip and use a password with a .7z archive?

Depends on how it does the encryption. Maybe they also have a good AES256 implementation. Maybe it's crap.

7zip uses AES-256 and all you have to do is right click on the file and click "add to archive" and set your password in the box. takes only 2minutes from installing 7zip to having your wallet.dat file encrypted.

WARNING TO DROPBOX USERS
if you have ever stored an unencrypted version of your wallet file inside dropbox and deleted it, it still exists in your dropbox account unless you specifically delete it from the history.

BombaUcigasa
Legendary
*
Offline Offline

Activity: 1442
Merit: 1000



View Profile
June 13, 2011, 12:27:09 PM
 #9

whats wrong with 7zip and use a password with a .7z archive?
Nothing. As long as you use AES-256 and encrypt the file listing too.
BombaUcigasa
Legendary
*
Offline Offline

Activity: 1442
Merit: 1000



View Profile
June 13, 2011, 12:29:14 PM
 #10

it still exists in your dropbox account unless you specifically delete it from the history.
You do realize they keep backups of your account up to 30 days (officially), this including whole snapshots of permanently deleted files? And if they wanted to get your wallet while you had it, they could. Better just transfer everything to a new wallet and save that.
bcearl
Full Member
***
Offline Offline

Activity: 168
Merit: 103



View Profile
June 13, 2011, 12:30:59 PM
 #11

whats wrong with 7zip and use a password with a .7z archive?
Nothing. As long as you use AES-256 and encrypt the file listing too.

It's not enough to use AES256, you have to use it without flaws.

Misspelling protects against dictionary attacks NOT
ctoon6
Sr. Member
****
Offline Offline

Activity: 350
Merit: 251



View Profile
June 13, 2011, 12:33:41 PM
 #12

whats wrong with 7zip and use a password with a .7z archive?

I wouldn't trust a tool originally designed for compressing data to safely encrypt data. GPG exists for protecting data. Also, PGP has been around for a long time. It is well-understood and has been reviewed for flaws. It is also far more flexible than things like encrypted zip/7zip files.

Encryption is hard to properly implement. GPG has earned quite a bit of trust in the community for a reason.

it would be nice if you said why 7zip is no good, pgp was designed to send data securely, so using it for personal secure storage seems redundant to me. the only use i see pgp for is sending a file to someone else to prevent interception both ways, in this case 7zip would be no good unless the password was given in person, but pgp is good because its like sending an unlocked padlock for the other person to...wait you all probably know this story.

realnowhereman
Hero Member
*****
Offline Offline

Activity: 504
Merit: 502



View Profile
June 13, 2011, 12:35:50 PM
 #13

While we're on this subject; here's the script I call from a cron job, in case it is of use to others...

Code:
#!/bin/sh

DATESTAMP="$(date +%Y%m%d)"
TEMPWALLET="$(mktemp)"
WALLET_E="${HOME}/bitcoinwallet-$DATESTAMP.dat.gpg"

if [ -e "${WALLET_E}" ]; then
    echo "$WALLET_E already exists"
    exit 1
fi

echo " - Obtaining wallet from bitcoin server to ${TEMPWALLET}"
bitcoind backupwallet "${TEMPWALLET}"

# check for failure
if [ ! -e "${TEMPWALLET}" ]; then
    echo "Server didn't create the requested backup"
    exit 2
fi

echo " - Encrypting wallet $(md5sum ${TEMPWALLET})to ${WALLET_E}"
gpg --output "${WALLET_E}" --encrypt "${TEMPWALLET}"

echo "Removing temporary plain text copy of wallet"
rm -f "${TEMPWALLET}"

It's not ideal because of the use of a temporary; but I don't know a way of getting bitcoind to dump to standard out.

1AAZ4xBHbiCr96nsZJ8jtPkSzsg1CqhwDa
bcearl
Full Member
***
Offline Offline

Activity: 168
Merit: 103



View Profile
June 13, 2011, 12:36:05 PM
 #14

whats wrong with 7zip and use a password with a .7z archive?

I wouldn't trust a tool originally designed for compressing data to safely encrypt data. GPG exists for protecting data. Also, PGP has been around for a long time. It is well-understood and has been reviewed for flaws. It is also far more flexible than things like encrypted zip/7zip files.

Encryption is hard to properly implement. GPG has earned quite a bit of trust in the community for a reason.

it would be nice if you said why 7zip is no good, pgp was designed to send data securely, so using it for personal secure storage seems redundant to me. the only use i see pgp for is sending a file to someone else to prevent interception both ways, in this case 7zip would be no good unless the password was given in person, but pgp is good because its like sending an unlocked padlock for the other person to...wait you all probably know this story.

GPG does also provide encryption of files with symmetric algorithms and passwords. You don't have to use public key crypto for that application.

Misspelling protects against dictionary attacks NOT
ctoon6
Sr. Member
****
Offline Offline

Activity: 350
Merit: 251



View Profile
June 13, 2011, 12:42:32 PM
 #15

whats wrong with 7zip and use a password with a .7z archive?

I wouldn't trust a tool originally designed for compressing data to safely encrypt data. GPG exists for protecting data. Also, PGP has been around for a long time. It is well-understood and has been reviewed for flaws. It is also far more flexible than things like encrypted zip/7zip files.

Encryption is hard to properly implement. GPG has earned quite a bit of trust in the community for a reason.

it would be nice if you said why 7zip is no good, pgp was designed to send data securely, so using it for personal secure storage seems redundant to me. the only use i see pgp for is sending a file to someone else to prevent interception both ways, in this case 7zip would be no good unless the password was given in person, but pgp is good because its like sending an unlocked padlock for the other person to...wait you all probably know this story.

GPG does also provide encryption of files with symmetric algorithms and passwords. You don't have to use public key crypto for that application.

Then why use GPG if you end up only needing a password.

bcearl
Full Member
***
Offline Offline

Activity: 168
Merit: 103



View Profile
June 13, 2011, 12:48:07 PM
 #16

whats wrong with 7zip and use a password with a .7z archive?

I wouldn't trust a tool originally designed for compressing data to safely encrypt data. GPG exists for protecting data. Also, PGP has been around for a long time. It is well-understood and has been reviewed for flaws. It is also far more flexible than things like encrypted zip/7zip files.

Encryption is hard to properly implement. GPG has earned quite a bit of trust in the community for a reason.

it would be nice if you said why 7zip is no good, pgp was designed to send data securely, so using it for personal secure storage seems redundant to me. the only use i see pgp for is sending a file to someone else to prevent interception both ways, in this case 7zip would be no good unless the password was given in person, but pgp is good because its like sending an unlocked padlock for the other person to...wait you all probably know this story.

GPG does also provide encryption of files with symmetric algorithms and passwords. You don't have to use public key crypto for that application.

Then why use GPG if you end up only needing a password.

Because it is known to use well known algorithms properly, and it is way simpler (by this I mean how it works, not only how to use it) than TrueCrypt.* Read the OP, please.

Misspelling protects against dictionary attacks NOT
BombaUcigasa
Legendary
*
Offline Offline

Activity: 1442
Merit: 1000



View Profile
June 13, 2011, 12:52:44 PM
 #17

whats wrong with 7zip and use a password with a .7z archive?
Nothing. As long as you use AES-256 and encrypt the file listing too.

It's not enough to use AES256, you have to use it without flaws.
I have tried to crack one of my passwords on a 7-zip container just for fun. I had a 3 keys/second generation performance for a 5000 MIPS CPU. Even a 5 chars password would take 20 years to crack my that CPU. Since you could use GPUs, you could lower that to maybe 2 months? Just to break a wallet. I suppose it should have more than 50 BTC to be worth it...

Use a sufficiently long password and you should be ok for now. It's an easy method of saving your wallet as it doesn't require you to store keys and whatnot.
gene (OP)
Sr. Member
****
Offline Offline

Activity: 252
Merit: 250


View Profile
June 13, 2011, 12:53:37 PM
 #18

whats wrong with 7zip and use a password with a .7z archive?

I wouldn't trust a tool originally designed for compressing data to safely encrypt data. GPG exists for protecting data. Also, PGP has been around for a long time. It is well-understood and has been reviewed for flaws. It is also far more flexible than things like encrypted zip/7zip files.

Encryption is hard to properly implement. GPG has earned quite a bit of trust in the community for a reason.

it would be nice if you said why 7zip is no good, pgp was designed to send data securely, so using it for personal secure storage seems redundant to me. the only use i see pgp for is sending a file to someone else to prevent interception both ways, in this case 7zip would be no good unless the password was given in person, but pgp is good because its like sending an unlocked padlock for the other person to...wait you all probably know this story.

GPG does also provide encryption of files with symmetric algorithms and passwords. You don't have to use public key crypto for that application.

Then why use GPG if you end up only needing a password.

You can use it with or without a public/private key pair. You can use it for files, emails, digital signatures, etc. It is a more flexible tool which you are almost certainly going to need anyways to take full advantage of the bitcoin economy. It also works reliably across basically all platforms.

OpenPGP is a real standard, which stipulates not only the ciphers (AES128, AES256, etc) but also the modes (ECB, CBC, etc). There is no RFC standard for the crypto in tools like 7zip. The way the ciphers are implemented is as important as the cipher itself. Like I said above, there is a reason why GnuPG is such a highly-regarded encryption suite.

7zip is just not a tool designed for encryption. GPG is.

*processing payment* *error 404 : funds not found*
Do you want to complain on the forum just to fall for another scam a few days later?
| YES       |        YES |
bcearl
Full Member
***
Offline Offline

Activity: 168
Merit: 103



View Profile
June 13, 2011, 01:06:10 PM
 #19

whats wrong with 7zip and use a password with a .7z archive?
Nothing. As long as you use AES-256 and encrypt the file listing too.

It's not enough to use AES256, you have to use it without flaws.
I have tried to crack one of my passwords on a 7-zip container just for fun. I had a 3 keys/second generation performance for a 5000 MIPS CPU. Even a 5 chars password would take 20 years to crack my that CPU. Since you could use GPUs, you could lower that to maybe 2 months? Just to break a wallet. I suppose it should have more than 50 BTC to be worth it...

Use a sufficiently long password and you should be ok for now. It's an easy method of saving your wallet as it doesn't require you to store keys and whatnot.

What exactly did you test? Why should an attacker try to decrypt the 7zip-file to get the password? There are certainly better ways!

Misspelling protects against dictionary attacks NOT
ctoon6
Sr. Member
****
Offline Offline

Activity: 350
Merit: 251



View Profile
June 13, 2011, 01:10:50 PM
 #20

whats wrong with 7zip and use a password with a .7z archive?

I wouldn't trust a tool originally designed for compressing data to safely encrypt data. GPG exists for protecting data. Also, PGP has been around for a long time. It is well-understood and has been reviewed for flaws. It is also far more flexible than things like encrypted zip/7zip files.

Encryption is hard to properly implement. GPG has earned quite a bit of trust in the community for a reason.

it would be nice if you said why 7zip is no good, pgp was designed to send data securely, so using it for personal secure storage seems redundant to me. the only use i see pgp for is sending a file to someone else to prevent interception both ways, in this case 7zip would be no good unless the password was given in person, but pgp is good because its like sending an unlocked padlock for the other person to...wait you all probably know this story.

GPG does also provide encryption of files with symmetric algorithms and passwords. You don't have to use public key crypto for that application.

Then why use GPG if you end up only needing a password.

You can use it with or without a public/private key pair. You can use it for files, emails, digital signatures, etc. It is a more flexible tool which you are almost certainly going to need anyways to take full advantage of the bitcoin economy. It also works reliably across basically all platforms.

OpenPGP is a real standard, which stipulates not only the ciphers (AES128, AES256, etc) but also the modes (ECB, CBC, etc). There is no RFC standard for the crypto in tools like 7zip. The way the ciphers are implemented is as important as the cipher itself. Like I said above, there is a reason why GnuPG is such a highly-regarded encryption suite.

7zip is just not a tool designed for encryption. GPG is.

i use windows, and gpg is mostly Linux, i did get it to work when i was using it a month or so back, but it generally was an unstable piece of software, it crashed often when certain functions were used, it was not my machine either because i used it inside a VM as well. 7zip on the other hand work flawlessly and decompresses almost all archive types. and you also have to take into account for how long the data needs to be kept safe.  even if it is only good for a month, its still good enough because i don't have the same wallet for that long. in the case of bitcoin you have another factor as well, the keys used for the wallet may actually be less secure or take less time to crack than the encryption on the wallet.

Pages: [1] 2 3 4 5 »  All
  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!