Pages:
Author

Topic: Bitcoin Signed Binaries (Read 5411 times)

hero member
Activity: 755
Merit: 515
October 03, 2012, 01: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
sr. member
Activity: 369
Merit: 250
October 03, 2012, 02: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?)
hero member
Activity: 755
Merit: 515
September 29, 2012, 02: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.
sr. member
Activity: 369
Merit: 250
September 29, 2012, 12: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.
legendary
Activity: 1092
Merit: 1016
760930
September 29, 2012, 10:37:07 AM
#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)
legendary
Activity: 1652
Merit: 2301
Chief Scientist
September 29, 2012, 10:31:03 AM
#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.
hero member
Activity: 900
Merit: 1014
advocate of a cryptographic attack on the globe
September 29, 2012, 09:25:04 AM
#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?
sr. member
Activity: 369
Merit: 250
September 28, 2012, 11:27:59 PM
#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.
hero member
Activity: 755
Merit: 515
September 28, 2012, 12: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...
sr. member
Activity: 369
Merit: 250
September 27, 2012, 08:12:37 PM
#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?
hero member
Activity: 755
Merit: 515
September 27, 2012, 07:08:47 AM
#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.
sr. member
Activity: 337
Merit: 252
September 27, 2012, 05: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
sr. member
Activity: 369
Merit: 250
September 26, 2012, 10:18:43 PM
#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
hero member
Activity: 755
Merit: 515
September 26, 2012, 07:31:51 PM
#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)).
sr. member
Activity: 369
Merit: 250
September 26, 2012, 04: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.
vip
Activity: 1386
Merit: 1140
The Casascius 1oz 10BTC Silver Round (w/ Gold B)
September 26, 2012, 03: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.
sr. member
Activity: 369
Merit: 250
September 26, 2012, 03: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.
vip
Activity: 1386
Merit: 1140
The Casascius 1oz 10BTC Silver Round (w/ Gold B)
September 26, 2012, 02: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.
kjj
legendary
Activity: 1302
Merit: 1026
September 26, 2012, 02: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.)
legendary
Activity: 916
Merit: 1003
September 26, 2012, 02: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.
Pages:
Jump to: