Bitcoin Forum
May 05, 2024, 10:16:35 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 [2]  All
  Print  
Author Topic: A short introduction to TPMs  (Read 3086 times)
Peter Todd
Legendary
*
expert
Offline Offline

Activity: 1120
Merit: 1150


View Profile
May 10, 2013, 06:15:36 AM
 #21

Could people backup their private key? If yes, they could double-spend. If no, coins are lost forever if the hardware is broken.

You let people backup their private key to multiple secure hardware devices. The devices authenticate each other and they key is copied over encrypted. The need to prevent double-spends means this process becomes a bit more complex but there's nothing hard about it.

Secondly even if there is only one copy of the private key you can sign nLockTime'd transactions that send the coins to an address the user does control, but some time in the future. If the hardware breaks the user just waits until the lock expires and they can get their coins back. That interval can be fairly short, a day is probably fine for a lot of use-cases.

1714947395
Hero Member
*
Offline Offline

Posts: 1714947395

View Profile Personal Message (Offline)

Ignore
1714947395
Reply with quote  #2

1714947395
Report to moderator
1714947395
Hero Member
*
Offline Offline

Posts: 1714947395

View Profile Personal Message (Offline)

Ignore
1714947395
Reply with quote  #2

1714947395
Report to moderator
Even if you use Bitcoin through Tor, the way transactions are handled by the network makes anonymity difficult to achieve. Do not expect your transactions to be anonymous unless you really know what you're doing.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
beeblebrox
Member
**
Offline Offline

Activity: 117
Merit: 10


View Profile
May 11, 2013, 04:19:27 AM
 #22

Take a look at the wiki: https://en.bitcoin.it/wiki/Funding_network_security

Mike Hearn has some interesting ideas with assurance contracts and other schemes that in the long run can probably replace miners fee rewards. In any case the inflation subsidy will remain quite large for a long time to come; it hits 1% of the face value of all Bitcoins out there in 2024 or so for instance.

I can't see how assurance contracts will help here.  In  general why would anyone agree to pay something when they don't need to?

I seems to me that it would be a better idea to either: 
1) make an alt-coin that does useful mining (ie: the miners run real life algorithms that people/companies would pay for) - a potential protocol I've created for this is a little tricky and not as secure as bitcoin.
2) replace mining completely -  I believe it's fairly easy to do this and comparable to bitcoin in terms of security.
beeblebrox
Member
**
Offline Offline

Activity: 117
Merit: 10


View Profile
May 12, 2013, 05:02:20 AM
 #23

Bitcoiners,

A useful link:  A short introduction to TPMs - http://mjg59.dreamwidth.org/24818.html

Hal, Mike Hearn and a few others have talked about using TPMs in the context of bitcoin key storage, or trusted execution of oracles. See https://en.bitcoin.it/wiki/Securing_online_services and https://en.bitcoin.it/wiki/Contracts#Example_4:_Using_external_state

It would be interesting to brainstorm what uses bitcoin software could make of TPMs.



Well since this is a brainstorm of what can be done with trusted computing- how about an alt-coin.  This one is a little out there:   You could create an alt-coin protocol that uses TC/DRM to distribute the initial coins evenly based on a person's DNA.  eg: Each person gets say 1000 coins when they register with the network by giving a DNA sample. 

