Bitcoin Forum
May 05, 2024, 04:10:15 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: 1 2 3 [All]
  Print  
Author Topic: Bitcoin Signed Binaries  (Read 5408 times)
ChloeST (OP)
Newbie
*
Offline Offline

Activity: 11
Merit: 0


View Profile
May 29, 2011, 12:22:14 PM
 #1

I have to ask why there are no signed binaries of the Bitcoin Clients? The bitcoin client is the center of what should be a very secure system for an individual. (Unless their primary accounts are on MtGox or a similar site, in which case they have to trust ssl and MtGox.)

On Windows the binary has no digital signature on the executable. Other less important software has digital signatures (media players, games, even poker clients are signed (PartyPoker is signed with a Thawte verified certificate).

On linux, there are no hashes available of the current distribution .tar.gz. Ubuntu offers hashes of their product through a ssl encrypted page: https://help.ubuntu.com/community/UbuntuHashes

PGP signatures for communication with bitcoin developers are readily available on the bitcoin.org front page next to their email addresses. Why aren't there verifiable gpg signatures for the binary downloads also available?
1714882215
Hero Member
*
Offline Offline

Posts: 1714882215

View Profile Personal Message (Offline)

Ignore
1714882215
Reply with quote  #2

1714882215
Report to moderator
Even in the event that an attacker gains more than 50% of the network's computational power, only transactions sent by the attacker could be reversed or double-spent. The network would not be destroyed.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714882215
Hero Member
*
Offline Offline

Posts: 1714882215

View Profile Personal Message (Offline)

Ignore
1714882215
Reply with quote  #2

1714882215
Report to moderator
LMGTFY
Hero Member
*****
Offline Offline

Activity: 644
Merit: 502



View Profile
May 29, 2011, 12:27:57 PM
 #2

I have to ask why there are no signed binaries of the Bitcoin Clients? The bitcoin client is the center of what should be a very secure system for an individual. (Unless their primary accounts are on MtGox or a similar site, in which case they have to trust ssl and MtGox.)

On Windows the binary has no digital signature on the executable. Other less important software has digital signatures (media players, games, even poker clients are signed (PartyPoker is signed with a Thawte verified certificate).

On linux, there are no hashes available of the current distribution .tar.gz. Ubuntu offers hashes of their product through a ssl encrypted page: https://help.ubuntu.com/community/UbuntuHashes

PGP signatures for communication with bitcoin developers are readily available on the bitcoin.org front page next to their email addresses. Why aren't there verifiable gpg signatures for the binary downloads also available?
Good question! I'd imagine it's because the developers are overworked and underpaid!

I'm not sure how practical digital signatures would be in the short term, as Thawte etc will charge for them - but hopefully someone nearer the issue than me can comment.

Regarding hashes, that should be pretty easy to implement - but I'd imagine it's time that's the problem. I don't suppose you'd be able to volunteer to help out the devs with this?

This space intentionally left blank.
grue
Legendary
*
Offline Offline

Activity: 2058
Merit: 1431



View Profile
May 29, 2011, 03:45:30 PM
 #3

there's no need for signing the binaries. the release announcements are pgp signed, with a hash of the binaries.

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

Adblock for annoying signature ads | Enhanced Merit UI
Mike Hearn
Legendary
*
expert
Offline Offline

Activity: 1526
Merit: 1129


View Profile
May 30, 2011, 11:21:52 AM
 #4

No, the binaries should be signed for the AV reasons discussed previously. It doesn't happen, basically because "nobody got around to it yet". There's work in progress to move to reproducible builds in which multiple trusted developers check that the source code compiles to the binary being released, and then all sign that. Certainly a regular Win32 signature should be included as part of that process and I'm sure soon it will be.
BombaUcigasa
Legendary
*
Offline Offline

Activity: 1442
Merit: 1000



View Profile
May 30, 2011, 11:24:35 AM
 #5

Ontopic, I downloaded a RC bitcoin client from sourceforge, and NOD32 stopped the download because it got a PE/NewHeur trojan warning. None of the other releases give this warning. How can we be sure the binaries published on the official source control hubs are free of malware?
matt.collier
Member
**
Offline Offline

Activity: 105
Merit: 10



View Profile
May 30, 2011, 05:11:15 PM
 #6

I am a GlobalSign reseller and I will sell a Microsoft Authenticode Code Signing Certificate for the BTC equivalent of $180 USD.  The retail price for this certificate is $229.

matt.collier
Member
**
Offline Offline

Activity: 105
Merit: 10



View Profile
May 30, 2011, 05:42:10 PM
 #7

There's also the Certificate for Individuals which retails at $99, but I'm not sure if that's appropriate for this purpose.

[edit]

I will sell this one for $50, but it will have the name of an individual on the certificate, not an organization.

http://www.globalsign.com/code-signing/buy-code-signing-for-individual-developers.html
ene
Newbie
*
Offline Offline

Activity: 42
Merit: 0


View Profile
May 30, 2011, 06:29:09 PM
 #8

there's no need for signing the binaries. the release announcements are pgp signed, with a hash of the binaries.

Not everybody has PGP installed.
grue
Legendary
*
Offline Offline

Activity: 2058
Merit: 1431



View Profile
May 30, 2011, 08:28:04 PM
 #9

I am a GlobalSign reseller and I will sell a Microsoft Authenticode Code Signing Certificate for the BTC equivalent of $180 USD.  The retail price for this certificate is $229.
any chance you can donate this certificate to the bitcoin community?

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

Adblock for annoying signature ads | Enhanced Merit UI
matt.collier
Member
**
Offline Offline

Activity: 105
Merit: 10



View Profile
May 30, 2011, 08:36:40 PM
 #10

The $180 price includes my reseller discount and $25 of my own money.  I feel comfortable with that level of assistance.
Matt Corallo
Hero Member
*****
expert
Offline Offline

Activity: 755
Merit: 515


View Profile
May 30, 2011, 09:35:18 PM
 #11

On 0.4.0 PGP signing:
Starting with 0.4.0, the bitcoin releases on Win32 will be generated deterministically (assuming me/devrandom have enough time to code the specifics) and signed by all the Bitcoin developers who have the ability to do so.  The "installer" will then install a minimal script and the relevant dependencies to the Bitcoin folder and then run that script.  That script then downloads the latest version of Bitcoin and checks that enough signatures are on it for it to be considered trusted and install that version.  The script will (hopefully) also be used to update bitcoin when new versions come out.

On code signing:
This one is a bit more difficult.  Because Bitcoin will be built deterministically, we have two options.  A. send the code signing private key around to all the devs for that to be a part of the building process (this is even harder as the building happens on Linux via the MinGW cross compiler) or B. find a way to strip out the code signing certificate in the download script and then check the stripped version instead of the signed version.  I googled this pretty quick and saw no simple CLI program which will do this, but I might have missed something as I didnt spend too much time on it.  If anyone finds something, please tell me. 

Bitcoin Core, rust-lightning, http://bitcoinfibre.org etc.
PGP ID: 07DF 3E57 A548 CCFB 7530  7091 89BB B866 3E2E65CE
grue
Legendary
*
Offline Offline

Activity: 2058
Merit: 1431



View Profile
May 30, 2011, 09:39:19 PM
 #12

On 0.4.0 PGP signing:
Starting with 0.4.0, the bitcoin releases on Win32 will be generated deterministically (assuming me/devrandom have enough time to code the specifics) and signed by all the Bitcoin developers who have the ability to do so.  The "installer" will then install a minimal script and the relevant dependencies to the Bitcoin folder and then run that script.  That script then downloads the latest version of Bitcoin and checks that enough signatures are on it for it to be considered trusted and install that version.  The script will (hopefully) also be used to update bitcoin when new versions come out.

On code signing:
This one is a bit more difficult.  Because Bitcoin will be built deterministically, we have two options.  A. send the code signing private key around to all the devs for that to be a part of the building process (this is even harder as the building happens on Linux via the MinGW cross compiler) or B. find a way to strip out the code signing certificate in the download script and then check the stripped version instead of the signed version.  I googled this pretty quick and saw no simple CLI program which will do this, but I might have missed something as I didnt spend too much time on it.  If anyone finds something, please tell me. 
auto-update = super bad idea. if a attacker can compromise the script, he can make tons of rouge clients.

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

Adblock for annoying signature ads | Enhanced Merit UI
Matt Corallo
Hero Member
*****
expert
Offline Offline

Activity: 755
Merit: 515


View Profile
May 30, 2011, 10:01:23 PM
 #13

auto-update = super bad idea. if a attacker can compromise the script, he can make tons of rouge clients.
Obviously we aren't going to blindly auto-update, there will be a user-prompt.  Also, the binaries are signed by multiple developers meaning you would have to compromise the pgp private keys of several developers.  If you think an attacker will try to compromise the download script, well how is that any different from compromising the current downloads?  You would have to compromise sourceforge, so it wouldn't make a difference.  If you think the script itself might be trickable into downloading without having enough signatures, then I ask you to look it over yourself https://github.com/devrandom/gitian-builder/blob/updater/share/gitian-updater

Bitcoin Core, rust-lightning, http://bitcoinfibre.org etc.
PGP ID: 07DF 3E57 A548 CCFB 7530  7091 89BB B866 3E2E65CE
jimbo77
Member
**
Offline Offline

Activity: 224
Merit: 10


View Profile
May 30, 2011, 10:27:42 PM
 #14


auto-update = super bad idea. if a attacker can compromise the script, he can make tons of rouge clients.
Wouldn't it be more risky NOT having an auto-update? As long as the process of getting the binaries is secure. I'm thinking from the point of view that there could be exploits in the network or old versions where you want people to update to protect themselves. People are notorious for not upgrading and what if we need them too to prevent an attack on the network? Newer web browsers seem to do it to enhance security so why wouldn't that be the case for bitcoin?
ene
Newbie
*
Offline Offline

Activity: 42
Merit: 0


View Profile
May 30, 2011, 10:32:24 PM
 #15

As long as the process of getting the binaries is secure.

You missed the point.  Roll Eyes
jimbo77
Member
**
Offline Offline

Activity: 224
Merit: 10


View Profile
May 30, 2011, 10:35:33 PM
 #16

As long as the process of getting the binaries is secure.

You missed the point.  Roll Eyes
I did? You can make updating secure such that other risks are higher than the update risk.
matt.collier
Member
**
Offline Offline

Activity: 105
Merit: 10



View Profile
May 30, 2011, 10:50:45 PM
 #17

May I suggest another thread for the auto-update debate?
publickeyhash
Newbie
*
Offline Offline

Activity: 20
Merit: 0


View Profile
May 30, 2011, 11:30:55 PM
 #18

The compiler should use ProPolice or /GS in case of M$
ene
Newbie
*
Offline Offline

Activity: 42
Merit: 0


View Profile
May 31, 2011, 01:14:28 AM
 #19

As long as the process of getting the binaries is secure.

You missed the point.  Roll Eyes
I did? You can make updating secure such that other risks are higher than the update risk.

They're different kinds of risk. If the auto-update has a vulnerability, somebody could steal the private keys of tens of thousands of users in a matter of minutes. If the client software has some other vulnerability, then depending on the nature of it, it will be more or less dangerous than what I just mentioned. Probably less.
keystroke
Hero Member
*****
Offline Offline

Activity: 900
Merit: 1014


advocate of a cryptographic attack on the globe


View Profile
September 26, 2012, 02:42:14 AM
 #20

It's been over a year since this thread was touched. I was just looking at my system with Process Explorer and out of the 62 processes, only 3 are not signed. One of them is Bitcoin-qt. Is there any downside to signing? I always verify with Gavin's signature and I trust that keychain more than I would one issued by a centralized authority... We all know what has happened to SSL CAs. Is this the argument?

"The difference between a castle and a prison is only a question of who holds the keys."
Maged
Legendary
*
Offline Offline

Activity: 1204
Merit: 1015


View Profile
September 26, 2012, 04:31:00 AM
 #21

Is there any downside to signing?
As Matt said...
On code signing:
This one is a bit more difficult.  Because Bitcoin will be built deterministically, we have two options.  A. send the code signing private key around to all the devs for that to be a part of the building process (this is even harder as the building happens on Linux via the MinGW cross compiler) or B. find a way to strip out the code signing certificate in the download script and then check the stripped version instead of the signed version.  I googled this pretty quick and saw no simple CLI program which will do this, but I might have missed something as I didnt spend too much time on it.  If anyone finds something, please tell me. 
As you can see, that's a pretty big downside.

kjj
Legendary
*
Offline Offline

Activity: 1302
Merit: 1024



View Profile
September 26, 2012, 04:37:37 AM
 #22

It's been over a year since this thread was touched. I was just looking at my system with Process Explorer and out of the 62 processes, only 3 are not signed. One of them is Bitcoin-qt. Is there any downside to signing? I always verify with Gavin's signature and I trust that keychain more than I would one issued by a centralized authority... We all know what has happened to SSL CAs. Is this the argument?

Matt hit it.  (And Maged beat me to it, but I think I explain more.)

On code signing:
This one is a bit more difficult.  Because Bitcoin will be built deterministically, we have two options.  A. send the code signing private key around to all the devs for that to be a part of the building process (this is even harder as the building happens on Linux via the MinGW cross compiler) or B. find a way to strip out the code signing certificate in the download script and then check the stripped version instead of the signed version.  I googled this pretty quick and saw no simple CLI program which will do this, but I might have missed something as I didnt spend too much time on it.  If anyone finds something, please tell me. 

Bitcoin-qt isn't built in Windows, it is cross-compiled from a Linux.  Even worse, the build process is totally scripted inside a Linux virtual machine.  There are several people that build the binaries in this way, and then they compute hashes on the outputs.  The official releases only get posted after a bunch of people have all built exactly the same files, as verified by the hashes.

To get signed Windows binaries, we would need to distribute the signing key to everyone that builds the releases, which would be bad.  Also, I'm guessing here, but I bet that Microsoft's policies for accepting CA certs for code signing require that the CA have policies that prevent distribution of the keys they hand out.

Phew, I managed to get all of the way through a PKI post without going off onto a tangent about how the current CA scheme used by SSL and everything else is absolutely and totally fucked and broken.  Er, almost.

17Np17BSrpnHCZ2pgtiMNnhjnsWJ2TMqq8
I routinely ignore posters with paid advertising in their sigs.  You should too.
casascius
Mike Caldwell
VIP
Legendary
*
Offline Offline

Activity: 1386
Merit: 1136


The Casascius 1oz 10BTC Silver Round (w/ Gold B)


View Profile WWW
September 26, 2012, 05:04:04 AM
 #23

If the objective is to sign the binaries in a Windows-favored style just so that it's signed for the sake of shutting up the OS about untrusted software, just one person doing the signature will accomplish the objective.  That person can just as well sign with a personal (rather than organizational) signature.  Until Windows makes any distinction between once-signed and multiply-signed binaries, the practical difference is moot.  Mac OS X likely falls under the same umbrella.  Multiple PGP signatures can and ought to be checked by those able to do so.

I might point out that someone downloading an update is far more in a position to be scammed than someone downloading the client for the first time, since the updater is far more likely to own coins.  Therefore, I would submit including an automated update mechanism in the client with authentication built in would be the most effective mechanism to bring secure client downloads to bitcoin users.

I believe that Windows binary signing is meant to make sure that code can be connected with a real person or organization.  It wasn't designed to be a technical based control against all rogue code, it's meant to be a legal/social one (where someone who signs something harmful can be identified and held accountable - as well as the certificate revoked - and therefore has an incentive not to abuse it).

Companies claiming they got hacked and lost your coins sounds like fraud so perfect it could be called fashionable.  I never believe them.  If I ever experience the misfortune of a real intrusion, I declare I have been honest about the way I have managed the keys in Casascius Coins.  I maintain no ability to recover or reproduce the keys, not even under limitless duress or total intrusion.  Remember that trusting strangers with your coins without any recourse is, as a matter of principle, not a best practice.  Don't keep coins online. Use paper or hardware wallets instead.
kjj
Legendary
*
Offline Offline

Activity: 1302
Merit: 1024



View Profile
September 26, 2012, 05:12:12 AM
 #24

If the objective is to sign the binaries in a Windows-favored style just so that it's signed for the sake of shutting up the OS about untrusted software, just one person doing the signature will accomplish the objective.  That person can just as well sign with a personal (rather than organizational) signature.  Until Windows makes any distinction between once-signed and multiply-signed binaries, the practical difference is moot.  Mac OS X likely falls under the same umbrella.  Multiple PGP signatures can and ought to be checked by those able to do so.

I might point out that someone downloading an update is far more in a position to be scammed than someone downloading the client for the first time, since the updater is far more likely to own coins.  Therefore, I would submit including an automated update mechanism in the client with authentication built in would be the most effective mechanism to bring secure client downloads to bitcoin users.

I believe that Windows binary signing is meant to make sure that code can be connected with a real person or organization.  It wasn't designed to be a technical based control against all rogue code, it's meant to be a legal/social one (where someone who signs something harmful can be identified and held accountable - as well as the certificate revoked - and therefore has an incentive not to abuse it).

I think you missed a key point, pun intended.  The build process demands that multiple people all produce exactly the same binary file, bit for bit.  The only way to do this is to have multiple people with the same private signing key, which is bad security, and had certainly better be grounds for revocation of the signing certificate.

You are somewhat right about the technical control / legal control aspect, but it turns out that whatever the intention was, lots of things treat binaries differently based on the validity of the signature.

17Np17BSrpnHCZ2pgtiMNnhjnsWJ2TMqq8
I routinely ignore posters with paid advertising in their sigs.  You should too.
casascius
Mike Caldwell
VIP
Legendary
*
Offline Offline

Activity: 1386
Merit: 1136


The Casascius 1oz 10BTC Silver Round (w/ Gold B)


View Profile WWW
September 26, 2012, 06:22:50 AM
 #25

I think you missed a key point, pun intended.  The build process demands that multiple people all produce exactly the same binary file, bit for bit.  The only way to do this is to have multiple people with the same private signing key, which is bad security, and had certainly better be grounds for revocation of the signing certificate.

This is a build process that can be changed as needs arise, right?

Simply eliminate the bytes belonging to the signature field from comparison.  Adding a signature, according to a cursory Google search, simply fills in a pre-allocated signature field inside the executable in a location that can be found deterministically from the executable file headers.  When Microsoft hashes the file for the purpose of signature validation, this field is located and excluded from the hash calculation by design, so a signed binary will hash the same as an unsigned one for their signing purposes.  The build process could do the same.  Then it could automatically confirm that the same binary (minus the signature) was signed by everyone, and then you'd have great security.

Companies claiming they got hacked and lost your coins sounds like fraud so perfect it could be called fashionable.  I never believe them.  If I ever experience the misfortune of a real intrusion, I declare I have been honest about the way I have managed the keys in Casascius Coins.  I maintain no ability to recover or reproduce the keys, not even under limitless duress or total intrusion.  Remember that trusting strangers with your coins without any recourse is, as a matter of principle, not a best practice.  Don't keep coins online. Use paper or hardware wallets instead.
Pieter Wuille
Legendary
*
qt
Offline Offline

Activity: 1072
Merit: 1174


View Profile WWW
September 26, 2012, 11:12:16 AM
 #26

Simply eliminate the bytes belonging to the signature field from comparison.  Adding a signature, according to a cursory Google search, simply fills in a pre-allocated signature field inside the executable in a location that can be found deterministically from the executable file headers.  When Microsoft hashes the file for the purpose of signature validation, this field is located and excluded from the hash calculation by design, so a signed binary will hash the same as an unsigned one for their signing purposes.  The build process could do the same.  Then it could automatically confirm that the same binary (minus the signature) was signed by everyone, and then you'd have great security.

Sounds like it's relatively easy to add/remove such a signature from a binary, so it could be done after the gitian building step, and still be verifiable. I'm all in favor of signing released binaries if it helps making Bitcoin trustworthy. I'm totally oblivious about the process to achieve that for Windows binaries, though.

I do Bitcoin stuff.
Diapolo
Hero Member
*****
Offline Offline

Activity: 769
Merit: 500



View Profile WWW
September 26, 2012, 02:25:36 PM
 #27

One additional idea for thrustworthyness, could we compute the hash in the binary (a hash of itself during startup) and compare that agains the reference-hash, which resides on the download server or is stored where it can't be manipulated (no master plan for this though) and warn the user or block program usage, when the hashes don't match? I have to admit I never checked the hash of bitcoin-qt.exe btw. ^^ and I would love if I could easily ensure I have a valid and official binary.

Dia

Liked my former work for Bitcoin Core? Drop me a donation via:
1PwnvixzVAKnAqp8LCV8iuv7ohzX2pbn5x
bitcoin:1PwnvixzVAKnAqp8LCV8iuv7ohzX2pbn5x?label=Diapolo
casascius
Mike Caldwell
VIP
Legendary
*
Offline Offline

Activity: 1386
Merit: 1136


The Casascius 1oz 10BTC Silver Round (w/ Gold B)


View Profile WWW
September 26, 2012, 05:06:07 PM
 #28

One additional idea for thrustworthyness, could we compute the hash in the binary (a hash of itself during startup) and compare that agains the reference-hash, which resides on the download server or is stored where it can't be manipulated (no master plan for this though) and warn the user or block program usage, when the hashes don't match? I have to admit I never checked the hash of bitcoin-qt.exe btw. ^^ and I would love if I could easily ensure I have a valid and official binary.

Dia

Problem is that someone who modifies a binary to be malicious will just as easily modify the self-test to falsely report success.

The only self-testing that's really sensible is for the currently installed version to acquire and verify the next version you're about to install to replace it.  The way I see it, this would actually be a strong defense against a whole lot of potential fake-client attack avenues.

Companies claiming they got hacked and lost your coins sounds like fraud so perfect it could be called fashionable.  I never believe them.  If I ever experience the misfortune of a real intrusion, I declare I have been honest about the way I have managed the keys in Casascius Coins.  I maintain no ability to recover or reproduce the keys, not even under limitless duress or total intrusion.  Remember that trusting strangers with your coins without any recourse is, as a matter of principle, not a best practice.  Don't keep coins online. Use paper or hardware wallets instead.
Mike Hearn
Legendary
*
expert
Offline Offline

Activity: 1526
Merit: 1129


View Profile
September 26, 2012, 06:06:44 PM
 #29

Agree with Mike, just one quibble - the main usage of PE signatures today is so anti-virus systems can automatically learn reputation. Having a binary signed by a "good" organization that has lots of installs and few/no reports of being a virus means even if the executable/DLL is brand new, it'll be left alone. It also helps AV engines detect modified system libraries. For this reason it's really helpful to let Bitcoin develop a good reputation - it'll reduce AV FPs.

A tool to strip the signatures from EXEs is probably already in existence, if not it'd be easy to write (for either windows or linux, though don't we already depend on Wine?).
stevegee58
Legendary
*
Offline Offline

Activity: 916
Merit: 1003



View Profile
September 26, 2012, 06:11:41 PM
 #30

Bitcoin is an open-source project.  Build the client yourself from source to guarantee you don't run a compromised executable.

That's the whole point of open source.

You are in a maze of twisty little passages, all alike.
kjj
Legendary
*
Offline Offline

Activity: 1302
Merit: 1024



View Profile
September 26, 2012, 06:51:40 PM
 #31

Bitcoin is an open-source project.  Build the client yourself from source to guarantee you don't run a compromised executable.

That's the whole point of open source.

Not a guarantee

17Np17BSrpnHCZ2pgtiMNnhjnsWJ2TMqq8
I routinely ignore posters with paid advertising in their sigs.  You should too.
stevegee58
Legendary
*
Offline Offline

Activity: 916
Merit: 1003



View Profile
September 26, 2012, 07:05:59 PM
 #32

Bitcoin is an open-source project.  Build the client yourself from source to guarantee you don't run a compromised executable.

That's the whole point of open source.

Not a guarantee

Well OK.  I meant you actually *read* the code before building it.

You are in a maze of twisty little passages, all alike.
stevegee58
Legendary
*
Offline Offline

Activity: 916
Merit: 1003



View Profile
September 26, 2012, 07:25:32 PM
 #33

The point is that you have to *trust* the person who signed it.  What if s/he is hacked and a malicious exe is signed and uploaded?

The act of signing doesn't make it trustworthy.

You are in a maze of twisty little passages, all alike.
kjj
Legendary
*
Offline Offline

Activity: 1302
Merit: 1024



View Profile
September 26, 2012, 07:36:21 PM
 #34

Bitcoin is an open-source project.  Build the client yourself from source to guarantee you don't run a compromised executable.

That's the whole point of open source.

Not a guarantee

Well OK.  I meant you actually *read* the code before building it.

Heh.  You didn't read the whole thing.

(He put a backdoor-generator into a C compiler.)

17Np17BSrpnHCZ2pgtiMNnhjnsWJ2TMqq8
I routinely ignore posters with paid advertising in their sigs.  You should too.
casascius
Mike Caldwell
VIP
Legendary
*
Offline Offline

Activity: 1386
Merit: 1136


The Casascius 1oz 10BTC Silver Round (w/ Gold B)


View Profile WWW
September 26, 2012, 07:42:44 PM
 #35

The point is that you have to *trust* the person who signed it.  What if s/he is hacked and a malicious exe is signed and uploaded?

The act of signing doesn't make it trustworthy.

The act of signing makes it independently provable that they signed it, so they can be held accountable for doing so.  Most people will behave better when they know they are accountable for their actions.

The process of requiring multiple people to compile identical binaries before releasing anything mitigates the risk of a person getting hacked.  Having everyone hacked simultaneously when they live far apart is pretty unlikely, and certificate revocation always remains possible if it somehow did happen.

Companies claiming they got hacked and lost your coins sounds like fraud so perfect it could be called fashionable.  I never believe them.  If I ever experience the misfortune of a real intrusion, I declare I have been honest about the way I have managed the keys in Casascius Coins.  I maintain no ability to recover or reproduce the keys, not even under limitless duress or total intrusion.  Remember that trusting strangers with your coins without any recourse is, as a matter of principle, not a best practice.  Don't keep coins online. Use paper or hardware wallets instead.
kuzetsa
Sr. Member
****
Offline Offline

Activity: 369
Merit: 250


View Profile
September 26, 2012, 08:19:09 PM
 #36

((...snip...)) main usage of PE signatures today is so anti-virus systems can automatically learn reputation. Having a binary signed by a "good" organization that has lots of installs and few/no reports of being a virus means even if the executable/DLL is brand new, it'll be left alone. It also helps AV engines detect modified system libraries. For this reason it's really helpful to let Bitcoin develop a good reputation - it'll reduce AV FPs.
((...snip...))

Indeed. Thanks Mike.

Regardless of how open source platform(s) normally do things, over the next release or two, there will likely still be significant market share for microsoft OSes and the respective antivirus and security tech in use.

((...snip...)) I was just looking at my system with Process Explorer and out of the 62 processes, only 3 are not signed. One of them is Bitcoin-qt. Is there any downside to signing?
((...snip...))

I can think of at least two and a half reasons not to sign:

  • Difficulties settling on a method (consensus) for implementing a signature recognized by microsoft OS platforms
  • Assorted reservations, resentment, or paranoia regarding changes to the toolchain and/or methods to produce the signed version. (possibly using a non-free tool, or even a different compiler)
  • If nobody else is willing, I might have to get off my lazy butt and do it myself. NO WANT MY THE EFFORTS!!! (partly joking, but I really could do this myself)



...Edited to add:

Oh, and as for the "unsigned processes" I have a similarly low number of unsigned ones. More than one of my signed processes is even open source.
casascius
Mike Caldwell
VIP
Legendary
*
Offline Offline

Activity: 1386
Merit: 1136


The Casascius 1oz 10BTC Silver Round (w/ Gold B)


View Profile WWW
September 26, 2012, 08:35:06 PM
 #37

I can think of at least two and a half reasons not to sign:

  • Difficulties settling on a method (consensus) for implementing a signature recognized by microsoft OS platforms
  • Assorted reservations, resentment, or paranoia regarding changes to the toolchain and/or methods to produce the signed version. (possibly using a non-free tool, or even a different compiler)
  • If nobody else is willing, I might have to get off my lazy butt and do it myself. NO WANT MY THE EFFORTS!!! (partly joking, but I really could do this myself)

It sounds to me like the way Microsoft hashes and signs its binaries are based on industry standards and not proprietary toolchains. Search Google for windows portable authenticode executable signature format... it should be possible to validate the signature without a need for Microsoft's OS, possibly with a simple home-made tool.

Companies claiming they got hacked and lost your coins sounds like fraud so perfect it could be called fashionable.  I never believe them.  If I ever experience the misfortune of a real intrusion, I declare I have been honest about the way I have managed the keys in Casascius Coins.  I maintain no ability to recover or reproduce the keys, not even under limitless duress or total intrusion.  Remember that trusting strangers with your coins without any recourse is, as a matter of principle, not a best practice.  Don't keep coins online. Use paper or hardware wallets instead.
kuzetsa
Sr. Member
****
Offline Offline

Activity: 369
Merit: 250


View Profile
September 26, 2012, 09:05:23 PM
 #38

Yep. Google is nice Wink

http://sourceforge.net/projects/libwdi/files/utilities/

Quote
cathash:
multiplatform MS CAT/Authenticode SHA-1 generation. Inspired by the tool of the same name by Michel I. Gallant.

Can be used to compute the custom SHA-1 used by Microsoft and others for Authenticode and CAT file validation.

Unlike its counterpart, this program will compile and run on any platform, including big endian UNIX.
Matt Corallo
Hero Member
*****
expert
Offline Offline

Activity: 755
Merit: 515


View Profile
September 27, 2012, 12:31:51 AM
 #39

Awesome! If anyone has the time to do this, it would need to be applied in gitian updater at:
https://github.com/devrandom/gitian-builder/blob/master/share/gitian_updater.py
(We will (hopefully) eventually use gitian-updater to do automatic updates with signature checking (before anyone starts complaining, yes, with user permission)).

Bitcoin Core, rust-lightning, http://bitcoinfibre.org etc.
PGP ID: 07DF 3E57 A548 CCFB 7530  7091 89BB B866 3E2E65CE
kuzetsa
Sr. Member
****
Offline Offline

Activity: 369
Merit: 250


View Profile
September 27, 2012, 03:18:43 AM
 #40

Quote from: gitian_updater.py date=2012-08-08
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE

...

@Matt Corallo

 Huh Uh... what?

That's not what a signed binary means. This is GPG, not "authenticode" (so it's not the type used on the microsoft OS platforms)

