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

Documentation on encryption is unclear and encryption options are confusing #162

Open
Atemu opened this issue Feb 8, 2022 · 7 comments
Open
Labels
documentation Improvements or additions to documentation

Comments

@Atemu
Copy link
Contributor

Atemu commented Feb 8, 2022

I want to finally migrate off test-keys now that µG supports SafetyNet and Magisk has a better hide mechanism.

Unfortunately, the signing setup of robotnix isn't very user-friendly. I want the releaseScript variant, so I built a releaseScript of my config.

This requires signing.enable = true; which is sensible but from there on, things are less clear. The first thing robotnix complains about is that signing.keyStorePath is undefined. Since I chose the releaseScript method, I don't want to sign from inside the drv, so this is extremely confusing.

Through experimentation, I later found out it needs access to the certificates, not the (private) signing keys. These should be separate options to reflect that fact. I don't mind putting (public) certificates in the Nix store.

The need for the certs can be alleviated by setting fingerprints on the prebuilt apps which the docs do hint at but they're very unclear on it.

Related: #24

@hmenke
Copy link
Contributor

hmenke commented Feb 8, 2022

Currently signing.keyStorePath is needed to determine the key fingerprints via IFD. You can do what Daniel and I and probably others are doing and hardcode the public key fingerprints in the Nix file.

https://github.com/danielfullmer/robotnix-personal/blob/ef8cd1f379e153f66aa89e9fc9362a693537187b/flake.nix#L30-L35

@Atemu
Copy link
Contributor Author

Atemu commented Feb 8, 2022

The need for the certs can be alleviated by setting fingerprints on the prebuilt apps which the docs do hint at but they're very unclear on it.

@danielfullmer danielfullmer added the documentation Improvements or additions to documentation label Feb 10, 2022
@mannp
Copy link

mannp commented Feb 17, 2022

Currently signing.keyStorePath is needed to determine the key fingerprints via IFD. You can do what Daniel and I and probably others are doing and hardcode the public key fingerprints in the Nix file.

https://github.com/danielfullmer/robotnix-personal/blob/ef8cd1f379e153f66aa89e9fc9362a693537187b/flake.nix#L30-L35

Can you clarify if this fingerprint is fixed for f-droid, or we have to get the fingerprint of the f-droid cert created by the generateKeysScript?

@Kranzes
Copy link
Member

Kranzes commented Feb 17, 2022

I never specified any fingerprint for fdroid when i used fdroid, i think it just used the one from generateKeysScript

@mannp
Copy link

mannp commented Feb 17, 2022

I never specified any fingerprint for fdroid when i used fdroid, i think it just used the one from generateKeysScript

I see thanks, so what is the purpose of this if it builds without it?

apps.prebuilt.F-Droid.fingerprint = lib.mkIf config.signing.enable "440B1449D705B85191E427C1ACF245B48854CACF1240AA358F15E4D022BA4A7F";

Perhaps it's for graphineos, and it is not needed for lineageos?

@hmenke
Copy link
Contributor

hmenke commented Feb 17, 2022

You can extract the fingerprint using

openssl x509 -noout -fingerprint -sha256 -in ./keys/f-droid.x509.pem | cut -d '=' -f 2 | tr -d ':'

Once you have hardcoded all fingerprints you can run with --option allow-import-from-derivation false which gets you one step closer to pure evaluation mode.

@mannp
Copy link

mannp commented Feb 17, 2022

Thanks, that makes sense now 👍🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

5 participants