18. Dependencies

Pepsi is built from its own crates and from several hundred packages written by others. Every one of them runs with the privilege of the programs that link it (A compromised dependency), so each is a decision. This chapter records those decisions. It says why each direct dependency is there, what it brings with it, how much of it someone has audited, and how much machine code it adds to the release.

The tables are generated from data kept in the source tree (docs/dependencies/): measure.py measures every package in Cargo.lock, clusters.toml classifies them and gives the reason for each direct dependency, and make dependency-index writes the tables. A test fails when Cargo.lock names a package that the data does not, so a dependency change cannot bypass this chapter.

18.1. How the figures are made

The sets. Every package in Cargo.lock belongs to exactly one set, the narrowest that contains it:

  • linked: compiled into the release binaries that make build produces (on Linux, with the default Nettle backend);

  • build: runs only while building them, as a build script or procedural macro, or as a dependency of one;

  • tests: built only for the test suite;

  • optional: built only with a non-default feature (the OpenSSL backend, LDAP key discovery);

  • other OS: built only for a platform other than Linux;

  • lock only: recorded in Cargo.lock but never compiled. Cargo records an optional dependency as soon as an enabled feature names it in a weak form, even when nothing enables it (deny.toml lists which feature names which).

Audited. A package counts as audited when cargo vet finds a full audit of its version: one of the project’s own, or one from the imported public sets (The supply chain). Everything else counts as unaudited. That includes an exempted version, a version only partially covered (an audited delta from an exempted base), and the vendored copies of mail-auth, hickory-net and the taler-rust crates, which are reviewed in the tree but carry no cargo vet audit. A figure a/u gives audited/unaudited packages.

Pulls in. For a direct dependency, the packages reachable from it in the release build, the dependency itself included and build-time packages included. These sets overlap: tokio is in the set of every dependency that runs on it.

Only via it. The packages that would leave the release build if this one direct dependency went, because nothing else reaches them. Most transitive packages are reached through several direct dependencies, so this figure is much smaller than pulls in, and often empty. The last row of each table, all of the above, removes all the cluster’s direct dependencies at once.

Machine code. The release binaries are built with line tables and symbols kept (the code is that of make build). Every function symbol is attributed to the package whose source file holds the function, and its size counts for that package. A package’s figure is the largest it reaches in any one binary, so code linked into several binaries counts once. Own KiB is the direct dependency itself; Removable KiB is everything in only via it. The figure measures code and nothing else. Data does not count: the language models, the Unicode tables and the compiled-in certificate roots are not machine code, and neither are comments or tests. Three caveats:

  • The release is optimised with link-time optimisation across all crates. Library code inlined into Pepsi’s functions counts for Pepsi, so a dependency’s figure is a lower bound of the code it causes. Generic code counts for the crate that defines it, wherever it is instantiated. A dash means that no function of the package survives as its own.

  • C and assembly linked statically count for the crate that builds them: AWS-LC for aws-lc-sys. Libraries linked dynamically from the system (Nettle, GMP, Kerberos, the C library) do not count. Their code is the distribution’s.

  • Build-time packages have no figure: their code runs on the build host and is not shipped.

Bundles. Each cluster’s second table lists every package in the cluster. A bundle printed as one row is a stack Pepsi takes as a whole: a protocol implementation and the crates it is built from, a family published together, or one detector’s language models. Leaving out one member is not a choice Pepsi has. Packages where a choice exists are listed one per row.

18.2. Overview

Cluster

Direct

Packages

Linked

Only via it

KiB

Async runtime and concurrency

3

7/48

7/40

—

489

TLS and certificate verification

5

2/10

2/8

—

409

AWS-LC, the cryptographic library

1

0/2

0/2

—

750

HTTP

8

3/9

3/9

3/5

469

DNS, IDNA and network addresses

3

3/30

3/25

—

540

PostgreSQL

3

0/17

0/11

—

426

GNU Taler

1

2/10

1/5

2/12

55

Mail formats and protocols

3

5/16

3/11

6/22

434

OpenPGP

1

5/32

0/11

6/29

590

ASN.1, X.509 and CMS

7

3/21

3/8

3/7

404

Cryptographic primitives

17

14/39

14/37

4/15

170

Text, Unicode and language detection

5

8/91

7/87

3/86

453

Data formats, encodings and compression

8

4/23

4/20

0/6

387

Web console

1

0/4

0/1

0/4

6

Command line, logging and errors

6

8/24

5/18

2/1

356

Time and dates

1

3/11

2/6

—

170

Operating system

5

2/11

1/11

0/5

8

Data structures and small utilities

—

5/9

4/7

—

41

Build-time tooling

—

11/18

0/1

—

9

Other platforms and lock-file entries

—

6/52

0/0

—

—

all clusters

78

91/477

59/318

—

6,165

Machine code by origin

Origin

Packages linked

KiB

Pepsi’s own crates

74

11,191

Vendored and patched crates (mail-auth, hickory-net, taler-rust)

4

451

crates.io packages

374

5,714

Rust standard library

—

2,536

Not attributable (compiler-generated)

—

38

total

—

19,929

Machine code per release binary

Binary

KiB

pepsi

15,983

pepsi-config

3,038

pepsi-helper-auto-pay

308

pepsi-helper-dot-forward

323

pepsi-helper-mailbox-scan

2,373

pepsi-helper-maildir-writer

273

pepsi-keys

6,246

pepsi-quota

2,635

pepsi-setup

8,327

pepsi-stage-auto-pay

2,937

pepsi-stage-decrypt

5,295

pepsi-stage-detect-language

3,505

pepsi-stage-dot-forward

2,914

pepsi-stage-encrypt

5,407

pepsi-stage-relay-to-maildir

2,938

pepsi-stage-relay-to-smarthost

4,463

pepsi-telemetry

2,719

pepsi-whitelist

2,693

The twenty largest third-party packages

Package

Bundle

KiB

aws-lc-sys 0.46.0

