Skip to main content
Java integrates through the SDK’s C ABI (include/evb_e2ee.h). Two supported paths:
  • Java 22+ Foreign Function & Memory API (FFM) — the recommended, JNI-free path (preview before 22; --enable-preview on 20/21).
  • JNI — for older JVMs, wrap the same symbols with a thin JNI layer.
The native library is libevb_e2ee_ffi (built from bindings/dart/rust of everabyte/crypto-sdk, or fetched from GitHub Releases).

1. Install

Declare the symbols you need (a subset — the full list is in the C ABI reference):

2. Account key (UMK) — once, kept in your secret store

The 96 UMK bytes never leave your JVM process; the Everabyte servers receive only public keys and wrapped blobs.

3. Encrypt → upload → attach envelope

On an attach timeout, reconcile whether it committed before cleanup. After a confirmed failure, resolve the uploaded row by bucket and opaque wire name, confirm it has no envelope, and hard-delete it through the file API as required by the E2EE upload contract. Handle retention blocks explicitly.

4. Download → decrypt

Error handling: every call returns 0 on success, negative otherwise; evb_last_error(buf, cap) returns the secret-free message (call with cap = 0 first to get the required capacity).

Next