4.1.12. Dependencies#

4.1.12.1. Policy#

Every dependency is code the institution trusts with an identification, so the rule for KyCH’s own programs is to minimise: use what the standard library or an already-present crate offers; where a new crate is needed, prefer one that GNU Taler’s other Rust components (Pepsi) already use; never write a cryptographic primitive, but use established crates for each. The upstream helpers bring their own large dependency trees, which KyCH cannot reduce; it pins them to release tags and keeps its changes as patches.

4.1.12.2. Debian packages at run time#

Package

Depends on

Recommends

kych

postgresql-client, adduser, the C library and OpenSSL’s libssl

nginx (or another web server), postgresql (≥ 14), swiyu-verifier, jq (the exchange’s converter)

kych-trust, kych-oid4vp

postgresql-client, adduser, libssl

postgresql (≥ 14); kych-oid4vp also nginx, kych-trust

kych-eid

postgresql-client, openssl, adduser, libssl

nginx, postgresql (≥ 14)

swiyu-verifier

OpenJDK 25, postgresql-client, adduser

nginx, postgresql (≥ 14)

eudi-verifier

OpenJDK 25, openssl

nginx, kych-trust

waltid-verifier

OpenJDK 21

nginx, kych-trust

governikus-eumw

OpenJDK 25

nginx, kych-eumw-bridge

kych-eumw-bridge

OpenJDK 25, adduser

governikus-eumw, nginx

eidas-node-connector

OpenJDK 21, tomcat11-user, python3, adduser

kych-eumw-bridge, nginx

openssl and the JDK’s keytool are used by the start and setup scripts (the EUDI verifier’s client id is computed from its key store; eidas-node-connector-setup builds key stores).

4.1.12.3. KyCH’s Rust programs#

The Cargo workspace has six members: the gateway (kych), kych-trust, kych-oid4vp, kych-eid, the library kych-vp-formats (the OpenID4VP formats, used by kych-oid4vp, the gateway’s parsing and the test wallet) and taler-config (vendored from taler-rust: the GNU Taler configuration format, logging and socket binding), plus the test-only testing. With their transitive dependencies, on Linux, cargo tree counts 243 crates for the gateway, 203 for kych-trust, 227 for kych-oid4vp and 206 for kych-eid, most of them shared (the web server, the database driver, the HTTP client and their support crates).

Direct dependencies by role:

Crates

Used by

Why

tokio, axum, tower-http

all daemons

async runtime and HTTP server; static files (the QR code script)

sqlx 0.8 (PostgreSQL)

all daemons

database access with runtime-checked queries; no database needed at build time

reqwest

all daemons

HTTP client to helpers, lists, status lists, the BerCA; TLS through the system’s OpenSSL (native-tls)

serde, serde_json, url, urlencoding, base64, hex, chrono, uuid

all

data formats

clap, tracing, anyhow, thiserror

all

command line, logging, errors

taler-config (vendored)

all daemons

the Taler configuration format, @inline-secret@, Unix-socket and systemd socket binding, the request log

askama

gateway

compiled HTML templates (picker, wallet page)

bcrypt

gateway

client secrets stored as hashes

flate2

gateway, vp-formats

deflate bodies of /setup; compressed status lists

rand

gateway

nonces, codes, tokens

ring

vp-formats, kych-trust

signatures (ES256 and others), digests, AES-GCM

p256

vp-formats

ECDH with a static key, for direct_post.jwt (JWE ECDH-ES), which ring’s ephemeral-only key agreement cannot do

concat-kdf, sha2

vp-formats

the JWE ECDH-ES key derivation

ciborium, coset

vp-formats, kych-oid4vp

CBOR [RFC8949] and COSE [RFC9052], [RFC9360] for mdoc and CWT [RFC8392] status lists

x509-cert

gateway, vp-formats, kych-trust, kych-oid4vp

parsing X.509 certificates [RFC5280] (issuer chains, access certificates)

rustls-webpki, rustls-pki-types

kych-trust

certificate path validation for the trust decisions

subtle

kych-oid4vp, kych-eid

constant-time comparison of secrets

openssl

kych-eid

brainpool ECDSA and ECDH (the ID card’s curves, which ring lacks), AES, CMAC [RFC4493], CMS, X.509 with explicit EC parameters

quick-xml

kych-eid

PAOS/SOAP messages of the eID client, without DTD processing

Decisions that kept the tree small:

  • No JOSE library. No Rust crate did JWE ECDH-ES on the cryptography already in the tree: josekit uses OpenSSL by default and its RustCrypto back end pulls a second generation of those crates; others bring their own ASN.1 stacks or have no JWE at all (testing/README). The JWS/JWE framing (compact serialisation, the headers, the Concat KDF input) is therefore written in kych-vp-formats over ring, p256 and concat-kdf – JWS [RFC7515], JWE [RFC7516] and JWT [RFC7519] – and tested against the test vectors of RFC 7518 [RFC7518] and OpenID4VP.

  • ``ring`` plus ``p256``, rather than a second general-purpose cryptography library; p256 only for the one operation ring does not offer.

  • OpenSSL’s cryptography only in kych-eid, for the brainpool curves and the CMS structures of the ID card; elsewhere OpenSSL is only the TLS of the HTTP client.

  • Crates Pepsi already uses were taken where they fit: x509-cert, rustls-webpki, sha2, subtle, quick-xml, url, flate2, askama (and sqlx, in an older major version).

  • The configuration parser is vendored from taler-rust rather than depended on, so that the C components’ format is read identically; local changes are kept small and offered upstream (taler-config/README).

