(Open|Libre)PGP

Novità, controversie e sviluppi futuri

whoami

  • Informatico "Old school", dev, sys
  • Oltre 20 anni di attivismo: free software, standard aperti, libertà digitali, frequentazione di Hackmeeting ed eventi affini
  • "The Internet works because a lot of people cooperate to do things together"
    -- Jon Postel
  • PGP enthusiast dal 1997

Licenza slide: CC BY-SA 4.0

(Open|Libre)PGP: Novità, controversie e sviluppi futuri

Agenda

  • Intro: "Ecosistema" OpenPGP
  • Timeline storica e recente
  • Le novità di RFC 9580
    (a.k.a. OpenPGP v6 a.k.a. crypto-refresh)
  • OpenPGP vs LibrePGP
  • Sviluppi futuri
    • Bonus: Futuro dei Keyserver
(Open|Libre)PGP: Novità, controversie e sviluppi futuri

Terminologia

  • PGP™: software (inizialmente libero, oggi proprietario) sviluppato da Phil Zimmermann all'inizio degli anni '90, primo tentativo di portare la crittografia forte alle masse.
  • GnuPG: software libero sviluppato da Werner Koch dal 1999 per sostituire PGP divenuto proprietario.
    Ad oggi l'implementazione di OpenPGP più nota (ma se ne stanno diffondendo altre).
  • OpenPGP: standard aperto per l'interoperabilità dei messaggi protetti con crittografia asimmetrica, basato su PGP e definito dall'IETF dal 1996 (RFC 1991). Attualmente è definito da RFC 9580 (luglio 2024).
  • LibrePGP: proposta di standard aperto "fork" di OpenPGP nato a seguito di uno "scisma" nella comunità nell'autunno del 2023.
(Open|Libre)PGP: Novità, controversie e sviluppi futuri

"Ecosistema" OpenPGP (1)

Lo standard OpenPGP propriamente detto (RFC 9580) definisce principalmente:

  • Algoritmi supportati
    • Crittografia simmetrica e asimmetrica
    • Hashing e Firma digitale
    • String-to-Key
    • e le relative modalità operative
  • Formati di interscambio ("pacchetti")
    • Chiavi pubbliche e private
    • Messaggi cifrati e/o firmati
  • Grammatica dei messaggi (Packet Sequence Composition)
  • Raccomandazioni implementative
(Open|Libre)PGP: Novità, controversie e sviluppi futuri

"Ecosistema" OpenPGP (2)

Altre specifiche, ufficiali o de facto, la consuetudine e le scelte implementative definiscono:

  • PKI: distribuzione, ricerca e reperimento delle chiavi pubbliche (keyserver)
  • Verifica delle chiavi (Web of Trust)
  • Sicurezza delle chiavi private (hard disk, smart card, token, ...)
  • Semantica dei messaggi
  • API, CLI, GUI

La comunità usa abitualmente l'espressione Ecosistema OpenPGP per definire l'insieme degli standard, delle implementazioni (librerie, frontend, tools) e dei progetti correlati

(Open|Libre)PGP: Novità, controversie e sviluppi futuri

Timeline storica

(Open|Libre)PGP: Novità, controversie e sviluppi futuri

Timeline recente

(Open|Libre)PGP: Novità, controversie e sviluppi futuri

RFC 9580: le principali novità

  • Formato "versione 6" per chiavi, firme e messaggi
    • Fingerprint 32 byte (64 cifre hex)
  • Nuovi algoritmi e nuove modalità operative
    • Firma e Cifratura asimmetrica: Ed25519 e X25519 (MUST); Ed448 e X448 (SHOULD)
    • Cifratura simmetrica AEAD: OCB (MUST); EAX e GCM (MAY)
    • Memory-hard S2K: Argon2 (RECOMMENDED)
    • Hashing: SHA3 (MAY)
    • Key derivation/separation: HKDF
    • Firme non deterministiche
  • Deprecazione algoritmi e formati deboli o obsoleti
    • RSA < 3072, DSA, ElGamal, MD5, SHA1, RIPEMD, IDEA, 3DES e altri; pacchetti ver. 2 e 3
  • Molto altro ⇒ RFC 9580 Appendix B