aws-lc-rs and AWS-LC (C and assembly)

734

sequoia-openpgp 2.4.2

Sequoia and Nettle

472

rustls 0.23.46

rustls

326

der 0.7.10

RustCrypto formats

321

tokio 1.54.1

tokio

260

h2 0.4.20

hyper, h2 and the HTTP types

242

sqlx-core 0.9.0

sqlx

237

hickory-net 0.26.3

hickory

206

mail-auth 0.13.3

mail-auth (vendored)

196

sqlx-postgres 0.9.0

sqlx

185

futures-util 0.3.34

futures

163

regex-automata 0.4.18

Regular expressions

161

hickory-proto 0.26.3

hickory

160

hyper 1.12.0

hyper, h2 and the HTTP types

149

clap_builder 4.6.7

clap

147

jiff 0.2.38

jiff

143

serde_json 1.0.154

serde and JSON

137

aho-corasick 1.1.5

Regular expressions

108

hickory-resolver 0.26.3

hickory

102

mail-parser 0.11.9

mail-parser

89

Three observations follow from the tables:

  • Pepsi’s own code is the largest part of the binaries. Third-party packages contribute about a third of the machine code, and the largest of them are the ones that do the heaviest work: AWS-LC (TLS and every public-key operation), Sequoia (OpenPGP), rustls, the ASN.1 codec, HTTP/2, tokio and the PostgreSQL driver.

  • Package counts and code size are different measures. lingua and its 75 language models are the largest group of packages but add little code; the size of pepsi-stage-detect-language is model data. AWS-LC, by contrast, is two packages and the most machine code of any dependency.

  • Few direct dependencies can be removed alone. taler-common (through its database layer) and mail-auth (through its DNS resolver) each reach the async runtime, the PostgreSQL driver, the DNS and TLS stacks and the HTTP types. Dropping one of Pepsi’s own uses of those crates therefore removes nothing. The large only via it sets belong to lingua, Sequoia, async-imap and taler-common’s own extras.

18.3. The audit landscape

cargo vet audits are supply-chain reviews. An auditor of an imported set read the crate’s code, or the diff from an audited version, and certifies that it is fit to deploy: it does not do what it should not. They are not security assessments, and they do not look for subtle bugs. Most of the audited packages are small and widely used (the futures and serde families, Unicode helpers, the RustCrypto traits); most of the large protocol implementations are exempted.

A handful of packages have had a published security audit or formal verification. None of them covers the version Pepsi builds exactly:

Packages

Assessment

Relation to the version Pepsi builds

rustls, rustls-webpki

Cure53 for the CNCF, 2020: four findings, all informational or low

rustls 0.16 and the webpki of that time; Pepsi builds rustls 0.23 and the rustls-webpki fork

aes-gcm

NCC Group for MobileCoin, 2020: no significant findings

the RustCrypto AEADs before 0.10; focused on timing side channels

hickory-proto, hickory-resolver

X41 D-Sec for OSTIF, 2024: two medium and two low findings, fixed

two minor versions before the one Pepsi builds

AWS-LC

formal verification of functional correctness (SAW, Coq, HOL Light, Fiat-Crypto)

a subset of algorithms, key sizes and processors; RSA, the X.509 parsing and the Rust layer are outside it. Pepsi builds the non-FIPS aws-lc-sys, so the FIPS 140-3 validation does not apply

libbz2-rs-sys

Radically Open Security for NLnet, 2025: one logic bug, fixed

a version before the one Pepsi builds

OpenSSL (optional backend)

Trail of Bits for OSTIF, 2023: four medium, six low findings

the C library, not the Rust bindings; only in a build with crypto-openssl

No published audit was found for Sequoia, Nettle, tokio, hyper, h2, sqlx, mail-parser, mail-auth, regex, the RustCrypto formats (der, x509-cert, cms) or the compression crates.

The residual risk is stated in A compromised dependency. An exemption is an honest “unread”, and the exempted packages include parsers of hostile input (mail-parser, the DNS and HTTP stacks, the ASN.1 codec). An exemption names a version, so an update is still a recorded decision; the code that is in the lock file now is trusted as downloaded.

18.4. The clusters

18.4.1. Async runtime and concurrency

Every server, stage worker and network client of Pepsi runs on tokio, and so do the libraries it builds on: sqlx, hyper, hickory and taler-common’s database layer. There is no choice of runtime, and none of these packages can leave while any of those libraries stays. futures-util provides the stream combinators with which the IMAP and key-discovery code consume responses; the futures facade, which only re-exports it, is not a direct dependency.

Direct dependency

Used for

Pulls in

Only via it

Own KiB

Removable KiB

bytes 1.12.1

the reference-counted buffers hyper’s request and response bodies use

0/1

—

13

—

futures-util 0.3.34

stream combinators (IMAP fetches), join_all, catch_unwind

2/11

—

163

—

tokio 1.54.1

the async runtime every server, stage and client runs on

2/11

—

260

—

all of the above

—

3/18

—

436

—

Package or bundle

Set

Audited

KiB

Content

tokio (8)

7 linked, 1 build

0/8

277

bytes, mio, signal-hook-registry, socket2, tokio, tokio-macros, tokio-stream, tokio-util

futures (15)

10 linked, 3 build, 2 optional

1/14

170

async-trait, futures, futures-channel, futures-core, futures-executor, futures-intrusive, futures-io, futures-macro, futures-sink, futures-task, futures-util, pin-project, pin-project-internal, pin-project-lite, pin-utils

Channels, locks and lock-free structures (32)

30 linked, 1 other OS, 1 lock only

6/26

42

async-channel (1.9.0, 2.5.0), atomic-waker, concurrent-queue, critical-section, crossbeam-channel, crossbeam-deque, crossbeam-epoch, crossbeam-queue, crossbeam-utils, dashmap, event-listener (2.5.3, 5.4.2), event-listener-strategy, flume, lock_api, parking, parking_lot, parking_lot_core, portable-atomic, portable-atomic-util, rayon, rayon-core, scopeguard, sharded-slab, slab, spin, stop-token, tagptr, thread_local, try-lock, want