Specifically, a DNA sequencing machine outputs a unique non-identifying ID code based on the DNA sample read (it could be something like a crypto-hash of a uniquely identifying region of the  registering person's DNA).  This ID code along with a public receiving address supplied by the applicant is then uploaded to the network by the machine as a coin creation transaction  to be included in the blockchain.  Once this coin creation transaction is included by a miner in a block, the nodes check that ID code hasn't been presented before and if so add 1000 coin to the supplied address.   

As regards the mining, I would recommend a zero-work mining scheme.  The miners collectively would still receive a small reward - say 1/10th of a coin for including the DNA coin-creation transactions.

Obviously the DNA machines require a degree of central authority for the supply, operation and maintenance of the machines.  Many people here would consider that the need to trust a central authority makes this a no-starter-- but bitcoin itself has implicit central authorities eg: intel.   With physical tamper-proofing, TC software (that is open source and remotely attestable ) plenty of open auditing and open access for community surveillance you could create a system acceptable to the majority.

(As-an-aside: people who are identical twins might not be so keen on this protocol.)
beeblebrox
Member
**
Offline Offline

Activity: 117
Merit: 10


View Profile
June 19, 2013, 01:03:12 PM
Last edit: June 20, 2013, 12:34:51 AM by beeblebrox
 #24

Soon, after few years as the technology improves and becomes ubiquitous, another use for DRM  will be that it can  be used for off-chain transactions:

https://bitcointalk.org/index.php?topic=148232.msg1578079#msg1578079

(As-an-aside: Eventually, I believe this will cause problems for bitcoin because in the future most transactions will be performed off-chain.  DRM based transactions for small amounts and something like traditional bank exchange for large amounts.  This is will to lead to a decreasing number of on-chain transactions and reduce the miners fee rewards).


I've been reviewing mobile phone security.  It appears that we might be able to implement a scheme like this on the Samsung KNOX architecture.  Though I'm not sure if it does general remote attestation it does however appear to have all the other requirements.  

Does anyone here know if KNOX supports remote anonymous attestation?

(It must be able to do some sort of attestation to support the features that it claims to although it looks like the phone has to configured by a company's/organization's central IT department first and then it can attest to their computers (only theirs?) when necessary ).


---------------------------------------------------


Also, I am interested in contributing funding to an off-chain system like this.  If anyone wants to start a funding drive I'll pledge 50 BTC to it for the first person to deliver a working smart-phone app that implements an off-chain transfer like this  (with conditions such as that it has been reviewed for security flaws by a some of the respected programmers of the bitcoin community,  is open-source, etc.).

To save you clicking it, here is a re-cap of the basic off-chain coin transfer scheme from the link above:

Quote
Basically it is the public/private key pair of a wallet address that is stored cryptographically on just one computer at a time.  The public key is still publicly available knowledge and can be viewed arbitrarily (eg: someone may access the public address in order to look it up on the block chain to check its balance).  However the private key can only be accessed once, once it has been retrieved the coin itself is destroyed so it cannot be transferred again.  The coin should also store the balance that was transferred to the address when it was created  (Note: someone may add more money into it after creation because the public address is known.   It would be a strange thing to do though.  So the balance is technically the minimum amount that it contains-- if someone adds extra money the coin itself doesn't know about this.  Only the initial creation balance is known by the coin.)

Now for the model: (Note: this is just a simple hypothetical model- in reality it would be more detailed than this).  The model has three different parts, 1)coin creation, 2) coin transfer and 3)reveal private key.  

Let's use the following example to explain how it the first two parts work:
Sender Sally has at least 5 BTC on-chain in her wallet.  Receiver Ross is coming to collect the 5 BTC she owes him, but Ross will only accept TC/DRM coin because he doesn't want to wait around 20min-90min for 3 confirmations to prove that he has received the coin.  So sally has to 1) create a coin holding 5 BTC before Ross comes and 2) transfer it to Ross when he arrives.

1) Coin creation:
a)Firstly, Sally secure boots her computer.  This procedure puts the hardware into a precisely defined state and prohibits all non-signed pre-OS binaries to run (eg: the OS boot loader will only be run if it's signature matches that stored on chip).  This prevents low-level pre-OS attacks such as rootkits.   see: http://en.wikipedia.org/wiki/Uefi#Secure_boot
b)Once the OS is up and running then Sally runs the program and selects the "make-TC/DRM-coin" option.  This software checks before it does anything that it is running on a securely-booted machine in a secure state.  
c)Once the software knows that it is safe, it creates a the private/public key pair address and makes a standard on-chain transaction to load the address with 5 BTC.  The software doesn't reveal the private key to Sally.
d)Once the transaction has been confirmed (the number of confirmations can be arbitrarily decided by the user.) the software puts this key pair plus a record of the amount into sealed storage.  see: http://en.wikipedia.org/wiki/Trusted_Computing#Sealed_storage
The coin has now been successfully created

2) Coin Exchange:
a)Both Sally and Ross secure boot their computers.
b)They both run the software and Sally chooses the "transfer-TC/DRM-coin" option.  Like the before the first thing the program does is establish that it is running in a safe, secure environment.
c)The software establishes a secure connection between the two computers.  Let's just say it is SSL over a direct computer-computer WiFi connection for this case.
d)Once the connection is established, the two computers both remote attest to the other that it is running an untampered version of the "make-TC/DRM-coin" software on a secure computer.  see: http://en.wikipedia.org/wiki/Trusted_Computing#Remote_attestation  and http://en.wikipedia.org/wiki/Direct_anonymous_attestation
3)Sally's computer retrieves the coin from secure storage and transfers it to Ross's machine.  Sally's machine deletes its copy.  On receipt Ross's machine places it into sealed storage.   (This transfer would actually be a little tricky because of the need for confirmation of the transfer before Sally has her coin deleted.  Computer protocols for this sort of thing already exist.)
Voila! The coin has been transferred.