(Open|Libre)PGP: Novità, controversie e sviluppi futuri

OpenPGP vs LibrePGP 1/3

  1. Questioni di metodo (consenso nel WG)
  2. Symmetric Mode
    GCM molto complesso da implementare in modo sicuro
  3. Padding Packet
    Introdurrebbe rischi di covert channel a fronte di benefici non dimostrabili
  4. Changes to the ECDH Encryption
  5. Proliferation for Algorithms
(Open|Libre)PGP: Novità, controversie e sviluppi futuri

OpenPGP vs LibrePGP: 2/3

  1. Removal of Useful Real-world Features
    Es. designated revoker
  2. Removal of Security Fixes
    Firma metadati dei file (nome, timestamp ultima modifica)
  3. Salted Signature Issue
    Introdurrebbe rischi di covert channel a fronte di benefici non dimostrabili
  4. Regression from Deployed Formats and Standard Behavior
    Es. cifratura storage a lungo termine
(Open|Libre)PGP: Novità, controversie e sviluppi futuri

OpenPGP vs LibrePGP 3/3

Feature OpenPGP LibrePGP* Note
Versione chiavi e firme 6 5+ molto simili (eccetto msg cifrati AEAD)
Algo firma default Ed25519 ECDSA
Algo asimmetrico default X25519 ECDH
Algo simmetrico default AES128/OCB AES128/OCB implementati e serializzati diversamente+
Algo hash default SHA256 SHA256
AEAD OCB, EAX, GCM OCB+, EAX implementati e serializzati diversamente
Memory-hard S2K Argon2 No
Key derivation HKDF No+
Firma non deterministica No
Firma metadati file Opzionale2 2 draft-gallagher-openpgp-literal-metadata
Post-Quantum Crypto altre RFC3 ML-KEM4 3 draft-ietf-openpgp-pqc (cifratura e firma)
4 Solo cifratura, mod. op. incompatibile
Altre funzionalità altre RFC Incluse es. 1pa3pc, key flags vari, ...

* Versione Draft settembre 2024
+
A. Gallagher A Summary of Known Security Issues in LibrePGP

(Open|Libre)PGP: Novità, controversie e sviluppi futuri

Implementazioni (in progress)