18.4.2. TLS and certificate verification

All TLS in Pepsi is rustls, a memory-safe implementation, on the AWS-LC cryptographic provider: SMTP in both directions, HTTPS, LMTP, milter, DNS over TLS and HTTPS, and PostgreSQL. No program links OpenSSL for TLS. Every TLS client trusts the system root store (rustls-native-certs, which honours SSL_CERT_FILE and SSL_CERT_DIR). rustls-webpki is also used directly, to validate client certificates against a configured CA on the submission listeners. rustls-platform-verifier comes with hickory’s HTTPS transport, and webpki-roots is compiled into sqlx but unused, because Pepsi turns on the system store there too.

Direct dependency

Used for

Pulls in

Only via it

Own KiB

Removable KiB

rustls 0.23.46

TLS for SMTP (both directions), HTTPS, LMTP, milter and PostgreSQL

7/15

—

326

—

rustls-native-certs 0.8.5

the system root store for every TLS client

1/3

—

8

—

rustls-pki-types 1.15.1

certificate, key and server-name types shared by the TLS crates

1/1

—

11

—

rustls-webpki 0.103.16

chain validation of client certificates against a configured CA

6/10

—

49

—

tokio-rustls 0.26.6

rustls on tokio sockets

9/26

—

15

—

all of the above

—

9/28

—

408

—

Package or bundle

Set

Audited

KiB

Content

rustls (12)

10 linked, 2 other OS

2/10

409

openssl-probe, rustls, rustls-native-certs, rustls-pki-types, rustls-platform-verifier, rustls-platform-verifier-android, rustls-webpki, tokio-rustls, untrusted (0.7.1, 0.9.0), webpki-root-certs, webpki-roots

18.4.3. AWS-LC

AWS-LC is the one C cryptographic library in the release build, and the largest single contributor of third-party machine code. It is rustls’s provider, and Pepsi uses it directly for every public-key operation: RSA, ECDSA and ECDH on P-256 and P-384, and Ed25519 (DKIM and ARC signing, S/MIME, WebAuthn), as well as SHA-1 and HMAC-SHA-1 where a protocol still needs them (TOTP, OCSP, WKD hashes, SCRAM-SHA-1). Keeping these on one library means one implementation to trust, with constant-time code and formal verification for part of it, instead of one per protocol. Building it needs CMake and a C compiler (Build-time tooling).

Direct dependency

Used for

Pulls in

Only via it

Own KiB

Removable KiB

aws-lc-rs 1.18.2

TLS provider; RSA, ECDSA, Ed25519, ECDH, SHA-1 and HMAC for DKIM, ARC, S/MIME, WebAuthn and TOTP

5/8

—

16

—

all of the above

—

5/8

—

16

—

Package or bundle

Set

Audited

KiB

Content

aws-lc-rs and AWS-LC (C and assembly) (2)

2 linked

0/2

750

aws-lc-rs, aws-lc-sys

18.4.4. HTTP

pepsi-httpd and pepsi-telemetry use hyper only to parse HTTP/1.1 requests and write responses. The router, the TLS layer and the socket handling are Pepsi’s own. Every HTTP request Pepsi makes goes through hyper’s HTTP/1.1 client, in pepsi_common::http_client: one connection per request over Pepsi’s rustls configuration, a deadline over the whole request, a size cap enforced while the body arrives, and a redirect policy chosen by each caller. The callers are the MTA-STS policy fetch, the Taler merchant backend, OAuth token refresh, telemetry, mailing-list templates, the Mailman importer, the pepsi-setup probes, and key discovery, which vets and dials the addresses itself and hands hyper the connection. Pepsi’s own DNS client exists because hickory’s resolver never asks for the DNSSEC AD bit and does not report it for negative answers; its DNS-over-HTTPS queries go through hickory’s DoH client, which brings in h2. Pepsi uses h2 and http directly only for a test server. hyper, hyper-util and http-body-util come only with Pepsi’s own HTTP code; http comes with hickory too, and url with sqlx, taler-common and hickory.

Direct dependency

Used for

Pulls in

Only via it

Own KiB

Removable KiB

form_urlencoded 1.2.2

query strings and form posts of the web tier

2/0

—

1

—

h2 0.4.20

HTTP/2 for the DNS tests’ DNS-over-HTTPS server (the client is hickory’s)

7/26

—

242

—

http 1.5.0

request, response and header types of the DNS tests’ DNS-over-HTTPS server

0/3

—

44

—

http-body-util 0.1.5

request and response bodies of the server and the client

1/6

0/1

1

1

hyper 1.12.0

HTTP/1.1: the server side of pepsi-httpd and pepsi-telemetry, and every HTTP request Pepsi makes

7/20

—

149

—

hyper-util 0.1.21

hyper on tokio I/O

7/21

0/1

1

1

percent-encoding 2.3.2

URI components: otpauth labels, WKD/VKS URLs, RFC 2231 parameters

1/0

—

1

—

url 2.5.8

URLs of HTTP requests: redirect targets, credentials in a URL

5/30

—

25

—

all of the above

—

11/45

3/5

178

155

Package or bundle

Set

Audited

KiB

Content

hyper, h2 and the HTTP types (8)

8 linked

1/7

442

h2, http, http-body, http-body-util, httparse, httpdate, hyper, hyper-util

URLs (4)

4 linked

2/2

27

form_urlencoded, percent-encoding, serde_urlencoded, url

18.4.5. DNS, IDNA and network addresses