The original post wasn't requesting "auto update" either.  Roll Eyes
tucenaber
Sr. Member
****
Offline Offline

Activity: 337
Merit: 252


View Profile
September 27, 2012, 10:09:42 AM
 #41


Thank you! I've tried to locate that article several times but failed because I thought it was by Dijkstra Wink
Matt Corallo
Hero Member
*****
expert
Offline Offline

Activity: 755
Merit: 515


View Profile
September 27, 2012, 12:08:47 PM
 #42

That's not what a signed binary means. This is GPG, not "authenticode" (so it's not the type used on the microsoft OS platforms)

The original post wasn't requesting "auto update" either.  Roll Eyes

I'm sure Gavin is perfectly capable of signing binaries, so the only thing that needs written is a way for gitian updater to verify signed binaries (by ignoring signatures).  (Note that you can also use gitian to download the first time if you want, not just on updates).  Because most people just download and check hashes against Gavin's signed release announcement, nothing needs to change there...just report the hashes of the signed copies.

Bitcoin Core, rust-lightning, http://bitcoinfibre.org etc.
PGP ID: 07DF 3E57 A548 CCFB 7530  7091 89BB B866 3E2E65CE
kuzetsa
Sr. Member
****
Offline Offline

Activity: 369
Merit: 250


View Profile
September 28, 2012, 01:12:37 AM
 #43