OpenPGP

  • Sequoia (Rust)
    • Chameleon, Octopus
  • rPGP (Rust)
  • PGPy (Python)
  • GOpenPGP (Go)
  • OpenPGP.js (Javascript)
  • Bouncy Castle (Java)
    • PGPainless (Kotlin)
  • Bouncy Castle (C#) PR

LibrePGP

  • GnuPG (C)
    • gpg4win, gpgme, kleopatra
  • rnp (C++)
(Open|Libre)PGP: Novità, controversie e sviluppi futuri

Implementazioni OpenPGP (in progress)


percentage of tests where an implementation agrees with the test suite's expectations on all individual test vectors


percentage of individual test vectors where an implementation agrees with the test suite's expectations

Fonte: OpenPGP interoperability test suite (agg. 2024-09-17)

(Open|Libre)PGP: Novità, controversie e sviluppi futuri

OpenPGP Interoperability test suite

Detached Sign-Verify roundtrip with minimal key from Appendix A.3 of RFC 9580.

Fonte: OpenPGP interoperability test suite

(Open|Libre)PGP: Novità, controversie e sviluppi futuri

I prossimi sviluppi

Priorità: Post-Quantum Cryptography (draft-ietf-openpgp-pqc) e Migration path v4 ⇒ v6 ⇒ v6+PQC, a seguire:

- -
Replacement Key Signalling Mechanism draft-ietf-openpgp-replacementkey
1st-Party Approved 3rd-Party Certifications draft-dkg-openpgp-1pa3pc
Persistent Symmetric Keys draft-ietf-openpgp-persistent-symmetric-keys
Stateless Command Line Interface (sop) draft-dkg-openpgp-stateless-cli
HTTP Keyserver Protocol draft-gallagher-openpgp-hkp
Web Key Directory draft-koch-openpgp-webkey-service
OpenPGP External Secret Keys (smart card) draft-dkg-openpgp-external-secrets
Signature Salt Notation draft-huigens-openpgp-signature-salt-notation

E ancora: Forward secrecy, Context binding, Web of Trust, Key Verification, ... (vedi charter)

(Open|Libre)PGP: Novità, controversie e sviluppi futuri

Migrazione

  • Diffusione implementazioni 9580-compliant e successivamente PQC
    Sarà un processo lungo: richiede un sacco di lavoro lato librerie, backend, frontend, infrastruttura
  • Alcune nuove funzioni possono essere usate con le "vecchie" chiavi v4 (Argon2, AEAD), altre no (firma)
  • Sfida: creare e distribuire nuove chiavi v6 senza "rompere" la Web of Trust e garantendo conversazioni di gruppo
    • Proposta "Replacement Key": avere due chiavi, una v4 e una v6, reciprocamente firmate; un meccanismo semiautomatico gestisce retrieve e fallback
(Open|Libre)PGP: Novità, controversie e sviluppi futuri

Key distribution/discovery: problemi

Voglio scrivere a alice@openpgp.example, dove trovo la chiave pubblica?

  • Keyserver tradizionali (PKS, SKS)
    • Problemi legali: GDPR
    • Problemi tecnici: Certificate flooding e altri abusi

Risultato: giugno 2021 sks-keyservers.net shutdown

(Open|Libre)PGP: Novità, controversie e sviluppi futuri

Key distribution/discovery: proposte

(Open|Libre)PGP: Novità, controversie e sviluppi futuri

Keystore a confronto

Property General Purpose Keyservers Domain-restricted Keyservers Non-Keyserver Keystores
Hockeypuck Hagrid Onak Mailvelope Proton WKD LDAP Keybase
Decentralisation Yes1 No Yes2 No No Yes3 No No
Generality Yes Yes Yes No No No No Yes
UID verification No Yes No Yes Yes Yes Yes No
Non-email UIDs Yes No Yes No No No Yes Yes
UID search Yes Yes Yes Yes Yes Yes Yes Yes(?)
Fingerprint search Yes Yes Yes Yes Yes No Yes No
Certifications Yes Limited Yes Yes Yes Yes Yes Yes
Self-sovereignty In progress Limited No Yes(?) Yes Yes Yes Yes
Key deletion Yes Yes Yes(?) Yes Yes Yes Yes Yes
HKP API Yes Yes Yes Limited Limited No No No

1By syncronization 2By forwarding 3By delegation

Fonte: Andrew Gallagher, The State of the Keyservers in 2024 (gennaio 2024)

(Open|Libre)PGP: Novità, controversie e sviluppi futuri

Keystore a confronto

autocrypt attachment embedded certificate subpacket URL header HKP over email HKPS WKD DANE Tor OHTTP+HKP
transport method inband inband inband inband inband out of band out of band out of band out of band
no leakage
constrained network
no SPOF ? ?
zero roundtrip ?
independent of domain operator
freshness
freshness for opt out ?
easy delegation ?
integrity in transit ✓ (if DKIM) ✓ (if DKIM) ✓ (if DKIM) ✓ (if DNSSEC)
minimal work for user

Fonte: Minutes of the 8th OpenPGP Email Summit (giugno 2024)

(Open|Libre)PGP: Novità, controversie e sviluppi futuri

Link utili

(Open|Libre)PGP: Novità, controversie e sviluppi futuri

Link utili

(Open|Libre)PGP: Novità, controversie e sviluppi futuri

Domande?

(Open|Libre)PGP: Novità, controversie e sviluppi futuri

Grazie per l'attenzione!

  • roughconsensusandrunningcode@tracciabi.li
  • V4: 478F A2A0 1D61 3A7F 4835 AD6E 8FA2 40F6 E90C 6E2B
  • V6: 863A 6232 87C2 273D 895A 2B4D DD0C C7A1 B99C 24B1 1169 FF72 D483 A4AE C58A 9144 Experimental, test only
  • @roughconsensusandrunningcode@mastodon.cisti.org
  • @roughconsensusandrunningcode
(Open|Libre)PGP: Novità, controversie e sviluppi futuri