hickory answers every DNS query: MX, TLSA, the TXT records of SPF, DKIM, DMARC and MTA-STS, and the RFC 2136 updates that publish records such as rotated DKIM keys. hickory-net is vendored with four fixes. A UDP reply that does not decode is skipped instead of failing the lookup. The DNS-over-HTTPS client compares media types without regard to case or parameters, and writes the resolver’s port into a request when it is not 443 (both as RFC 9110 asks) and an IPv6 address in brackets (as RFC 3986 asks). Hickory’s own DNSSEC validation is not enabled. Pepsi trusts the AD bit of a validating resolver it reaches over loopback or an authenticated channel. The __dnssec feature stays on for TSIG-signed updates, because an own TSIG implementation would be cryptography written for one purpose.

idna uses idna_adapter on its default ICU4X stream. Pinning the adapter to the older unicode-rs stream would remove about twenty packages, but ICU4X follows new Unicode versions sooner, and IDNA conversion should accept the domains the current Unicode version allows.

Direct dependency

Used for

Pulls in

Only via it

Own KiB

Removable KiB

hickory-resolver 0.26.3

every DNS lookup: MX, TLSA, TXT (SPF, DKIM, DMARC, MTA-STS), DNSSEC AD bit, TSIG updates

27/102

—

102

—

idna 1.1.0

U-labels to A-labels (UTS 46) before a domain reaches DNS or a certificate

3/29

—

15

—

ipnet 2.12.2

CIDR matching for MYNETWORKS and the IP blocklists

1/7

—

3

—

all of the above

—

27/102

—

121

—

Package or bundle

Set

Audited

KiB

Content

hickory (9)

8 linked, 1 other OS

1/8

515

hickory-net, hickory-proto, hickory-resolver, ipconfig, linked-hash-map, lru-cache, moka, prefix-trie, resolv-conf

IDNA and ICU4X (23)

19 linked, 4 build

2/21

22

displaydoc, icu_collections, icu_locale_core, icu_normalizer, icu_normalizer_data, icu_properties, icu_properties_data, icu_provider, idna, idna_adapter, litemap, potential_utf, stable_deref_trait, tinystr, utf8_iter, writeable, yoke, yoke-derive, zerofrom, zerofrom-derive, zerotrie, zerovec, zerovec-derive

ipnet 2.12.2

linked

exempted

3

Provides types and useful methods for working with IPv4 and IPv6 network addresses, …

18.4.6. PostgreSQL

sqlx is the driver and connection pool of every program with a database, and taler-common’s configuration and schema code is built on it. Only the PostgreSQL driver is compiled. The MySQL and SQLite drivers are lock-only entries, recorded because sqlx’s json and uuid features name them. sqlx-core is a direct dependency only for the feature that makes PostgreSQL over TLS trust the system root store. uuid is there because the mailing-list model keys users and members by UUID, as GNU Mailman’s REST API expects.

Direct dependency

Used for

Pulls in

Only via it

Own KiB

Removable KiB

sqlx 0.9.0

the PostgreSQL driver and pool of every program with a database

34/120

—

—

—

sqlx-core 0.9.0

only for its feature that makes PostgreSQL TLS trust the system root store

24/97

—

237

—

uuid 1.29.0

list members and users are keyed by UUID, as GNU Mailman’s REST API expects

1/5

—

4

—

all of the above

—

34/120

—

240

—

Package or bundle

Set

Audited

KiB

Content

sqlx (17)

11 linked, 2 build, 1 other OS, 3 lock only

0/17

426

atoi, crc, crc-catalog, dotenvy, etcetera, hashlink, hkdf, libsqlite3-sys, sqlx, sqlx-core, sqlx-macros, sqlx-macros-core, sqlx-mysql, sqlx-postgres, sqlx-sqlite, uuid, whoami

18.4.7. GNU Taler

taler-common, from the taler-rust submodule, gives Pepsi the configuration file format, the command-line conventions, the logging set-up and the database helpers of GNU Taler, so the two projects are configured and operated the same way. It brings the serde_with and compact_str families its configuration types use.

Direct dependency

Used for

Pulls in

Only via it

Own KiB

Removable KiB

taler-common 1.5.0

configuration files, command line, logging and database setup shared with GNU Taler

41/161

2/12

49

55

all of the above

—

41/161

2/12

49

55

Package or bundle

Set

Audited

KiB

Content

taler-common and what only it uses (12)

6 linked, 6 build

2/10

55

castaway, compact_str, darling, darling_core, darling_macro, ident_case, serde_path_to_error, serde_with, serde_with_macros, static_assertions, taler-common, taler-macros

18.4.8. Mail formats and protocols

mail-auth verifies and produces DKIM signatures and ARC sets and evaluates SPF and DMARC. It is vendored with one added constructor (vendor/PEPSI-VENDORING.md). Its unconditional dependency on similar stays: gating it would be one more local change to the vendored copy for a single package. mail-parser decodes untrusted MIME (charsets, transfer encodings, HTML to text) wherever Pepsi needs a message’s content rather than its structure. async-imap is the IMAP client of pepsi-whitelist import --imap. An own IMAP client would parse untrusted server responses, which Pepsi does not write for itself when a maintained parser exists.

Direct dependency

Used for

Pulls in

Only via it

Own KiB

Removable KiB

async-imap 0.12.0

IMAP client of pepsi-whitelist import –imap

7/39

2/14

12

91

mail-auth 0.13.3

DKIM, ARC, SPF and DMARC verification and signing; DMARC aggregate reports

32/120

0/6

196

227

mail-parser 0.11.9

MIME parsing of untrusted messages: decoded text, charsets, attachments

6/11

—

89

—

all of the above

—

35/136

6/22

297

437

Package or bundle

Set

Audited

KiB

Content

mail-auth (vendored) (6)

6 linked

0/6

227

gethostname, mail-auth, mail-builder, similar, typed-path, zip

mail-parser (6)

4 linked, 2 build

4/2

118

core_detect, encoding_rs, hashify, mail-parser, multiversion_no_op, simdutf8

async-imap (9)

4 linked, 2 build, 3 lock only

1/8

88

async-compression, async-imap, compression-codecs, compression-core, imap-proto, minimal-lexical, nom (7.1.3, 8.0.0), self_cell

