Bitcoin Forum
May 06, 2024, 07:31:58 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Securing Bitcoin-QT with a yubikey?  (Read 1151 times)
oOoOo (OP)
Full Member
***
Offline Offline

Activity: 238
Merit: 100


View Profile
May 16, 2014, 10:29:21 PM
 #1

So I bought myself a yubikey and I plan to use it to create a more secure version of the main QT client whereby the regular passphrase prompt is replaced with a prompt for a one-time-password (OTP) authentication provided by the yubikey.

This will most likely require a custom built client. I can build QT on linux including necessary code changes.
There is also a yubico c library at https://github.com/Yubico/yubico-c

The question however is this:
Altough I'm somewhat familiar with the bitcoin client code, with the yubikey I'm starting at zero. What would, in your eyes, be the best way to approach this?

Has anyone attempted something similar?

Thanks in advance for any suggestions!
1715023918
Hero Member
*
Offline Offline

Posts: 1715023918

View Profile Personal Message (Offline)

Ignore
1715023918
Reply with quote  #2

1715023918
Report to moderator
1715023918
Hero Member
*
Offline Offline

Posts: 1715023918

View Profile Personal Message (Offline)

Ignore
1715023918
Reply with quote  #2

1715023918
Report to moderator
Bitcoin addresses contain a checksum, so it is very unlikely that mistyping an address will cause you to lose money.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715023918
Hero Member
*
Offline Offline

Posts: 1715023918

View Profile Personal Message (Offline)

Ignore
1715023918
Reply with quote  #2

1715023918
Report to moderator
1715023918
Hero Member
*
Offline Offline

Posts: 1715023918

View Profile Personal Message (Offline)

Ignore
1715023918
Reply with quote  #2

1715023918
Report to moderator
1715023918
Hero Member
*
Offline Offline

Posts: 1715023918

View Profile Personal Message (Offline)

Ignore
1715023918
Reply with quote  #2

1715023918
Report to moderator
jonald_fyookball
Legendary
*
Offline Offline

Activity: 1302
Merit: 1004


Core dev leaves me neg feedback #abuse #political


View Profile
May 17, 2014, 12:46:51 AM
 #2

Interesting project.

I'm wondering how it works.  I assume with the regular client, it is hashing the passphrase and then verifying it?

What can you get back from the yubikey on success?  Cause if you only get back a generic success message, that doesn't seem that secure because attacker with access to your machine could modify your code and bypass the key.

grue
Legendary
*
Offline Offline

Activity: 2058
Merit: 1431



View Profile
May 17, 2014, 01:06:02 AM
 #3

yubikey authentication can only be done in a secure environment (ie. a trusted server), this can not be said of someone's computer.

It is pitch black. You are likely to be eaten by a grue.

Adblock for annoying signature ads | Enhanced Merit UI
Foxpup
Legendary
*
Offline Offline

Activity: 4354
Merit: 3042


Vile Vixen and Miss Bitcointalk 2021-2023


View Profile
May 17, 2014, 05:09:03 AM
 #4

Cause if you only get back a generic success message, that doesn't seem that secure because attacker with access to your machine could modify your code and bypass the key.
Correct. YubiKey does authentication, not encryption, which is what you really need to protect your wallet.

The way YubiKey (and similar 2FA systems) work is, the server runs software that generates one-time codes from a seed, and the YubiKey also generates one-time codes from the same seed, and sends it to the server. If the codes match, the server allows you to log in. If the don't match, your login is refused. This works exactly the same as if you had logged in with a password, except that the one-time code changes every time you log in, so old codes cannot be re-used, thwarting keyloggers.

The important thing to note here is that both the seed and the software to generate one-time codes are stored on the server, which is obviously not secure at all if an attacker is able to access files on the server (and if they can't access your files, your wallet is safe anyway - hence the usefulness of cold storage). To protect files that an attacker could potentially access, you need encryption, and YubiKey cannot help you with that.

Will pretend to do unspeakable things (while actually eating a taco) for bitcoins: 1K6d1EviQKX3SVKjPYmJGyWBb1avbmCFM4
I am not on the scammers' paradise known as Telegram! Do not believe anyone claiming to be me off-forum without a signed message from the above address! Accept no excuses and make no exceptions!
behindtext
Full Member
***
Offline Offline

Activity: 121
Merit: 103


View Profile WWW
May 17, 2014, 06:13:53 AM
 #5

Cause if you only get back a generic success message, that doesn't seem that secure because attacker with access to your machine could modify your code and bypass the key.
Correct. YubiKey does authentication, not encryption, which is what you really need to protect your wallet.

The way YubiKey (and similar 2FA systems) work is, the server runs software that generates one-time codes from a seed, and the YubiKey also generates one-time codes from the same seed, and sends it to the server. If the codes match, the server allows you to log in. If the don't match, your login is refused. This works exactly the same as if you had logged in with a password, except that the one-time code changes every time you log in, so old codes cannot be re-used, thwarting keyloggers.

The important thing to note here is that both the seed and the software to generate one-time codes are stored on the server, which is obviously not secure at all if an attacker is able to access files on the server (and if they can't access your files, your wallet is safe anyway - hence the usefulness of cold storage). To protect files that an attacker could potentially access, you need encryption, and YubiKey cannot help you with that.
grue and foxpup make good points regarding how yubikeys work.

in order to use the yubikey in the manner you prescribe, you would need to have a configuration like

  • have wallet stored on a separate system
  • that separate system uses yubikey as a first authentication factor to prevent users without yubikey from getting in
  • once a user auths using yubikey, they can enter their passphrase and remotely unlock the wallet
  • transactions would need to be composed on this separate machine

this cannot be done properly on a single host for the reasons mentioned in the earlier posts. you are pretty much required to have a 2nd machine which houses the yubikey private key. we support yubikey at coinvoice.com using our (golang) yubikey library, https://github.com/conformal/yubikey .

oOoOo (OP)
Full Member
***
Offline Offline

Activity: 238
Merit: 100


View Profile
May 18, 2014, 01:47:35 PM
 #6

yubikeys can be used in a "static" mode, always generating the same pwd. A very long/complex passphrase can be written onto the key and serve to secure the wallet. That would not be 2-factor auth though.
Geremia
Sr. Member
****
Offline Offline

Activity: 502
Merit: 251


View Profile WWW
July 25, 2014, 11:27:19 PM
 #7

yubikey authentication can only be done in a secure environment (ie. a trusted server), this can not be said of someone's computer.
YubiKeys do all kinds of things: generate one-time passwords (OTPs), do authentication with a trusted server, generate static passwords, etc.

BTC tip jar | my BTC wiki, BTC StackExchange | Tox ID: 65C3E8810738AD9D175234808FCB317A1103632903436203D45411AE97C03F54C34861AB6663
Join Kraken. | The best, free book on Bitcoin: Mastering Bitcoin
Nos cum prole pia benedicat Virgo Maria.
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!