Re: [gentoo-user] TPM feature - do I need it?

2014-11-30 Thread Mick
On Sunday 30 Nov 2014 03:21:16 Rich Freeman wrote:
 On Sat, Nov 29, 2014 at 6:44 PM, Mick michaelkintz...@gmail.com wrote:

Thanks Rich, 

  Also, what happens if the TPM chip, or the whole MoBo blows up?  Will I
  ever be able to access my data using another PC?
 
 Only if you encrypted it.  A TPM chip doesn't do much more than except
 store and retrieve data, and digitally sign things.  It just tends to
 be used in a way that greatly limits the ability of arbitrary
 processes to access the data stored on the chip.
 
 With Linux you're basically completely in control.  You choose to
 encrypt your drive and store the key in the TPM, and you instruct the
 TPM to only hand it over under the conditions you specify, such as a
 particular bootloader, kernel, and initramfs (or something like that -
 I've never implemented it myself).  If somebody tries to boot your
 system with some other kernel/bootloader/initramfs then the TPM will
 not have the valid signature chain and it will refuse to divulge your
 full-disk encryption key.  I imagine that you could generate the key
 outside the TPM and keep a copy of it somewhere and load it into the
 TPM, so that if you mess up you can just mount it manually.

OK, but as I understand it although I can set up a passhphrase for the private 
key stored by the current oligopoly of manufacturers in a TPM, I can't extract 
it from the TPM. Would this mean that I will have no means of decrypting my 
drive, if I lose the TPM hardware module (e.g. due to hardware failure, fire, 
theft, etc.)?  Access to my data will then become conditional on my having 
access to this unique TPM piece of silicon and its manufacturer's installed 
key, besides any private key passwd that I would have set up.

Have I got this wrong, or is it that the TPM private key is merely the CA root 
certificate's key and I won't need this, unless I am creating/revoking user 
keys?  Is there a way of using the user key separately and offline (on 
different hardware) without verification by the CA root certificate?

Hmm ... I wonder if dm-crypt, LUKS and friends are a better way to achieve 
data protection for Linux users, without using some manufacturer's suspect 
certification credentials.  I guess as long as I don't *have* to use Trusted 
Computing™, I won't care too much if it is on the MoBo.

-- 
Regards,
Mick


signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] TPM feature - do I need it?

2014-11-30 Thread Rich Freeman
On Sun, Nov 30, 2014 at 4:41 AM, Mick michaelkintz...@gmail.com wrote:

 OK, but as I understand it although I can set up a passhphrase for the private
 key stored by the current oligopoly of manufacturers in a TPM, I can't extract
 it from the TPM. Would this mean that I will have no means of decrypting my
 drive, if I lose the TPM hardware module (e.g. due to hardware failure, fire,
 theft, etc.)?  Access to my data will then become conditional on my having
 access to this unique TPM piece of silicon and its manufacturer's installed
 key, besides any private key passwd that I would have set up.

I'm not an expert on TPM, but I suspect you could generate the key
outside the TPM, save a copy somewhere safe, and then load the key
into the TPM and secure it.


 Hmm ... I wonder if dm-crypt, LUKS and friends are a better way to achieve
 data protection for Linux users, without using some manufacturer's suspect
 certification credentials.

Encrypting a hard drive does not require trusting any key/certificate
issued by a manufacturer.

The advantage of using a TPM is that you can secure the drive without
requiring a boot-time key to unlock the drive.  This would be
particularly useful if the system runs daemons that you might want to
have run without anybody logging in.  Also, using LUKS/etc requires a
manually-entered key which will always be limited in entropy
(mitigated using multiple rounds typically).

The TPM is most useful in corporate environments though, since it
doesn't require the PC owner to trust the PC user to not lose the
key/etc.  The whole point of the TPM is to reduce the risk of somebody
who has physical possession of a machine compromising its security.
In the corporate environment, the system owner often doesn't have
physical control over the machine, and doesn't want to tell the user
the encryption key which they can then proceed to write on a post-it
stuck to the laptop.  Those concerns apply just as much to a linux
desktop as a windows one.  Sadly, only ChromeOS really seems to take
advantage of these capabilities in the linux desktop world.