18.4.9. OpenPGP

Sequoia implements OpenPGP. Its cryptography comes from a backend chosen at build time: Nettle (the default, a system library linked dynamically) or OpenSSL (crypto-openssl, the only backend that decrypts ML-KEM keys, and only with OpenSSL 3.5 or later). Its compression feature is mandatory in practice, because gpg compresses by default, with ZIP, ZLIB or BZip2 at the sender’s choice. Most of this cluster’s packages are build-time only: the LALRPOP parser generator for Sequoia’s grammar, and bindgen for the Nettle bindings.

Direct dependency

Used for

Pulls in

Only via it

Own KiB

Removable KiB

sequoia-openpgp 2.4.2

OpenPGP keys, encryption, decryption, signatures (RFC 9580)

22/118

6/29

472

590

all of the above

—

22/118

6/29

472

590

Package or bundle

Set

Audited

KiB

Content

Sequoia and Nettle (37)

11 linked, 19 build, 7 optional

5/32

590

annotate-snippets, ascii-canvas, bit-set, bit-vec, buffered-reader, bzip2, ctor, dyn-clone, ena, fixedbitset, keccak, lalrpop, lalrpop-util, libbz2-rs-sys, link-section, linktime-proc-macro, memsec, nettle, nettle-sys, new_debug_unreachable, openssl-sys, ossl, petgraph, phf_shared, precomputed-hash, same-file, sequoia-openpgp, sha1collisiondetection, sha3, siphasher, sponge-cursor, string_cache, term, unicode-xid, vcpkg, walkdir, xxhash-rust

18.4.10. ASN.1, X.509 and CMS

The RustCrypto format crates decode and encode certificates, CRLs, OCSP responses, PKCS#8 keys and the CMS structures of S/MIME. cms supplies only type definitions. Pepsi builds and opens CMS messages itself, because AuthEnvelopedData, its default for encryption, is not among the crate’s types. ldap3 and its X.509 parser are built only with the optional LDAP key discovery.

Direct dependency

Used for

Pulls in

Only via it

Own KiB

Removable KiB

cms 0.2.3

the RFC 5652 types of S/MIME messages

8/20

0/1

42

42

der 0.7.10

DER encoding and decoding: OCSP responses, CMS structures written by Pepsi

4/7

—

321

—

ldap3 0.12.1

LDAP key discovery; only with pepsi-keydisc’s optional ldap feature

23/107

1/12

—

—

pkcs8 0.10.2

private keys stored and exchanged as PKCS#8

4/9

0/1

1

1

signature 2.2.0

the signer traits the certificate builders are generic over

2/3

—

—

—

spki 0.7.3

public-key info of certificates (pins, key checks)

4/8

—

5

—

x509-cert 0.2.5

certificates and CRLs: S/MIME, client certificates, OCSP, CT, DANE, setup’s TLS checks

8/19

—

24

—

all of the above

—

8/21

3/7

393

396

Package or bundle

Set

Audited

KiB

Content

RustCrypto formats (14)

11 linked, 1 build, 2 lock only

3/11

404

base64ct, cms, const-oid (0.10.2, 0.9.6), der, der_derive, flagset, pem-rfc7468, pkcs8, signature, spki, tls_codec, tls_codec_derive, x509-cert

ldap3 and x509-parser (optional LDAP key discovery) (10)

10 optional

0/10

—

asn1-rs, asn1-rs-derive, asn1-rs-impl, der-parser, lber, ldap3, num-bigint, oid-registry, rusticata-macros, x509-parser

18.4.11. Cryptographic primitives

The RustCrypto primitives cover what AWS-LC does not do for Pepsi. That is the symmetric side of S/MIME (AES-CBC, AES key wrap, AES-GCM, and 3DES to decrypt legacy messages), the at-rest wrapping of private keys, the HMACs of SRS, VERP and secure-link, the SASL mechanisms towards a smarthost (CRAM-MD5, SCRAM, and the MD4-based NT hash of NTLM) and Argon2 password hashing. Every RSA operation is AWS-LC’s; the num-bigint-dig big integers run the weak-modulus and batch-GCD screens and one check of WebAuthn’s Ed25519 keys, all on public values. Two generations of the hash and MAC traits are present. The format crates and the RustCrypto ciphers pin the older one, and the newer one serves Pepsi’s own HMAC and SASL code, so both stay until those crates move.

Direct dependency

Used for

Pulls in

Only via it

Own KiB

Removable KiB

aes 0.8.4

AES block cipher for S/MIME (CBC, key wrap)

3/10

—

29

—

aes-gcm 0.10.3

AES-256-GCM: wrapped private keys, configuration archives, secure-link, S/MIME AuthEnvelopedData

6/15

2/5

3

6

aes-kw 0.2.1

AES key wrap (RFC 3394) for S/MIME key agreement

3/11

0/1

0

0

argon2 0.5.3

password hashing (console accounts, moderator passwords) and archive keys

4/13

—

12

—

cbc 0.1.2

AES-CBC for S/MIME EnvelopedData

3/9

0/1

—

—

cipher 0.4.4

the block-cipher traits of aes, cbc and des

3/8

—

5

—

des 0.8.1

3DES, to decrypt legacy S/MIME under CRYPTO_ALLOW_DOWNGRADE

3/9

0/1

2

2

hmac 0.13.0

HMAC-SHA-256: SRS, VERP, secure-link tokens, SCRAM, CRAM-MD5

0/9

—

0

—

md-5 0.11.0

CRAM-MD5 towards a smarthost; legacy S/MIME verification

0/10

—

3

—

md4 0.11.0

the NT hash of NTLM authentication towards a smarthost

0/9

0/1

1

1

num-bigint-dig 0.8.6

big-integer arithmetic of the weak-RSA and batch-GCD screens and of WebAuthn’s Ed25519 point check

2/14

0/3

23

23

num-integer 0.1.47