...Note that you can also use gitian to download the first time if you want, not just on updates...

huh? I've been manually installing my bitcoin client (and checking hashes, etc.) what on earth are you referring to? What does this "gitian" thing have to do with:

Windows Authenticode Portable Executable Signature Format

Threat mitigation sometimes involves "silly" system enforced policies such as Allowing Only Signed Application to Run

... Isn't this thread about signing the windows version of bitcoin client?
Matt Corallo
Hero Member
*****
expert
Offline Offline

Activity: 755
Merit: 515


View Profile
September 28, 2012, 05:06:22 PM
 #44

...Note that you can also use gitian to download the first time if you want, not just on updates...
huh? I've been manually installing my bitcoin client (and checking hashes, etc.) what on earth are you referring to? What does this "gitian" thing have to do with:
Yes, that is one way to download the bitcoin client securely.  Gitian is used to build the client distributedly, as well as being capable of handling auto-update (which we will hopefully use in the not-too-distant-future), which needs to be able to verify the signed binary (by stripping the signature). 

... Isn't this thread about signing the windows version of bitcoin client?
Yes, I understand what this thread is about...

Bitcoin Core, rust-lightning, http://bitcoinfibre.org etc.
PGP ID: 07DF 3E57 A548 CCFB 7530  7091 89BB B866 3E2E65CE
kuzetsa
Sr. Member
****
Offline Offline

