Bitcoin Forum
November 12, 2024, 05:59:59 PM *
News: Check out the artwork 1Dq created to commemorate this forum's 15th anniversary
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Will Android clients ever support encrypted QR codes? (for paper wallets)  (Read 2139 times)
Tacticat (OP)
Full Member
***
Offline Offline

Activity: 210
Merit: 100



View Profile
December 13, 2012, 07:53:42 PM
Last edit: December 14, 2012, 02:02:22 PM by Tacticat
 #1

Since there are several developers around here, I thought I might ask the following question:

Is there any way that android (smartphone) clients ever accept scanning AES 128 encrypted QR codes?

I love using a paper wallet, but I don't deem it safe to print my private key in plain text (plain QR code). It would be amazing if I could print an encrypted version and then use it with my favourite client.

The client would scan the encrypted key via QR code and prompt me to type my passphrase in order to decrypt it and allow me to send Bitcoins.

Other interesting options are that the client inmediately forgets the passphrase so that I have to type it / confirm each transaction,  that it allows me to specify a certain amount of time I want it to remember it or that the key is imported to my wallet.

This would be a very interesting solution for paper-wallet users. Just scan it, type the passphrase and send the bitcoins without having to store it on any device.

Any way this could be possible in near future?
Thanks!

Tips and donations:

15nqQGfkgoxrBnsshD6vCuMWuz71MK51Ug
Mike Hearn
Legendary
*
Offline Offline

Activity: 1526
Merit: 1134


View Profile
December 14, 2012, 12:42:06 PM
 #2

Jim is working on encrypted wallet support for MultiBit. Once he contributes the code back to bitcoinj, it will become available for Andreas to integrate into Bitcoin Wallet. So I think the answer is yes, at some point at least one Android wallet will support that.

However, it's not a great idea to be sharing wallets between different devices like that. If the devices get out of sync it's easy to accidentally create double spends. Also if your  phone is stolen and unlocked by the thief, it may be possible for him to steal all your money. If you send small amounts of "everyday money" to your phone in a regular payment, this is no longer an issue.
Tacticat (OP)
Full Member
***
Offline Offline

Activity: 210
Merit: 100



View Profile
December 14, 2012, 02:01:07 PM
 #3

Thanks for the reply, but I think I didn't explain myself properly. I'm sorry.

Let me please explain the idea again:

1. I got QR code printed on paper. (or plastic, like a credit card Cheesy)
This QR code is an encrypted private key.

2. I scan the QR code and input passphrase to decrypt the key and send bitcoins.

3. Phone never stores key.
If I lose the phone there is no risk.

If I lose the paper QR code, an atacker can't decrypt it unless I've chosen a weak passphrase.


Tips and donations:

15nqQGfkgoxrBnsshD6vCuMWuz71MK51Ug
Mike Hearn
Legendary
*
Offline Offline

Activity: 1526
Merit: 1134


View Profile
December 14, 2012, 02:10:58 PM
 #4

I see. Yes Jims work should lay the foundation for that.
Tacticat (OP)
Full Member
***
Offline Offline

Activity: 210
Merit: 100



View Profile
December 14, 2012, 04:33:01 PM
 #5

Thank you!

Tips and donations:

15nqQGfkgoxrBnsshD6vCuMWuz71MK51Ug
Nyhm
Full Member
***
Offline Offline

Activity: 216
Merit: 100



View Profile WWW
December 16, 2012, 12:41:24 AM
 #6

Jim's work to bring proper key encryption to MMultiBit/bitcoinj is going to be awesome. Until that work is complete, I've considered implementing a more heavy-handed interim approach: Require a passphrase at application start, then use a symmetric cipher (AES) to simply encrypt the wallet file stream.

Would this be at all a worthwhile endeavor, or just wait for Jim's more featureful approach?

Clarification: I could do this in application logic, and/or bitcoinj. I've investigated bitcoinj, and would need a slight augmentation to also use wallet auto-save (pass in a stream factory along with the file name).

[Bitcoin Game List] ~ [BitcoinGalaxy.net Live Bitcoin Visualization] ~ [PotentialGames.com]
jim618
Legendary
*
Offline Offline

Activity: 1708
Merit: 1066



View Profile WWW
December 16, 2012, 08:25:31 AM
 #7

Hi Nym,

It is veering off topic but to answer your post...

Encrypting the whole wallet would certainly work - you could use the org.multibit.crypto.EncrypterDecrypterAESScrypt to do it.

The disadvantage is that you would not be able to do the 'routine' things like adding new transactions as they come from the network without the passphrase ( as everything is encrypted). I've gone with the approach if just encrypting the private keys - same as bitcoind - so that you just need the passphrase for sends and key management.

You could combine the two approaches - for instance the blockchain.info double encrypted backups have the private keys encrypted with AES and then the whole JSON structure is encrypted with another password to make it opaque.

MultiBit HD   Lightweight desktop client.                    Bitcoin Solutions Ltd   Bespoke software. Consultancy.
Nyhm
Full Member
***
Offline Offline

Activity: 216
Merit: 100



View Profile WWW
December 16, 2012, 07:39:52 PM
 #8

Hi Nym,

It is veering off topic but to answer your post...

Encrypting the whole wallet would certainly work - you could use the org.multibit.crypto.EncrypterDecrypterAESScrypt to do it.