gcd for the batch-GCD screen

1/2

—

0

—

rand 0.10.3

random choices (MX order, boundaries, tokens)

4/3

—

2

—

rand_core 0.6.4

OsRng, the system CSPRNG for keys, nonces and salts

1/3

—

1

—

sha1 0.10.7

SHA-1 with an OID, verifying legacy S/MIME signatures

3/10

—

4

—

sha2 0.10.9, 0.11.1

SHA-256/384/512: hashes, HMACs, key fingerprints, schema checksums

5/17

—

49

—

subtle 2.6.1

constant-time comparison of MACs, tokens and secrets

1/0

—

0

—

all of the above

—

15/50

4/15

135

66

Package or bundle

Set

Audited

KiB

Content

RustCrypto primitives (41)

39 linked, 2 lock only

9/32

140

aead, aes, aes-gcm, aes-kw, argon2, blake2, block-buffer (0.10.4, 0.12.1), block-padding, cbc, cipher, cmov, cpufeatures (0.2.17, 0.3.1), crypto-common (0.1.7, 0.2.2), ctr, ctutils, des, digest (0.10.7, 0.11.3), generic-array (0.14.7, 1.4.5), ghash, hmac, hybrid-array, inout, md-5, md4, opaque-debug, password-hash, polyval, sha1 (0.10.7, 0.11.0), sha2 (0.10.9, 0.11.1), subtle, typenum, universal-hash, zeroize, zeroize_derive

Big integers (5)

5 linked

1/4

23

libm, num-bigint-dig, num-integer, num-iter, num-traits

Randomness (7)

7 linked

4/3

7

chacha20, fastrand, getrandom (0.2.17, 0.4.3), rand, rand_core (0.10.1, 0.6.4)

18.4.12. Text, Unicode and language detection

lingua detects the language of a message for pepsi-stage-detect-language. All 75 language models are compiled in, because LANGUAGES may name any of them and language detection is not a sensitive exposure. They make it the cluster with the most packages and a large binary, but little code. regex matches the patterns of the mailing-list rules against message content. It never backtracks, so a pattern that a list owner pasted in cannot become a denial of service. The rest of the tree matches its patterns in PostgreSQL or with globs.

Direct dependency

Used for

Pulls in

Only via it

Own KiB

Removable KiB

lingua 1.8.0

language detection for pepsi-stage-detect-language

6/112

3/86

46

73

regex 1.13.1

the mailing-list rules (linear-time matching of owner-written patterns)

0/5

—

18

—

stringprep 0.1.5

SASLprep (RFC 4013) for SCRAM passwords

3/2

—

3

—

strsim 0.11.1

edit distance: look-alike subject keywords, option-name suggestions

1/0

—

1

—

unicode-normalization 0.1.26

NFKD skeletons of look-alike subject tags; address normalisation

2/0

—

4

—

all of the above

—

10/114

3/86

73

73

Package or bundle

Set

Audited

KiB

Content

lingua and its 75 language models (85)

81 linked, 4 build

2/83

50

lingua, the n-gram language models of 75 languages (lingua-*-language-model, one crate each) and the crates only lingua uses

Regular expressions (6)

5 linked, 1 lock only

0/6

386

aho-corasick, bstr, memchr, regex, regex-automata, regex-syntax

stringprep 0.1.5

linked

exempted

3

An implementation of the stringprep algorithm

strsim 0.11.1

linked

audited

1

Implementations of string similarity metrics. Includes Hamming, Levenshtein, OSA, …

tinyvec 1.13.3

linked

audited

2

`tinyvec` provides 100% safe vec-like data structures.

unicode-bidi 0.3.18

linked

audited

0

Implementation of the Unicode Bidirectional Algorithm

unicode-normalization 0.1.26

linked

audited

4

This crate provides functions for normalization of Unicode strings, including …

unicode-properties 0.1.4

linked

exempted

—

Query character Unicode properties according to UAX #44 and UTR #51.

unicode-segmentation 1.13.3

linked

audited

6

This crate provides Grapheme Cluster, Word and Sentence boundaries according to …

unicode-width 0.2.2

linked

audited

0

Determine displayed width of `char` and `str` types according to Unicode Standard …

18.4.13. Data formats, encodings and compression

serde and serde_json carry the per-message JSON state, the admin API and the telemetry reports. data-encoding is Pepsi’s one crate for base64, base32 and hex. The two base64 versions come with sqlx, Sequoia, async-imap and taler-common. Compression is pure Rust: miniz_oxide behind flate2, shared with Sequoia and mail-auth. The toml reader serves only pepsi-setup’s importer for Stalwart configurations, and lzma-rs only unpacks the compromised-keys list.

Direct dependency

Used for

Pulls in

Only via it

Own KiB

Removable KiB

data-encoding 2.11.1

base64, base32 and hex everywhere

0/1

—

58

—

flate2 1.1.10

gzip for TLS reports, zlib for the QR-code PNGs

1/5

—

14

—

lzma-rs 0.3.0

unpacks the xz-compressed badkeys list

1/3

0/1

27

27

qrcode 0.14.1

QR codes for TOTP enrolment and payment requests

0/1

0/1

6

6

quick-xml 0.42.0

XML escaping in the mail-client autoconfig documents

0/2

—

16

—

serde 1.0.229

(de)serialisation of JSON state, API bodies and configuration

1/6

—

7

—

serde_json 1.0.154

JSON: workqueue state, admin API, telemetry, CLI –json output

0/5

—

137

—

toml 1.1.8+spec-1.1.0

reads Stalwart’s configuration in pepsi-setup’s importer

0/7

0/4

33

59

all of the above

—

3/26

0/6

298

92

Package or bundle

Set

Audited

KiB

Content

serde and JSON (8)

7 linked, 1 build

0/8

166

itoa, ryu, serde, serde_core, serde_derive, serde_json, serde_spanned, zmij

TOML (5)

4 linked, 1 lock only