Activity: 369
Merit: 250


View Profile
September 29, 2012, 04:27:59 AM
 #45

But gitian uses pgp-type rather than  authenticode signing.

Suspect I'm likely missing something, but  why can't the result of whatever build process just get an authenticode signature added and be done with it? If gitian just builds the unsigned binary, why does gitian even need an update for this?

Is there a super-essential absolutely mandatory required step which wasn't explained in the original post or otherwise documented somewhere? It sure isn't anything the official microsoft instructors taught back when I was getting MCSD / MCSE / etc. at my "corporate training" center back in the day.

I highly suspect this is because the build process for the windows version is cross compiled using a non-windows system using non-microsoft compilers (probably mingw gcc target or something similar)

At this point I think I'm feeling defeated enough / begun to realize  I should probably give up trying to understand what's even being done, why, which tools, etc.

 Cry Sorry, I really am a windows dev / sysadmin once you get past all my open-source hobby tinkering.

Feels soooo weird that any credentials or training I might have are completely and utterly irrelevant for making the windows build process any more standard-like. I'm not young enough, and by now I think I've been retired too long to be useful anymore.
keystroke
Hero Member
*****
Offline Offline

Activity: 900
Merit: 1014


advocate of a cryptographic attack on the globe


View Profile
September 29, 2012, 02:25:04 PM
 #46