The whole Trusted Computing thing tends to turn off a lot of the linux
community, much like UEFI is associated with thinks like unrootable
devices.  However, when used PROPERLY they're great tools.  It is
wrong for a device manufacturer to prevent a device owner from rooting
a device they own.  On the other hand, it is a great feature for a
device owner to be able to prevent somebody who steals the device from
being able to root it, or to block malware.  The key is to keep
control in the hands of the legitimate owner.

--
Rich



Re: [gentoo-user] TPM feature - do I need it?

2014-11-30 Thread thegeezer
On 29/11/14 19:53, Mick wrote:
 I'm looking to buy a new PC and while looking at FM2+ MoBos I saw ASUS offers 
 one with a TPM feature.  It also sells it as a separate component it seems:

  http://us.estore.asus.com/index.php?l=product_detailp=5793

 I recall reading in this list about it, but I am not sure if it offers any 
 benefits to me as a user, or just adds a layer of complexity without any 
 substantial benefit.

 Your views and experience with this TPM thingy?


one thing that is very useful is using tpm to feed random number generator
$ time dd if=/dev/random of=/dev/null bs=1 count=100
100+0 records in
100+0 records out
100 bytes (100 B) copied, 26.7494 s, 0.0 kB/s

real0m26.751s
user0m0.000s
sys0m0.001s



after starting trousers and rngd is much much much faster for real(er)
random

$ time dd if=/dev/random of=/dev/null bs=1 count=100
100+0 records in
100+0 records out
100 bytes (100 B) copied, 0.000275625 s, 363 kB/s

real0m0.001s
user0m0.002s
sys0m0.000s






it's also a safer place to drop keys into for example for use with grub
trustedgrub and basically does secureboot without the need for uefi
you can also use it to encrypt/decrypt *if* you trust it is not backdoored
but does mean you can use it for LUKS instead of say a GPG crypted pass
file -  or you can have the tpm crypt your password into gibberish and
then that gibberish phrase is the real password for LUKS





Re: [gentoo-user] TPM feature - do I need it?

2014-11-30 Thread Mick
On Sunday 30 Nov 2014 19:05:52 thegeezer wrote:
 *if* you trust it is not backdoored

Well, yes, in the post Snowden era I do not trust it.  At all.

-- 
Regards,
Mick


signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] TPM feature - do I need it?

2014-11-30 Thread Rich Freeman
On Sun, Nov 30, 2014 at 5:19 PM, Mick michaelkintz...@gmail.com wrote:
 On Sunday 30 Nov 2014 19:05:52 thegeezer wrote:
 *if* you trust it is not backdoored

 Well, yes, in the post Snowden era I do not trust it.  At all.


Keep in mind that you have to consider your threat model.  I think it
is fairly likely that the NSA has backdoors into most TPM chips (I'm
not sure I'd even limit that to US-made chips).  On the other hand, I
also consider it likely that the NSA has zero-days for every browser
around, and likely privilege escalation attacks against linux, and
maybe even attacks against most of the hypervisors out there.  If the
NSA REALLY wanted your data, then they're going to get it.  Of course,
some attacks are a larger concern than others.  Actually accessing a
TPM back-door, or utilizing a zero-day, likely requires actively
modifying your internet traffic, which carries a risk of detection.
They won't hesitate to do that if they are on the trail of some
terrorist, but they probably won't do that as part of some kind of
widespread surveillance net since there would be a pretty high
likelihood of detection if they did that to everybody, and then they
lose their zero-day.  On the other hand, if TPM-seeded random numbers
aren't really random then they might be able to passively decode your
SSL traffic which is something that would be almost impossible to
detect, and that could be done as part of an effort to read
everybody's TCP streams.

Honestly, I don't really worry about the NSA.  If they want to read my
traffic they're going to do it, and the only way to stop them would be
to wrap so much tinfoil around my head that I basically couldn't
interact with anybody online.  I'm more concerned with things like
identity theft, cryptolocker, physical theft of laptops, and so on.  A
TPM provides a significant level of protection against some of these
attacks.  LUKS does as well, but at a cost of convenience and a risk
of downtime if you're running it on a server and it ends up rebooting
when you aren't around.  Why would you care about full-disk encryption
on a server?  Well, ever have a hard disk die on you?  Can you
guarantee that when a hard drive dies that you'll always have the
ability to wipe it before returning it for a warranty swap?  With full
disk crypto you're safe even if you can't wipe it.

--
Rich



[gentoo-user] TPM feature - do I need it?

2014-11-29 Thread Mick
I'm looking to buy a new PC and while looking at FM2+ MoBos I saw ASUS offers 
one with a TPM feature.  It also sells it as a separate component it seems:

 http://us.estore.asus.com/index.php?l=product_detailp=5793

I recall reading in this list about it, but I am not sure if it offers any 
benefits to me as a user, or just adds a layer of complexity without any 
substantial benefit.

Your views and experience with this TPM thingy?

-- 
Regards,
Mick


signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] TPM feature - do I need it?

