From Fedora Project Wiki

Sequoia %openpgpverify

Summary

Introduce a rpm macro %openpgpverify and update packages to use it instead of existing gnupg specific %gpgverify. The new macro will use a standard OpenPGP implementation from Sequoia instead of GnuPG by default to provide support for Post Quantum Cryptography as defined in the OpenPGP WG. This is part of a gradual switching from GnuPG as dependency.

Owner

Current status

Detailed Description

GnuPG forked the OpenPGP specification as LibrePGP to develop an incompatible standard in 2023. Since then, GnuPG 2.5.* versions (not present in Fedora) can create artifacts incompatible with current OpenPGP standards. We are observing the situation and the we believe the Fedora project should embrace the OpenPGP standard developed within the IETF, which involves gradually switching from GnuPG to other implementations where possible.

We identified Sequoia-PGP as a good candidate as it implements the standard OpenPGP (including the RFC 9980 standardizing PQC). Sequoia-PGP is already used as part of RPM to verify RPM signatures since 2023, as well as in podman. RPM also supports signing RPMs using Sequoia tools since version 6.0 so adjusting the rpm macros is the natural next step.

Feedback

Several concerns were raised on the discussion thread and mailing list:

  • The name of the macro: There were suggestions to keep the gpgverify name or use pgpverify, but neither of them is really accurate and neither of the suggestions brought in any convincing reasons for a change.
  • Some suggested to replace gpgverify directly, which we consider would be very confusing (name gpg is really GnuPG specific) and would require addressing all of the issues with existing certificates at once (there will be some, see below). Having a new macro will allow addressing the issues case by case.
  • This macro will make it to older Fedora versions (and EPEL). This would not be possible if we would be changing the existing macro.
  • There were suggestions to have one macro that could handle both OpenPGP and GnuPG signatures. This has a drawback of pulling both gnupg and sequoia-sqv to the buildroot unconditionally.

Known/possible limitations:

Benefit to Fedora

  • Prevent vendor-lock-in in GnuPG ecosystem.
  • Follow IETF standardization
  • Improve security by providing developers with the ability to use Post Quantum Cryptography to sign their artifacts.
  • Integrate better with the rest of the operating system by following the system wide crypto policies.

Scope

  • Proposal owners:
    • Create a new %openpgpverify macro using sqv CLI for all supported Fedora/EPEL branches
    • Verify it works with existing artifacts in Fedora, fix/workaround/report possible issues.
    • Change %gpgverify rpm macro in existing spec files to use %openpgpverify where possible with proven packager or PRs


  • Other developers: Respond to possible issues/PRs in cases where this will not work out of the box.
  • Release engineering: N/A
  • Policies and guidelines: The Packaging Guidelines should be updated to make use %openpgpverify macro by default.
  • Trademark approval: N/A (not needed for this Change)
  • Alignment with the Fedora Strategy: ?

Upgrade/compatibility impact

No upgrade impact -- this impacts just the build system and development.

Draft macro passes all the gpgverify tests (except for out-of-specs concatenation of armored signatures and missing support for gnupg's keybox keyrings).

There should not exist any existing librePGP artifacts, but there might be some old GnuPG keys that will not pass stricter Sequoia checks (to be evaluated). Identifying them will help increase the security of the supply chain.

Early Testing (Optional)

Verify all packages that use %gpgverify macro work with %openpgpverify.

How To Test

  • Have a dist git of a package with upstream tarball signed with GPG key
  • Update gpgverify BuildRequires to openpgpverify
  • Update %gpgverify macro to %openpgpverify
  • Verify the local package build works for you with fedpkg local or fedpkg mockbuild

If not, review the log, key(ring) and report potential issues to the upstream developer or Sequoia developers. Do they use SHA1 in their certificate? Do they use small RSA key that could be broken by Quantum Computer in close future?

The package review ticket includes a link to preliminary copr repo: https://bugzilla.redhat.com/show_bug.cgi?id=2513786

User Experience

This change should not affect user experience.

Dependencies

  • rust-sequoia-sqv
  • gpgverify
  • other packages using gpgverify

Contingency Plan

  • Contingency mechanism: (What to do? Who will do it?) N/A (not a System Wide Change)
  • Contingency deadline: N/A (not a System Wide Change)
  • Blocks release? N/A (not a System Wide Change), Yes/No


Documentation

Fedora packaging guidelines need to be updated to reflect this change.

https://docs.fedoraproject.org/en-US/packaging-guidelines/#_verifying_signatures

Draft PR:

https://forge.fedoraproject.org/packaging/guidelines/pulls/1562

Release Notes

Fedora is using Sequoia to by default to verify upstream tarball signatures during the build time. This allows upstreams to sign their artifacts using Quantum Resistant algorithms defined in the latest OpenPGP RFC 9980.