Live data from Hacker News

You don’t need reproducible builds

blog.cmpxchg8b.com

121–130 of 179 posts

Re: You don’t need reproducible builds

#121
post #74

Earlier quoted context omitted.

> Next, I install signal on my phone via the app store. How do I know the app I installed matches the source code that was audited? After all, google / Apple could decide / be forced to provide a modified binary. > Reproducible builds work for that. You read the original post, right? He discusses this at length. Actually, right in the beginning. In short, if you go through the dance of building the binary yourself to…

If the app store distributes binaries to thousands of people, and only one of them rebuilds from source to check, those thousands of people gain a substantial (but not perfect) level of protection.

Yes, it would be "not community-minded" if you did a build, and it didn't match the app store, and you told no one.

Re: You don’t need reproducible builds

#122
post #95

Earlier quoted context omitted.

I can't remember seeing any cc_test target at Google that ran with realistic release optimizations (AutoFDO/SamplePGO+LTO) and even if they did it's still not the release binary because it links in the test case and the test main function.

Did you look in the CI system for configurations there? I see FDO enabled in those tests. (Speaking at a high level, configurations can be modified in bazelrc and with flags without being explicitly listed in the cc_test rule itself) > release binary because it links in the test case and the test main function. Sure, but it's verifiably the same object files as get put into the release artifact.

> Sure, but it's verifiably the same object files as get put into the release artifact.

Well, not if you use LTO.

Re: You don’t need reproducible builds

#123

Ugh... If building the same source produces different binaries, then I'd like to know (a) what is causing the difference and (b) what other differences does it cause? Being able to produce a consistent result is simply a sign of professionalism.

How about using a different toolchain? (eg: gcc vs clang). Or even different versions of a toolchain? Or a dependency that has to be downloaded? Being able to build consistently requires way more effort than just following professional practices. One method I know is to pin everything that goes into a build - source, dependencies, toolchains, configurations and environment. Results of non-consistent build can be as s…

Yes, yes and yes. The toolchain and the dependencies should be pinned.

Otherwise sooner or later you'll hit the customer's issue that you won't be able to reproduce - until you realize it's some subtle bug in the specific version of your compiler.

Re: You don’t need reproducible builds

#124
post #46

The premise of the article is ignoring difference between "trust" and "trust but verify". And then there's a QA which answers criticism with "I absolutely disagree", "I think this is true, but". > We know that attackers really do want to compromise build infrastructure, but more often they want to steal proprietary source code, which must pass through build servers. This has shifted the goalposts so much they're on a…

Yes, exactly. And crucially you don’t need to verify yourself to get the benefits of verification. There is value in crowdsourced verification (i.e. I always have to choose a trusted vendor but it is safer when I know others might try building themselves and raise a fuss if there is a mismatch between their build and my vendor’s build).

Re: You don’t need reproducible builds

#125
post #22
post #21

I think the author hasn’t accurately described the workflow where reproducible builds are used. Here’s my attempt. There are three entities: 1. The vendor, who creates and _distributes_ a product, which may include software, to the end user 2. The end user, who receives the product from the vendor, operates the product, and trusts one or more verifiers to correctly certify the product according to some standard that…

but this just shifts the burden of who to trust to the verifiers. It didn't make the software from the vendor _any more_ trustworthy.

No, because now you don’t have to trust any one entity completely. You just have to trust that at least one of the verifiers is uncompromised.

Re: You don’t need reproducible builds

#126
Reproducible builds are primarily useful at organizations with strong auditing requirements. The build system is the root of trust and it's possible to achieve a high degree of trust inside an organization.

I think what the author misses is that having multiple vendors or distributions providing signed deterministic/reproducible builds reduces the total cost of maintaining individual trusted build environments.

For example, the author claims that the most straightforward way of producing a trusted build is to do the build from source oneself. That is true, but ignores the cost of millions of individuals spinning CPU cycles to build their own local packages, which has already been deemed too high by most users.

If N independent entities build and sign reproducible packages for a distribution then the probability of incorrect binaries being produced is P(individual_problem)^N for as many N as local package managers want to check, or trust an aggregator to fetch and compare signatures from all N producers. N can be far smaller than the number of individual uses of the packages while still being more trusted than a single vendor maintaining their own highly-trusted build system. If large organizations participate in this multi-entity process they can only increase their own certainty that they've produced accurate builds from source for packages built publicly at least.

Deterministic builds also solve the compiler back door problem (ala "Reflections on Trusting Trust"). Compiling each repeatible/deterministic compiler (e.g. GCC, llvm, TCC, MSVC) with every other compiler and verifying that all deterministic builds are identical from any compilation path, e.g. that tcc(gcc(MSVC(llvm(tcc)))) produces identical output to MSVC(gcc(tcc(llvm(tcc)))). The process can be extended to verifying these paths under multiple OS's and hardware architectures. This establishes a practical root of trust; a well-known compiler binary trusted to translate source code into binaries without binary backdoors. https://news.ycombinator.com/item?id=10181339 for previous discussion.

Finally, deterministic builds allow verifiable signatures of the form "This container OS with signature A running a software package with signature B with input having signature C produces output with signature D" for arbitrary choices of deterministic source code. This allows for verifiable computing in general; the ability to trust that the output of running compiled source on a particular input (including other source code) actually produces a particular output. This reduces the cost of establishing a trusted system from the high cost of building everything from source to the cost of building the root of trust from source and trusting the plurality of signatures establishing that building the rest of the system from this trusted root results in the same publicly available binaries. The process can be extended all the way to formal verification of the root of trust and any other desired components.

Re: You don’t need reproducible builds

#127

Earlier quoted context omitted.

You're semantically right, but also missing the point. The expense of getting to deterministic builds is large - You have to take great care in your build infrastructure and scripts. The benefits are also large, and worth it. Once you've gotten to deterministic builds, the expense of getting to reproducible builds is small; Typically days worth of work as opposed to months. The benefits are very different, but far fr…

What is the difference?

Deterministic build means every time you compile the same source you get the same executable. Reproducible build means that you specify and relay enough information to allow everyone else to reproduce your results for themselves in their own environment.

Re: You don’t need reproducible builds

#128
These arguments against reproducible builds are very provincial, temporally.

Which is to say, they assume a user now downloading source now to compile and use now.

One of the things I like about reproducibility is that someday, in the future, when the project is closed and the website is down and the author is dead ... we can take the source code and compile it and compare it to our own notes (or to the wayback machine, or whatever) of the checksums, etc., of the binaries and gain some confidence that we have what we think we have.

Post reply on HN