0/5

59

toml, toml_datetime, toml_parser, toml_writer, winnow

adler2 2.0.1

linked

audited

—

A simple clean-room implementation of the Adler-32 checksum

base64 0.22.1

linked

audited

8

encodes and decodes base64 as bytes or utf8

base64 0.23.1

linked

exempted

7

encodes and decodes base64 as bytes or utf8

byteorder 1.5.0

linked

audited

1

Library for reading/writing numbers in big-endian and little-endian.

crc32fast 1.5.3

linked

exempted

5

Fast, SIMD-accelerated CRC32 (IEEE) checksum computation

data-encoding 2.11.1

linked

exempted

58

Efficient and customizable data-encoding functions like base64, base32, and hex

flate2 1.1.10

linked

exempted

14

DEFLATE compression and decompression exposed as Read/BufRead/Write streams. Supports …

hex 0.4.3

linked

audited

1

Encoding and decoding data into/from hexadecimal representation.

lzma-rs 0.3.0

linked

exempted

27

A codec for LZMA, LZMA2 and XZ written in pure Rust

miniz_oxide 0.9.1

linked

exempted

19

DEFLATE compression and decompression library rewritten in Rust based on miniz

qrcode 0.14.1

linked

exempted

6

QR code encoder in Rust

quick-xml 0.42.0

linked

exempted

16

High performance xml reader and writer

simd-adler32 0.3.10

linked

exempted

1

A SIMD-accelerated Adler-32 hash algorithm implementation.

zlib-rs 0.6.8

lock only

exempted

—

A memory-safe zlib implementation written in rust

18.4.14. Web console

The console’s pages are askama templates, compiled into the binary and type-checked against the structures they render, and escaped by default. Mail bodies use Pepsi’s own Mustache implementation instead, because operators edit them per language as installed files.

Direct dependency

Used for

Pulls in

Only via it

Own KiB

Removable KiB

askama 0.16.1

compiled, type-checked, auto-escaping HTML templates of the web console

1/11

0/4

6

6

all of the above

—

1/11

0/4

6

6

Package or bundle

Set

Audited

KiB

Content

askama (4)

1 linked, 3 build

0/4

6

askama, askama_derive, askama_macros, askama_parser

18.4.15. Command line, logging and errors

clap parses every program’s command line, and tracing with tracing-subscriber writes the logs, as text or JSON lines. Both are also taler-common’s. rustyline gives the pepsi-setup interview line editing on a terminal. anyhow and thiserror carry errors.

Direct dependency

Used for

Pulls in

Only via it

Own KiB

Removable KiB

anyhow 1.0.104

error propagation with context

0/1

—

72

—

clap 4.6.7

command-line parsing of every program

4/13

—

—

—

rustyline 19.0.0

line editing in the pepsi-setup interview

4/9

2/1

63

70

thiserror 2.0.21

typed library errors

1/5

—

—

—

tracing 0.1.44

structured logging

2/10

—

23

—

tracing-subscriber 0.3.23

log output (text or JSON lines) and filtering

5/21

—

30

—

all of the above

—

11/44

2/1

189

70

Package or bundle

Set

Audited

KiB

Content

clap (13)

10 linked, 2 build, 1 other OS

2/11

152

anstream, anstyle, anstyle-parse, anstyle-query, anstyle-wincon, clap, clap_builder, clap_derive, clap_lex, colorchoice, heck, is_terminal_polyfill, utf8parse

tracing (10)

8 linked, 1 build, 1 lock only

4/6

68

lazy_static, log, nu-ansi-term, tracing, tracing-attributes, tracing-core, tracing-log, tracing-serde, tracing-subscriber, valuable

rustyline (4)

2 linked, 2 other OS

0/4

63

clipboard-win, error-code, memoffset, rustyline

anyhow 1.0.104

linked

exempted

72

Flexible concrete Error type built on std::error::Error

thiserror 1.0.69

linked

audited

—

derive(Error)

thiserror 2.0.21

linked

exempted

—

derive(Error)

thiserror-impl 1.0.69

build

audited

—

Implementation detail of the `thiserror` crate

thiserror-impl 2.0.21

build

exempted

—

Implementation detail of the `thiserror` crate

18.4.16. Time and dates

jiff handles timestamps, time zones and calendar arithmetic. time, used by hickory and mail-auth, and chrono, used by async-imap, duplicate it. Pepsi cannot remove either while those libraries depend on it.

Direct dependency

Used for

Pulls in

Only via it

Own KiB

Removable KiB

jiff 0.2.38

timestamps, time zones and calendar arithmetic

0/3

—

143

—

all of the above

—

0/3

—

143

—

Package or bundle

Set

Audited

KiB

Content

jiff (5)

2 linked, 3 other OS

0/5

170

jiff, jiff-core, jiff-static, jiff-tzdb, jiff-tzdb-platform

time (hickory, mail-auth) and chrono (async-imap) (9)

6 linked, 1 optional, 2 other OS

3/6

—

chrono, deranged, iana-time-zone, iana-time-zone-haiku, num-conv, powerfmt, time, time-core, time-macros

18.4.17. Operating system

nix provides the system calls that the set-id helpers and servers need: privilege changes, user and group lookup, quotas, terminal modes, splice and fsync. listenfd takes the sockets systemd passes on socket activation, which ingress and httpd rely on. libgssapi binds the system’s Kerberos library for GSSAPI authentication towards a smarthost.

Direct dependency

Used for

Pulls in

Only via it

Own KiB

Removable KiB

libgssapi 0.11.0

Kerberos (GSSAPI) authentication towards a smarthost

5/28

0/1

1

1

libgssapi-sys 0.3.4

gss_acquire_cred_from, which libgssapi does not wrap

5/26

—

—

—

listenfd 1.0.2

sockets passed by systemd socket activation

0/2

0/1

0

0

nix 0.31.3

privilege changes, user lookup, quotas, terminal modes, splice and fsync

1/6