The disadvantage is that you would not be able to do the 'routine' things like adding new transactions as they come from the network without the passphrase ( as everything is encrypted). I've gone with the approach if just encrypting the private keys - same as bitcoind - so that you just need the passphrase for sends and key management.

You could combine the two approaches - for instance the blockchain.info double encrypted backups have the private keys encrypted with AES and then the whole JSON structure is encrypted with another password to make it opaque.

Thanks for your reply Jim - My thoughts exactly. Regarding Android clients (on topic), I was curious if an alternative approach to your (pending, proper) solution would be useful for Android wallet developers.

I may be implementing my simpler approach for the SatoshiRoller  app (using cipher streams).

[Bitcoin Game List] ~ [BitcoinGalaxy.net Live Bitcoin Visualization] ~ [PotentialGames.com]
Andreas Schildbach
Hero Member
*****
Offline Offline

Activity: 483
Merit: 551


View Profile
December 16, 2012, 09:43:18 PM
 #9

Thanks for your reply Jim - My thoughts exactly. Regarding Android clients (on topic), I was curious if an alternative approach to your (pending, proper) solution would be useful for Android wallet developers.

I may be implementing my simpler approach for the SatoshiRoller  app (using cipher streams).

It would be only of limited use. Bitcoin Wallet updates the blockchain in the background, while the app is not "running". It would need to ask for a passphrase just for that.
etotheipi
Legendary
*
Offline Offline

Activity: 1428
Merit: 1093


Core Armory Developer


View Profile WWW
December 17, 2012, 02:48:43 AM
Last edit: December 17, 2012, 06:03:35 AM by etotheipi
 #10

I have had multiple users request this in Armory.  My response is controversial, but I want to throw it out there as food for thought, and you can ignore it if you don't like it:

If you have an encrypted wallet and all your backups are encrypted as well, including encrypted paper backups -- you have a brain-wallet.  Not exactly a brain-wallet, just all the downsides of brain-wallets.  You are at significant risk of losing your coins no matter how good you think you are.  Either because you forget your encryption passphrase because you only used it once five years earlier when you made the backup, or because you get hit by a bus and take the passphrase (and BTC) to your grave with you.  If the encryption is implemented properly, the backup will be useless without the passphrase.

I have no problem with having encrypted backups in addition to an unencrypted backup stored somewhere secure such as a safe or safe-deposit box.  But I think if the option is there, a lot of users will make 100% of their backups encrypted, and a lot of BTC will be permanently lost.
 



Founder and CEO of Armory Technologies, Inc.
Armory Bitcoin Wallet: Bringing cold storage to the average user!
Only use Armory software signed by the Armory Offline Signing Key (0x98832223)

Please donate to the Armory project by clicking here!    (or donate directly via 1QBDLYTDFHHZAABYSKGKPWKLSXZWCCJQBX -- yes, it's a real address!)
Nyhm
Full Member
***
Offline Offline

Activity: 216
Merit: 100



View Profile WWW
December 18, 2012, 08:39:59 PM
 #11


EDIT: Now that I'm somewhat more well-rested, I see that I misinterpreted the purpose of this thread in my original response (as noted by Jim). Plowing ahead, nonetheless:

Thanks for your reply Jim - My thoughts exactly. Regarding Android clients (on topic), I was curious if an alternative approach to your (pending, proper) solution would be useful for Android wallet developers.

I may be implementing my simpler approach for the SatoshiRoller  app (using cipher streams).

It would be only of limited use. Bitcoin Wallet updates the blockchain in the background, while the app is not "running". It would need to ask for a passphrase just for that.


Yes, it's true that to even launch the app (to sync block chain and see balance), the user would have to supply the passphrase. That's where Jim's implementation will be much more capable (only requiring passphrase for private key operations). For a high-security environment, you'd want the passphrase/cypher_key to be wiped from memory as soon as possible. For a medium-security environment, the passphrase/cyper_key could be entered at startup, then remain in memory for the duration of the session. No-passphrase operation could be offered to users for low-security applications.

I have had multiple users request this in Armory.  My response is controversial, but I want to throw it out there as food for thought, and you can ignore it if you don't like it:

If you have an encrypted wallet and all your backups are encrypted as well, including encrypted paper backups -- you have a brain-wallet.  Not exactly a brain-wallet, just all the downsides of brain-wallets.  You are at significant risk of losing your coins no matter how good you think you are.  Either because you forget your encryption passphrase because you only used it once five years earlier when you made the backup, or because you get hit by a bus and take the passphrase (and BTC) to your grave with you.  If the encryption is implemented properly, the backup will be useless without the passphrase.

I have no problem with having encrypted backups in addition to an unencrypted backup stored somewhere secure such as a safe or safe-deposit box.  But I think if the option is there, a lot of users will make 100% of their backups encrypted, and a lot of BTC will be permanently lost.

Along with the above statement, this decision is based more on the nature of your expected user base. If you target tech-savvy users, then they can be offered more options and be expected to understand the ramifications of their decisions. If the intended audience is non-technical end-users, then reliability/recovery might be most important. I suspect that Armory is the former.

[Bitcoin Game List] ~ [BitcoinGalaxy.net Live Bitcoin Visualization] ~ [PotentialGames.com]
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!