Re: [tor-dev] adding smartcard support to Tor

2016-06-03 Thread Ivan Markin
Razvan Dragomirescu: > Hey Evan, your hidden service appears to be down. Are there any mirrors of > the code or can you bring it back online? My project is starting to take > shape (took your advice and I'm using OpenPGP for now - may move to my own > implementation in the future, but I want to cre

Re: [tor-dev] adding smartcard support to Tor

2016-06-03 Thread Razvan Dragomirescu
Hey Evan, your hidden service appears to be down. Are there any mirrors of the code or can you bring it back online? My project is starting to take shape (took your advice and I'm using OpenPGP for now - may move to my own implementation in the future, but I want to create a small MVP ASAP). Thank

Re: [tor-dev] adding smartcard support to Tor

2016-05-24 Thread Ivan Markin
Razvan Dragomirescu: > Thanks Evan for the .onion links, I'll take a look. I'm still collecting > data, testing hardware, etc. BTW, one of the cheapest options for this is > http://www.ftsafe.com/product/epass/eJavaToken - $12 at > http://javacardos.com/store/smartcard_eJavaToken.php . Unfortunatel

Re: [tor-dev] adding smartcard support to Tor

2016-05-24 Thread Razvan Dragomirescu
Thank you Evan, Donncha, Regarding 1024-bit RSA support, take a look at http://www.fi.muni.cz/~xsvenda/jcsupport.html - almost all JavaCard cards support that. I'm a Java developer but it looks like I'm going to have to switch to (and learn) Python for this since almost all Tor utilities appear t

Re: [tor-dev] adding smartcard support to Tor

2016-05-23 Thread Evan Margin
Hello Donncha! Donncha Ó Cearbhaill: > However his code was integrating with a smartcard at a very low > level by sending AT commands manually. I don't think that is the > best approach for compatibility. > > I think a better way would be to interface with the tokens via the > PKCS#11 protocol.

Re: [tor-dev] adding smartcard support to Tor

2016-05-23 Thread Evan Margin
Hey Razvan and tor-dev@! Razvan Dragomirescu: > I wanted to revisit this subject and actually start writing some > code, but it looks like Ivan Markin's GitHub account is gone, > together with all the code there. Ivan, are your modifications to > OnionBalance still available anywhere? Thanks f

Re: [tor-dev] adding smartcard support to Tor

2016-05-23 Thread Donncha Ó Cearbhaill
Razvan Dragomirescu: > Hello again, > > I wanted to revisit this subject and actually start writing some code, but > it looks like Ivan Markin's GitHub account is gone, together with all the > code there. Ivan, are your modifications to OnionBalance still available > anywhere? > > Thank you, > Ra

Re: [tor-dev] adding smartcard support to Tor

2016-05-22 Thread Virgil Griffith
This may be not quite what you want, but the Estonia E-resident card supports basic crypto with the private key on the smart card---i.e., you have to physically have the card to be able to read the encrypted mail. There are probably more elegant solutions than plugging into the Estonia E-resident

Re: [tor-dev] adding smartcard support to Tor

2016-05-22 Thread Razvan Dragomirescu
Hello again, I wanted to revisit this subject and actually start writing some code, but it looks like Ivan Markin's GitHub account is gone, together with all the code there. Ivan, are your modifications to OnionBalance still available anywhere? Thank you, Razvan -- Razvan Dragomirescu Chief Tech

Re: [tor-dev] adding smartcard support to Tor

2015-10-20 Thread Razvan Dragomirescu
Yes, that's precisely the point - if the card is stolen, the service is stolen with it. I'm not trying to prevent that, I'm trying to _tie_ the service to the card - whoever has the card runs the service. If you see that the card is gone, you know your service is gone too. If the card is still ther

Re: [tor-dev] adding smartcard support to Tor

2015-10-20 Thread grarpamp
On Tue, Oct 20, 2015 at 3:05 PM, Ivan Markin wrote: > No, I will be secure. An adversary could sniff your PIN and sign > whatever they want to, true. But revealing the PIN != revealing the key. > In this case your identity key is still safe even if your PIN is > "compromised". Yes the private key

Re: [tor-dev] adding smartcard support to Tor

2015-10-20 Thread Ivan Markin
grarpamp: > Yes if you intend to patch tor to use a smartcard as a > cryptographic coprocessor offloading anything of interest > that needs signed / encrypted / decrypted to it. The card > will need to remain plugged in for tor to function. As I said before, only thing that actually needs to be pr

Re: [tor-dev] adding smartcard support to Tor

2015-10-20 Thread grarpamp
You mentione... > I have Tor running on the USBArmory by InversePath ( > http://inversepath.com/usbarmory.html ) and have a microSD form factor card > made by Swissbit ( > www.swissbit.com/products/security-products/overwiev/security-products-overview/ > ) up and running on it. Good that USBarmor

Re: [tor-dev] adding smartcard support to Tor

2015-10-20 Thread grarpamp
On Sat, Oct 17, 2015 at 5:46 PM, Razvan Dragomirescu wrote: > Exactly, you ask the smartcard to decrypt your traffic (and sign data if > needed), it never tells you the key, it's a blackbox - it gets plaintext > input and gives you encrypted (or signed) output, without ever revealing the > key it'

Re: [tor-dev] adding smartcard support to Tor

2015-10-18 Thread Ivan Markin
Razvan Dragomirescu: > Ivan, if I understand > https://onionbalance.readthedocs.org/en/latest/design.html#next-generation-onion-services-prop-224-compatibility > correctly, the setup I've planned will no longer work once Tor switches to > the next generation hidden services architecture, is this co

Re: [tor-dev] adding smartcard support to Tor

2015-10-18 Thread Ivan Markin
Razvan Dragomirescu: > Thank you Ivan! You're welcome! > Ah, I understand now! That actually makes perfect sense for my application. > If I understand it correctly, I can simply let Tor register the HS by > itself (using a random HS name/key), then fetch the introduction points and > keys and re-r

Re: [tor-dev] adding smartcard support to Tor

2015-10-18 Thread Razvan Dragomirescu
Ivan, if I understand https://onionbalance.readthedocs.org/en/latest/design.html#next-generation-onion-services-prop-224-compatibility correctly, the setup I've planned will no longer work once Tor switches to the next generation hidden services architecture, is this correct? Will there be any back

Re: [tor-dev] adding smartcard support to Tor

2015-10-18 Thread Razvan Dragomirescu
Thank you s7r! I think I'm going to start by simply using a mechanism similar to OnionBalance - I'm going to let Tor do its HS registration with a random HS name (and with a key that the host knows), then read the introduction points and keys and re-register them (a la OnionBalance) with a new HS n

Re: [tor-dev] adding smartcard support to Tor

2015-10-18 Thread Razvan Dragomirescu
Thank you Ivan! On Sun, Oct 18, 2015 at 1:44 AM, Ivan Markin wrote: > Not exactly. The trick is that keys are not the same. For more details > have a look at the specifications [1]. There is a "permanent key" > ("holds the name", signs descriptors) and an "onion key" [2] for each > Introduction

Re: [tor-dev] adding smartcard support to Tor

2015-10-17 Thread s7r
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Hello Razvan, What you try to achieve is possible. It can be done, but requires code to be written. If you are really interested about this feature you can either sponsor someone to write the code for it either code it yourself. The 1024 bit RSA pr

Re: [tor-dev] adding smartcard support to Tor

2015-10-17 Thread Ivan Markin
Razvan Dragomirescu: > Ivan, according to https://www.torproject.org/docs/hidden-services.html.en > (maybe I misunderstood it), at Step 4, the client sends an _encrypted_ > packet to the hidden service, so the hidden service needs to be able to > decrypt that packet. So the key on the card needs to

Re: [tor-dev] adding smartcard support to Tor

2015-10-17 Thread Razvan Dragomirescu
Exactly, you ask the smartcard to decrypt your traffic (and sign data if needed), it never tells you the key, it's a blackbox - it gets plaintext input and gives you encrypted (or signed) output, without ever revealing the key it's used. It can also generate the key internally (actually a keypair,

Re: [tor-dev] adding smartcard support to Tor

2015-10-17 Thread Razvan Dragomirescu
Ivan, according to https://www.torproject.org/docs/hidden-services.html.en (maybe I misunderstood it), at Step 4, the client sends an _encrypted_ packet to the hidden service, so the hidden service needs to be able to decrypt that packet. So the key on the card needs to be used both for signing the

Re: [tor-dev] adding smartcard support to Tor

2015-10-17 Thread Ivan Markin
Ken Keys: >> > The point is that one can't[*] extract a private key from a smartcard >> > and because of that even if machine is compromised your private key >> > stays safe. > If the machine is going to use the HS key, the actual HS key has to be > visible to it. Nope. If the machine is going to

Re: [tor-dev] adding smartcard support to Tor

2015-10-17 Thread Ken Keys
On 10/17/2015 12:27 PM, Ivan Markin wrote: > Ken Keys: >> If the tor process is going to use the key, at some point the >> unencrypted key has to be visible to the machine running it. You would >> in any case have to trust the machine hosting the tor node. A more >> secure setup would be to run the

Re: [tor-dev] adding smartcard support to Tor

2015-10-17 Thread Ivan Markin
Ken Keys: > If the tor process is going to use the key, at some point the > unencrypted key has to be visible to the machine running it. You would > in any case have to trust the machine hosting the tor node. A more > secure setup would be to run the tor node inside an encrypted VM and use > your s

Re: [tor-dev] adding smartcard support to Tor

2015-10-17 Thread Ken Keys
If the tor process is going to use the key, at some point the unencrypted key has to be visible to the machine running it. You would in any case have to trust the machine hosting the tor node. A more secure setup would be to run the tor node inside an encrypted VM and use your smartcard/dongle/what

Re: [tor-dev] adding smartcard support to Tor

2015-10-17 Thread Ivan Markin
Razvan Dragomirescu: > Thank you Ivan, I've taken a look but as far as I understand your project > only signs the HiddenService descriptors from an OpenPGP card. It still > requires each backend instance to have its own copy of the key (where it > can be read by an attacker). My goal is to have the

Re: [tor-dev] adding smartcard support to Tor

2015-10-17 Thread Razvan Dragomirescu
Tamper resistance. And the fact that an attacker with access to the machine running Tor can read your encrypted thumb drive (you need to decrypt it at some point to load the key into the Tor process since the encrypted thumbdrive doesn't run crypto algos internally). A smartcard is a small embedded

Re: [tor-dev] adding smartcard support to Tor

2015-10-17 Thread Ken Keys
What is the advantage of a smart card over a standard encrypted thumb drive? On 10/17/2015 11:19 AM, Razvan Dragomirescu wrote: > Thank you Ivan, I've taken a look but as far as I understand your > project only signs the HiddenService descriptors from an OpenPGP card. > It still requires each back

Re: [tor-dev] adding smartcard support to Tor

2015-10-17 Thread Razvan Dragomirescu
Thank you Ivan, I've taken a look but as far as I understand your project only signs the HiddenService descriptors from an OpenPGP card. It still requires each backend instance to have its own copy of the key (where it can be read by an attacker). My goal is to have the HS private key exclusively i

Re: [tor-dev] adding smartcard support to Tor

2015-10-17 Thread Razvan Dragomirescu
Thank you grarpamp, but that's not what I'm trying to prevent/achieve. I simply want to host the private key for a hidden service inside a secure element (a smartcard) to ensure that only the hardware that has direct access to my smartcard can publish the descriptors for the service and decrypt inc

Re: [tor-dev] adding smartcard support to Tor

2015-10-16 Thread Ivan Markin
Hello, Razvan Dragomirescu: > I am not sure if this has been discussed before or how hard it would be to > implement, but I'm looking for a way to integrate a smartcard with Tor - > essentially, I want to be able to host hidden service keys on the card. I'm > trying to bind the hidden service to a

Re: [tor-dev] adding smartcard support to Tor

2015-10-15 Thread grarpamp
On Tue, Oct 13, 2015 at 4:08 PM, Razvan Dragomirescu wrote: > essentially, I want to be able to host hidden service keys on the card. I'm > trying to bind the hidden service to a hardware component (the smartcard) so > that it can be securely hosted in a hostile environment as well as > impossible

[tor-dev] adding smartcard support to Tor

2015-10-13 Thread Razvan Dragomirescu
Hello, I am not sure if this has been discussed before or how hard it would be to implement, but I'm looking for a way to integrate a smartcard with Tor - essentially, I want to be able to host hidden service keys on the card. I'm trying to bind the hidden service to a hardware component (the smar