Vodozemac Java
Java bindings for the Vodozemac Matrix cryptography library.
Vodozemac Java provides Java Native Interface (JNI) bindings for the Vodozemac Rust library, which implements the OLM cryptographic ratchet for Matrix end-to-end encryption.
Features
- Cryptographic operations — Curve25519 and Ed25519 key generation, message signing, Olm and Megolm sessions, session keys
- SAS verification — Short Authentication String with emoji and decimal rendering
- ECIES channels — Elliptic Curve Integrated Encryption Scheme for QR-code-based device login (MSC3886)
- PK encryption — Megolm key backup using Curve25519-AES-SHA2 hybrid encryption
- libolm compatibility — legacy pickle support for migrating from libolm
- Cross-platform — Linux (x86_64, ARM64), macOS (Intel, Apple Silicon), Windows (x86_64, ARM64)
- Memory safety —
AutoCloseablehandles backed by aCleanersafety net, thread-safe native calls
Quick start
Add the dependency and manage your first account:
import io.github.fherbreteau.vodozemac.account.Account;
import io.github.fherbreteau.vodozemac.types.Ed25519Signature;
try (Account account = new Account()) {
Ed25519Signature signature = account.sign("Hello Matrix!");
boolean valid = account.ed25519Key().verify("Hello Matrix!", signature);
System.out.println("Signature valid: " + valid);
} // Native resources freed automatically
See Installation and Getting started.
Samples
Runnable, feature-by-feature walkthroughs — Olm sessions,
Megolm group sessions, SAS verification,
ECIES channels, PK encryption and
cross-signing keys — are all derived from the
demos shipped under src/demos/java (run with mvn -Psample test).
API documentation
The complete Javadoc of the latest release is self-hosted at
/apidocs/latest/
and redeployed with every release, and the API reference page
summarizes the full API surface.