Not in the packages: the testing crate (the simulated trust infrastructure, the test PID issuer and wallet), the Python test drivers, and the test tooling of testing/npa (AusweisApp’s SDK with a test-only patch), testing/conformance (the OpenID Foundation suite in podman) and testing/interop (the Android emulator).

4.1.12.4. The upstream helpers#

Upstream

Version, runtime

Licence

KyCH’s patches (PACKAGE/patches/)

SWIYU Generic Verifier (Swiss Confederation)

5.0.1; Java 25, Spring Boot 4.1

MIT

0001 listen on a Unix domain socket

eudi-srv-verifier-endpoint (European Commission)

0.12.0; Java 25, Spring Boot 4.1 (WebFlux)

Apache-2.0

0001 ISO dates from the mdoc utility (an upstream fix, backported); 0002 Unix socket; 0003 build with any vendor’s JDK 25; 0004 verify the signature and signer of status lists; 0005 report responses refused before validation; 0006 start without configured intended uses

waltid-identity, verifier-api2 (walt.id)

1.3.0; Java 21, Ktor

Apache-2.0

0001 Unix socket; 0002 a signed list fetched by URL; 0003 list services without ServiceStatus; 0004 trust for a separate status-list signer; 0005 encrypted wallet error responses; 0006 an unreadable response fails the session; 0007 invalid disclosures are not an outage

Governikus eIDAS Middleware

4.1.0; Java 25, Spring Boot

EUPL-1.2

0001 admin interface on the configured address

EU eIDAS-Node, Connector (European Commission)

3.1.0; Java 21, Debian’s Tomcat 11

EUPL-1.2

0001 hand the specific part the proxy service’s signed answer

kych-eumw-bridge (this tree)

Java 25, the middleware’s parent POM and eidas-starterkit 4.1.0, Spring Boot web, Hazelcast 5.6.0 client, Bouncy Castle

EUPL-1.2 (as the middleware it links)

–

Each patch is in git format-patch form, with a test in upstream’s own suite where one fits, and was drafted for upstream; the package build copies the submodule, applies the patches and builds the copy, so the submodule stays at its tag. The Java builds fetch their dependencies from Maven Central (Maven) or through the Gradle wrapper; walt.id’s build also fetches a JDK 17 for upstream’s libraries unless one is installed. The resulting jars are Spring Boot “fat” jars or a war that embed every Java dependency.

4.1.12.5. Building#

cargo and rustc 1.85 or later, pkg-config, libssl-dev, python3-sphinx (manual pages), jq (the converter’s tests), maven, openjdk-25-jdk-headless, openjdk-21-jdk-headless, and debhelper for the packages. ./configure finds which are present and leaves out the helpers it cannot build.

4.1.12.6. Licences#

  • KyCH – the gateway, kych-trust, kych-oid4vp, kych-eid, kych-vp-formats and the vendored taler-config: AGPL-3.0 or later. The packaging (debian/) is GPL-3.0 or later.

  • kych-eumw-bridge: EUPL-1.2, like the middleware’s starter kit it links.

  • The upstream helpers: swiyu-verifier MIT; the EUDI verifier and walt.id Apache-2.0; the Governikus middleware and the eIDAS-Node EUPL-1.2.

  • The Rust dependencies of the four daemons are under permissive licences: MIT and/or Apache-2.0 for the great majority, a few BSD, ISC, Zlib, Unicode-3.0 or Unlicense; none is copyleft.

  • The JVM dependencies embedded in the fat jars are not enumerated in debian/copyright yet; upstream’s bills of materials (swiyu-verifier’s THIRD-PARTY-NOTICES.md and release SBOM, walt.id’s THIRD-PARTY-NOTICE.md) are the starting point. This, and the fat jars themselves, keep these packages out of the Debian archive; they are meant for a project repository.

KyCH’s AGPL programs and the helpers under EUPL, Apache-2.0 or MIT are separate programs that talk over HTTP; the EUPL-1.2 lists the AGPL-3.0 among its compatible licences in its appendix.

4.1.12.7. Update policy#

Recommended practice:

  • Rust crates: Cargo.lock is committed; update deliberately, cargo update -p CRATE, with the whole test suite (make check, with a database) and a look at the change log of any crate that does cryptography or parsing; check the locked versions against the RustSec advisory database (cargo audit) before a release.

  • Upstream helpers: a new release tag is taken as described in Administration – patches re-applied or dropped, the differential, conformance, npa or eidas suites run again.

  • Debian packages of the runtime (OpenJDK, Tomcat, PostgreSQL, OpenSSL, nginx) follow Debian’s security updates; restart the services that use a library after it is updated.

  • Test tooling (the conformance suite, AusweisApp’s SDK, the wallets) is pinned per run and recorded in the results files.