So Gitian needs to be updated to support checking the signature? Is that correct?
https://github.com/devrandom/gitian-builder/blob/master/share/gitian_updater.py

And before that we need the build process to include automatic signing with an Authenticode certificate?

Couldn't we have Gitian still check the GPG signature and not worry about Authenticode? Then just let Windows worry about Authenticode... that gives an extra layer because GPG is in place and trusted. The GPG signature would just been to be generated after the executable was signed with Authenticode.

eg.
1) Build process - (Any details on how this works? I see there is a distributed build process in place?)
2) Authenticode signs it
3) GPG signs it
...
4) Client side Gitian runs some auto-update eventually and asks the user if they want to upgrade
Note: Is Gitian definitely secure? Eg. no attacks against the auto-update mechanism? Some programs have had this issue...
5) Gitian verified GPG signature against keys which is trusts
6) Gitian executes new Bitcoin installer code
7) Windows checks Authenticode signature and install proceeds as normal

Does the above make sense or am I missing something?

"The difference between a castle and a prison is only a question of who holds the keys."
Gavin Andresen
Legendary
*
qt
Offline Offline

Activity: 1652
Merit: 2216


Chief Scientist


View Profile WWW
September 29, 2012, 03:31:03 PM
 #47

Microsoft/authenticode assumes one trusted master key (I think? Can a binary be signed by multiple keys?)