2014-11-29 Thread Rich Freeman
On Sat, Nov 29, 2014 at 2:53 PM, Mick michaelkintz...@gmail.com wrote:
 I'm looking to buy a new PC and while looking at FM2+ MoBos I saw ASUS offers
 one with a TPM feature.  It also sells it as a separate component it seems:

I can't get that page to load, but I can't imagine that you could find
a motherboard that DIDN'T have a TPM that has been made anytime in the
last decade.

It doesn't tend to get a lot of use in the Linux world, though the
Chromebook would be a BIG exception there.  In the corporate windows
world it gets very heavy use for full-disk encryption, and I think
Win7 supports this out of the box (though big companies tend to use
3rd party software).

Main uses for TPM include remote attestation, full-disk encryption
(without the need to type a boot password), and secure credential
storage only accessible via a trusted code path.

The Linux kernel has support for TPM, but if you want to use many of
the trusted boot features you need a bootloader that supports TPM.

The main downside with TPM with something like Gentoo is that if you
aren't careful you can make your keys inaccessible.  I'd keep a copy
of the keys somewhere safe if you plan to use it for something like
full-disk encryption (and/or do regular backups).  Otherwise if you
incorrectly update grub you might find your drive completely
inaccessible (if you're using a trusted boot path then you need to
update the TPM when you update your boot path or the chip will no
longer trust your grub/kernel/etc).  The upside is that if you do it
right you retain full control over the encryption and your system will
be VERY hard to break into (without inside access - it is quite
possible folks like the NSA have a backdoor, but you'll be very safe
from more ordinary threats).

--
Rich



Re: [gentoo-user] TPM feature - do I need it?

2014-11-29 Thread Mick
On Saturday 29 Nov 2014 20:23:51 Rich Freeman wrote:
 On Sat, Nov 29, 2014 at 2:53 PM, Mick michaelkintz...@gmail.com wrote:
  I'm looking to buy a new PC and while looking at FM2+ MoBos I saw ASUS
  offers
 
  one with a TPM feature.  It also sells it as a separate component it 
seems:
 I can't get that page to load, but I can't imagine that you could find
 a motherboard that DIDN'T have a TPM that has been made anytime in the
 last decade.
 
 It doesn't tend to get a lot of use in the Linux world, though the
 Chromebook would be a BIG exception there.  In the corporate windows
 world it gets very heavy use for full-disk encryption, and I think
 Win7 supports this out of the box (though big companies tend to use
 3rd party software).
 
 Main uses for TPM include remote attestation, full-disk encryption
 (without the need to type a boot password), and secure credential
 storage only accessible via a trusted code path.
 
 The Linux kernel has support for TPM, but if you want to use many of
 the trusted boot features you need a bootloader that supports TPM.
 
 The main downside with TPM with something like Gentoo is that if you
 aren't careful you can make your keys inaccessible.  I'd keep a copy
 of the keys somewhere safe if you plan to use it for something like
 full-disk encryption (and/or do regular backups).  Otherwise if you
 incorrectly update grub you might find your drive completely
 inaccessible (if you're using a trusted boot path then you need to
 update the TPM when you update your boot path or the chip will no
 longer trust your grub/kernel/etc).  The upside is that if you do it
 right you retain full control over the encryption and your system will
 be VERY hard to break into (without inside access - it is quite
 possible folks like the NSA have a backdoor, but you'll be very safe
 from more ordinary threats).


