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 |
|---|---|---|
|
|
|
|
|
|
|
|
|
|
OpenJDK 25, |
|
|
OpenJDK 25, |
|
|
OpenJDK 21 |
|
|
OpenJDK 25 |
|
|
OpenJDK 25, |
|
|
OpenJDK 21, |
|
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 |
|---|---|---|
|
all daemons |
async runtime and HTTP server; static files (the QR code script) |
|
all daemons |
database access with runtime-checked queries; no database needed at build time |
|
all daemons |
HTTP client to helpers, lists, status lists, the BerCA; TLS through
the system’s OpenSSL ( |
|
all |
data formats |
|
all |
command line, logging, errors |
|
all daemons |
the Taler configuration format, |
|
gateway |
compiled HTML templates (picker, wallet page) |
|
gateway |
client secrets stored as hashes |
|
gateway, vp-formats |
deflate bodies of |
|
gateway |
nonces, codes, tokens |
|
vp-formats, kych-trust |
signatures (ES256 and others), digests, AES-GCM |
|
vp-formats |
ECDH with a static key, for |
|
vp-formats |
the JWE ECDH-ES key derivation |
|
vp-formats, kych-oid4vp |
CBOR [RFC8949] and COSE [RFC9052], [RFC9360] for mdoc and CWT [RFC8392] status lists |
|
gateway, vp-formats, kych-trust, kych-oid4vp |
parsing X.509 certificates [RFC5280] (issuer chains, access certificates) |
|
kych-trust |
certificate path validation for the trust decisions |
|
kych-oid4vp, kych-eid |
constant-time comparison of secrets |
|
kych-eid |
brainpool ECDSA and ECDH (the ID card’s curves, which |
|
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:
josekituses 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 inkych-vp-formatsoverring,p256andconcat-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;
p256only for the one operationringdoes 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(andsqlx, in an older major version).The configuration parser is vendored from
taler-rustrather 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 ( |
|---|---|---|---|
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 |
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 |
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/copyrightyet; upstream’s bills of materials (swiyu-verifier’sTHIRD-PARTY-NOTICES.mdand release SBOM, walt.id’sTHIRD-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.lockis 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,
npaoreidassuites 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.