That is contrary to the no-central-authority idea, and it would be nice to avoid that.

However, given that Apple and Microsoft are both going in the direction of "thou shalt be a registered developer to distribute software for our OS" a central signing process for at least the initial install seems inevitable.

This is one of those "interact with existing systems that do not consider the possibility of radically decentralized solutions" hurdles that the Foundation can help jump; I expect the Foundation will soon be a registered Apple and Microsoft developer, and downloads will be signed with certificates owned by the Foundation.

The alternative is downloads only geeks can use (because only geeks know how to turn off cert checks) or binaries signed by me personally. And I don't want to be a single point of failure; having an organization that will hopefully outlive me is a better solution.

The best solution would be multi-signed binaries and a decentralized web of trust system, but we're not there yet.

How often do you get the chance to work on a potentially world-changing project?
flatfly
Legendary
*
Offline Offline

Activity: 1078
Merit: 1011

760930


View Profile
September 29, 2012, 03:37:07 PM
 #48

Microsoft/authenticode assumes one trusted master key (I think? Can a binary be signed by multiple keys?)

That is contrary to the no-central-authority idea, and it would be nice to avoid that.

However, given that Apple and Microsoft are both going in the direction of "thou shalt be a registered developer to distribute software for our OS" a central signing process for at least the initial install seems inevitable.