Thanks Rich, it seems not all modern MoBos have it.  This doesn't:

 http://www.asus.com/uk/Motherboards/A88XMA/specifications/


While this does:

 http://www.asus.com/uk/Motherboards/A88XGAMER/specifications/


Besides the complexity of it all and the risk of errors, it's the remote 
attestation part that worries me a bit.  I mean this is not MSWindows, so the 
only entity I would expect to attest what I'm running on my machine is me.  
Well, fair enough, portage checks the hashes of the downloaded source files, 
but I would not want anyone to remotely check anything on my PC.

If I enable this TPM thing, do I automatically open ports at pre/post-boot 
time giving access to my machine?  Or is remote attestation something I have a 
say over?

Also, what happens if the TPM chip, or the whole MoBo blows up?  Will I ever 
be able to access my data using another PC?

-- 
Regards,
Mick


signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] TPM feature - do I need it?

2014-11-29 Thread Rich Freeman
On Sat, Nov 29, 2014 at 6:44 PM, Mick michaelkintz...@gmail.com wrote:

 Thanks Rich, it seems not all modern MoBos have it.  This doesn't:


Interesting, I had really thought they were ubiquitous.


 If I enable this TPM thing, do I automatically open ports at pre/post-boot
 time giving access to my machine?  Or is remote attestation something I have a
 say over?


It has to be implemented in software.  The only thing the chip does is
let software call it and ask it to sign data.  The chip can't talk to
the network on its own.

Remote attestation doesn't actually give anybody access to your
machine.  Now, it does let you prove to somebody that they actually do
have access to your machine, if you installed software that gave them
access.  Suppose I gave you a piece of software and asked you to
install it on your machine so that I could evesdrop on everything you
do.  If you refuse to do it I'll fire you from your job.  Without
remote attestation you could install that software in a VM or emulator
somewhere and tell me you complied, and it would be impossible for me
to tell that you did this if your VM was well-implemented.  On the
other hand, if my software implemented remote attestation then the
best you could do is block it, in which case I brand you as
non-compliant and fire you.  With remote attestation I could get a
list of the boot path from the firmware to my software and see if
there is anything in it that could tamper with my software.  If I
dictate that you have to run TrustedCo Linux v5 then I could see that
you're running an unpatched version of it and know that my process is
directly talking to the kernel, which I know doesn't let you tamper
with it, and that kernel is directly running on the hardware having
been loaded by a trusted firmware/bootloader.

 Also, what happens if the TPM chip, or the whole MoBo blows up?  Will I ever
 be able to access my data using another PC?

Only if you encrypted it.  A TPM chip doesn't do much more than except
store and retrieve data, and digitally sign things.  It just tends to
be used in a way that greatly limits the ability of arbitrary
processes to access the data stored on the chip.

With Linux you're basically completely in control.  You choose to
encrypt your drive and store the key in the TPM, and you instruct the
TPM to only hand it over under the conditions you specify, such as a
particular bootloader, kernel, and initramfs (or something like that -
I've never implemented it myself).  If somebody tries to boot your
system with some other kernel/bootloader/initramfs then the TPM will
not have the valid signature chain and it will refuse to divulge your
full-disk encryption key.  I imagine that you could generate the key
outside the TPM and keep a copy of it somewhere and load it into the
TPM, so that if you mess up you can just mount it manually.

It is a bit like UEFI - if you use it properly it becomes a tool which
allows the device owner to secure his own device against other
intruders.  The problems only come when people want to treat your
device as if it is their device.  With Linux you control almost all of
it, though I would GREATLY prefer it if TPM chips did not come with
vendor-supplied certificates (that is, if there was no way for anybody
to determine if the master key inside was externally loaded by the end
user or not).  If they didn't come pre-loaded with certificates then
they would be just as usable for securing your own machine (since you
could add your own certificate/etc), but they would be useless for DRM
(since no key was ever in the chip at a time when it was in the
possession of somebody trusted by the media companies).

I also don't have much more than a general interest in this area, so
I'm sure there are some fine details above which are inaccurate.  The
gist of it should be right though.

--
Rich