Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gen-keys: add scripts to generate secrets #70

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

gen-keys: add scripts to generate secrets #70

wants to merge 3 commits into from

Conversation

vszakats
Copy link
Member

@vszakats vszakats commented May 9, 2024

To make binary blobs (secret keys) stored in the repo transparent,
here are the scripts that can generate those.

code signature script sourced from:
https://gist.github.com/vszakats/7ef9e86506f5add961bae0412ecbe696

@vszakats
Copy link
Member Author

vszakats commented May 9, 2024

Is this useful? Do we want this?

@Andarwinux
Copy link

This allows users to fork this repo and easily build their own signed binaries, which is very useful in my opinion. Then consider enable PE binary integritycheck (-Xlink=-integritycheck) by default.

@vszakats
Copy link
Member Author

Speaking of -Xlink=-integritycheck, is it correct, that this option makes Windows force-check the code signature at every run? Would that work with the self-signed signatures out of the box? (meaning without installing our CA root)

@Andarwinux
Copy link

that this option makes Windows force-check the code signature at every run?

Yes, Windows will refuse to execute curl.exe and issue a warning if curl.exe has been maliciously or accidentally damaged.

Would that work with the self-signed signatures out of the box? (meaning without installing our CA root)

I obviously forgot about this. For self-signed certificates, the CA need to be installed. So integritycheck shouldn't be enabled by default, but I think curl-for-win should sign official builds with a recognized code signing certificate, and then users can choose to sign their own builds with self-signed certificates.

@vszakats
Copy link
Member Author

vszakats commented May 10, 2024

I obviously forgot about this. For self-signed certificates, the CA need to be installed. So integritycheck shouldn't be enabled by default, but I think curl-for-win should sign official builds with a recognized code signing certificate, and then users can choose to sign their own builds with self-signed certificates.

It would be nice indeed, but non-self-signed certs have a few massive roadblocks:

  • obtaining a "proper" cert needs a legal entity or a person willing to publish
    their identity (with every copy of the binary).
  • this might even come with legal responsibilities, but IANAL.
  • a hefty sum to be paid to the cert provider, yearly.
  • manual administration procedure to renew, yearly.
  • it may not be true anymore but last time it also needed an obsolete Windows
    machine configured with various insecure settings to make the certificate
    issuance work. To the point that we did not manage to make it work after days
    of trying.
  • in case signed timestamps are required (I don't know if that's the case, but
    it was at least recommended/requested IIRC), it makes the final binaries
    non-reproducible. This would only be solved with a detached signature, and
    AFAIK this isn't supported by Windows. Perhaps there are other ways, that
    I'm not aware of.

I haven't read about this more than these two announcements, and some pain
points might be addressed by Microsoft's latest "Trusted Signing", cloud-based
solution, for $120/year (small tier):
https://learn.microsoft.com/en-us/azure/trusted-signing/
https://techcommunity.microsoft.com/t5/security-compliance-and-identity/trusted-signing-is-in-public-preview/ba-p/4103457

Legalese, money still required and the non-reproducibility issue likely remains.

Same / similar dance, with completely different actual steps with Apple/macOS.
(though we don't provide official macOS binaries for now.)

@vszakats vszakats force-pushed the gen-keys branch 2 times, most recently from 3db6ba6 to 0403cd7 Compare May 10, 2024 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

2 participants