This is one of those "interact with existing systems that do not consider the possibility of radically decentralized solutions" hurdles that the Foundation can help jump; I expect the Foundation will soon be a registered Apple and Microsoft developer, and downloads will be signed with certificates owned by the Foundation.

The alternative is downloads only geeks can use (because only geeks know how to turn off cert checks) or binaries signed by me personally. And I don't want to be a single point of failure; having an organization that will hopefully outlive me is a better solution.

The best solution would be multi-signed binaries and a decentralized web of trust system, but we're not there yet.

Yeah this would be more or less similar to what Mozilla does with the Firefox binaries.
(The installer is signed by a "Mozilla Corporation" cert, delivered by Thawte)
kuzetsa
Sr. Member
****
Offline Offline

Activity: 369
Merit: 250


View Profile
September 29, 2012, 05:16:57 PM
 #49

((...snip...))
That is contrary to the no-central-authority idea, and it would be nice to avoid that.

However, given that Apple and Microsoft are both going in the direction of "thou shalt be a registered developer to distribute software for our OS" a central signing process for at least the initial install seems inevitable.

This is one of those "interact with existing systems that do not consider the possibility of radically decentralized solutions" hurdles that the Foundation can help jump; I expect the Foundation will soon be a registered Apple and Microsoft developer, and downloads will be signed with certificates owned by the Foundation.
((...snip...))