For the last part:  Let's assume the Ross for some reason or other wants to transfer some amount of the coin on-chain within the Bitcoin network:
3)Reveal Private Key:
a)Ross secure boots his computer
b)He runs the program and chooses the "reveal-private-key" option.  Similarly to the other options, the software only continues only if it being run securely.
c)The software retrieves the coin form sealed storage,  informs Ross of the private key and destroys the coin.  He can now perform standard on-chain transactions.


There you go.  A simple protocol of a secure private key exchange.


Please note though:  In real life you wouldn't make a new TC/DRM coin each time for a specific transaction.  Rather you would make a lot of them preemptively at commonly used denominations (eg: if you had 1000BTC make 9x100BTC coin, 9x10BTCcoin, 9x1BTC, 9x0.1BTC, 10x0.001BTC) and would exchange the required number of each denomination to make up the amount required.  eg: to transfer 156BTC transfer 1x100BTC, 5x10BTC, 6x1BTC.

Also note: the software can reveal the public key and amount of the coin at any time-- this can be used to increase the confidence of the person receiving the coin that the TC/DRM hardware/software protection mechanisms haven't been defeated since they can check that the address still has at least the amount stated before accepting it.  It can also be used to check the number of confirmations of the coin.

Peter Todd
Legendary
*
expert
Offline Offline

Activity: 1120
Merit: 1150


View Profile
June 20, 2013, 02:49:41 AM
 #25

I've been reviewing mobile phone security.  It appears that we might be able to implement a scheme like this on the Samsung KNOX architecture.  Though I'm not sure if it does general remote attestation it does however appear to have all the other requirements.  

Does anyone here know if KNOX supports remote anonymous attestation?

(It must be able to do some sort of attestation to support the features that it claims to although it looks like the phone has to configured by a company's/organization's central IT department first and then it can attest to their computers (only theirs?) when necessary ).

The problem with remote attestation implementations is almost always they have no signed root of trust; basically that means you can buy a device, securely set it up, and you yourself can verify the attestation remotely yourself, but anyone else doing so is trusting that you set it up correctly in the first place.

However this is what Samsung says about KNOX:

Quote
Samsung KNOX technology uses a Secure Boot protocol that requires the device boot loader, kernel, and system software to be cryptographically signed by a key whose root of trust is verified by the hardware. Commercially sold Samsung devices will have Samsung-issued root certificates.

So if the hardware is in fact secure, in principle it will do what we need to do off-chain/instant-conf transactions. But Samsung is delaying the launch of KNOX until "later this year" and they haven't as far as I know released a developer API. It's quite possibly that it won't be possible for developers to just download the API and develop KNOX apps without signing NDA's and getting approval from Samsung for every app.

beeblebrox
Member
**
Offline Offline

Activity: 117
Merit: 10


View Profile
June 20, 2013, 05:05:37 AM
 #26

........
So if the hardware is in fact secure, in principle it will do what we need to do off-chain/instant-conf transactions. But Samsung is delaying the launch of KNOX until "later this year" and they haven't as far as I know released a developer API. It's quite possibly that it won't be possible for developers to just download the API and develop KNOX apps without signing NDA's and getting approval from Samsung for every app.

Suppose we'll have to wait and see what Samsung's stance is. 

Even if it turns out to be a closed development environment it is possible that they wouldn't deny Bitcoin related apps.  As far as I know Bitcoin has not been declared outright illegal yet by any major developed country so the legality of it hopefully would not be a major concern for them.  Also, considering the fact that by denying such projects Samsung would be losing a whole niche market that it could dominate from first mover lock-in advantage I think we should have some  hope that they would allow it.

If development did require NDAs I'd still consider this a game-changing project, though you would obviously have to have more trusted parties involved than if it was general open source/open access development.  It would still be something I consider worth supporting and donating to for the general benefit of the bitcoin economy even if others directly profited and I didn't receive any immediate reward.
Mike Hearn
Legendary
*
expert
Offline Offline

Activity: 1526
Merit: 1129


View Profile
June 20, 2013, 08:23:35 AM
 #27

As far as I know, TrustZone does not support remote attestation unfortunately.
Pages: « 1 [2]  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!