—

4

—

tempfile 3.27.0

scratch directories in Pepsi’s tests; linked into the release through taler-common

1/11

—

—

—

all of the above

—

6/32

0/5

6

1

Package or bundle

Set

Audited

KiB

Content

bitflags 1.3.2

lock only

audited

—

A macro to generate structures which behave like bitflags.

bitflags 2.13.2

linked

exempted

—

A macro to generate structures which behave like bitflags.

cfg-if 1.0.5

linked

exempted

—

A macro to ergonomically define an item depending on a large number of #[cfg] …

errno 0.3.14

linked

audited

—

Cross-platform interface to the `errno` variable.

libc 0.2.191

linked

exempted

—

Raw FFI bindings to platform libraries like libc.

libgssapi 0.11.0

linked

exempted

1

A safe binding to gssapi

libgssapi-sys 0.3.4

linked

exempted

—

A low level binding to gssapi

linux-raw-sys 0.12.1

linked

exempted

—

Generated bindings for Linux’s userspace API

listenfd 1.0.2

linked

exempted

0

A simple library to work with listenfds passed from the outside (systemd/catflap …

nix 0.31.3

linked

exempted

4

Rust friendly bindings to *nix APIs

once_cell 1.21.4

linked

exempted

2

Single assignment cells and lazy values.

rustix 1.1.5

linked

exempted

—

Safe Rust bindings to POSIX/Unix/Linux/Winsock-like syscalls

tempfile 3.27.0

linked

exempted

—

A library for managing temporary files and directories.

18.4.18. Data structures and small utilities

Hash tables, ordered maps and small vectors used throughout the graph. Pepsi names none of them directly. Several crates appear in more than one version because the libraries that use them require different ones.

Package or bundle

Set

Audited

KiB

Content

allocator-api2 0.2.21

linked

audited

—

Mirror of Rust’s allocator API

either 1.19.0

linked

exempted

—

The enum `Either` with variants `Left` and `Right` is a general purpose sum type with …

equivalent 1.0.3

linked

audited

—

Traits for key comparison in maps.

fnv 1.0.7

linked

audited

0

Fowler–Noll–Vo hash function

foldhash 0.1.5

build

audited

—

A fast, non-cryptographic, minimally DoS-resistant hashing algorithm.

foldhash 0.2.0

linked

audited

1

A fast, non-cryptographic, minimally DoS-resistant hashing algorithm.

hashbrown 0.14.5

linked

exempted

3

A Rust port of Google’s SwissTable hash map

hashbrown 0.15.5

build

partially audited

—

A Rust port of Google’s SwissTable hash map

hashbrown 0.16.1

linked

partially audited

12

A Rust port of Google’s SwissTable hash map

hashbrown 0.17.1

linked

partially audited

7

A Rust port of Google’s SwissTable hash map

indexmap 2.14.2

linked

exempted

5

A hash table with consistent order and fast iteration.

maplit 1.0.2

linked

exempted

—

Collection “literal” macros for HashMap, HashSet, BTreeMap, and BTreeSet.

rustc-hash 2.1.3

build

exempted

—

A speedy, non-cryptographic hashing algorithm used by rustc

smallvec 1.16.4

linked

exempted

13

‘Small vector’ optimization: store up to a small number of items on the stack

18.4.19. Build-time tooling

None of this is shipped, but all of it runs on the build host with the builder’s rights, so it is part of the supply chain. The procedural-macro toolchain (syn, quote, proc-macro2) runs inside the compiler for every derive. The C build tooling compiles AWS-LC (CMake and the cc crate) and generates the bindings to Nettle and Kerberos (bindgen with libclang).

Package or bundle

Set

Audited

KiB

Content

Procedural-macro toolchain (13)

10 build, 1 optional, 2 other OS

5/8

—

autocfg, cfg_aliases, proc-macro2, quote, rustc_version, rustversion, semver, syn (2.0.119, 3.0.9), synstructure (0.13.2, 0.14.0), unicode-ident, version_check

C build tooling (AWS-LC, Nettle, GSSAPI bindings) (16)

1 linked, 15 build

6/10

9

bindgen (0.71.1, 0.72.1), cc, cexpr, clang-sys, cmake, dunce, find-msvc-tools, fs_extra, glob, jobserver, libloading, pkg-config, prettyplease, shlex (1.3.0, 2.0.1)

18.4.20. Other platforms and lock-file entries

Platform shims for Windows, macOS, Android and WebAssembly are never compiled for Linux, and the lock-only packages are never compiled at all. Both are still checked by cargo deny and recorded by cargo vet.

Package or bundle

Set

Audited

KiB

Content

Windows, macOS, Android, WASM and other targets (54)

43 other OS, 11 lock only

6/48

—

android_system_properties, bumpalo, combine, core-foundation (0.10.1, 0.9.4), core-foundation-sys, jni, jni-macros, jni-sys, jni-sys-macros, js-sys, libredox, ndk-context, objc2-core-foundation, objc2-system-configuration, once_cell_polyfill, r-efi, redox_syscall, schannel, security-framework, security-framework-sys, serde-wasm-bindgen, simd_cesu8, system-configuration, system-configuration-sys, wasi, wasm-bindgen, wasm-bindgen-macro, wasm-bindgen-macro-support, wasm-bindgen-shared, web-sys, widestring, winapi, winapi-i686-pc-windows-gnu, winapi-util, winapi-x86_64-pc-windows-gnu, windows-core, windows-implement, windows-interface, windows-link, windows-registry, windows-result, windows-strings, windows-sys (0.52.0, 0.61.2), windows-targets, windows_aarch64_gnullvm, windows_aarch64_msvc, windows_i686_gnu, windows_i686_gnullvm, windows_i686_msvc, windows_x86_64_gnu, windows_x86_64_gnullvm, windows_x86_64_msvc

Other lock-only packages (4)

4 lock only

0/4

—

defmt, defmt-macros, defmt-parser, ring