Indeed, that was what I meant. Thanks gavin.  Smiley

Reassuring to know that my perception of the build process was roughly accurate. As to the question put forward in the original post, I think the answer might be something like: "only thing stopping it is that there is no plan in place to use an the appropriate certificate in the build process, and it doesn't help matters that we don't have one yet anyway"

Huh. Apple certificates... Maybe I should act one of my friends about the apple end. One who lives 3 blocks up the street from me is a self described "apple hipster" and whatnot. She happens to also be self-described as OS-agnostic though, among other technical goodies. Nothing wrong with favoring one platform other another.
Matt Corallo
Hero Member
*****
expert
Offline Offline

Activity: 755
Merit: 515


View Profile
September 29, 2012, 07:33:41 PM
 #50

The idea would be:
1. Build distributed (like is done now) with gitian (all builds PGP signed).
2. One person signs binaries (gavin, bitcoin foundation, etc).
3. Bitcoin sees a new version and calls gitian to verify the new version.
4. Gitian strips the signature from the binary before checking the PGP signatures made in step 1 (this is where support is needed).
5. Gitian installs new version.

Bitcoin Core, rust-lightning, http://bitcoinfibre.org etc.
PGP ID: 07DF 3E57 A548 CCFB 7530  7091 89BB B866 3E2E65CE
kuzetsa
Sr. Member
****
Offline Offline

Activity: 369
Merit: 250


View Profile
October 03, 2012, 07:45:42 AM
 #51

The idea would be:
1. Build distributed (like is done now) with gitian (all builds PGP signed).
2. One person signs binaries (gavin, bitcoin foundation, etc).
3. Bitcoin sees a new version and calls gitian to verify the new version.
4. Gitian strips the signature from the binary before checking the PGP signatures made in step 1 (this is where support is needed).
5. Gitian installs new version.

 Huh So is there some sort of builtin updater (I've never personally used such a feature) which checks against pgp signatures?

Is that what all this fuss was about?

... I think I get it now  Undecided



Edited to add:

no wait nevermind I'm still quite stumped.

I just looked in the v0.7.0-beta of "bitcoind / bitcoinqt" and there seems to be no such feature. ya'll are talking about something I know nothing about. is there a thread somewhere that explains this tool or feature or whatever it is? I don't understand why is it important? (either in this context, or at all?)
Matt Corallo
Hero Member
*****
expert
Offline Offline

Activity: 755
Merit: 515


View Profile
October 03, 2012, 06:40:54 PM
 #52

Huh So is there some sort of builtin updater (I've never personally used such a feature) which checks against pgp signatures?
Its not builtin (yet), but it exists, and we want to make sure whatever we do is compatible because we will hopefully use it (eventually).
Is that what all this fuss was about?
Yep

I just looked in the v0.7.0-beta of "bitcoind / bitcoinqt" and there seems to be no such feature. ya'll are talking about something I know nothing about. is there a thread somewhere that explains this tool or feature or whatever it is? I don't understand why is it important? (either in this context, or at all?)
https://github.com/bitcoin/bitcoin/pull/1453

Bitcoin Core, rust-lightning, http://bitcoinfibre.org etc.
PGP ID: 07DF 3E57 A548 CCFB 7530  7091 89BB B866 3E2E65CE
Pages: 1 2 3 [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!