sdk/js-sdk/docs/compatibility.md
kms: https://github.com/zama-ai/kms tfhe-rs: https://github.com/zama-ai/tfhe-rs
There is no on-chain or relayer-side signal that tells the SDK the minimum tfhe.wasm version required to deserialize a given PubKey/CRS pair, and the format is not forward-compatible across minor versions:
[email protected] cannot parse a PubKey/CRS produced by [email protected].Lacking a direct signal, the SDK derives the right tfhe.wasm version from a protocol context:
ACL.version on the host chain and map it to a protocol version.(protocol version, PubKey/CRS version) to a wasm version:
< v0.13.0 with PubKey/CRS < v1.6.0 → [email protected]≥ v0.13.0 with PubKey/CRS < v1.6.0 → [email protected] by default, while v1.5.3 remains compatible for the current legacy public PubKey/CRS.≥ v0.13.0 with PubKey/CRS ≥ v1.6.0 → [email protected]The PubKey/CRS part is a release-time snapshot, not a future-proof signal. After the SDK is published, key rotation or CRS removal can change the material served by a relayer. The SDK cannot guess those future changes without a direct on-chain or relayer-side version signal.
The protocol-version part works as long as every protocol release bumps at least one host-contract version. See the open question on this assumption below if it ever breaks.
In the future: add view functions in InputVerifier.sol and KMSVerifier.sol or ProtocolConfig.sol
KMS releases pin an exact tfhe-rs crate version via tfhe = "=X.Y.Z" in the workspace Cargo.toml.
| KMS version | tfhe-rs crate | Notes |
|---|---|---|
0.12.4 – 0.12.7 | 1.4.0-alpha.3 | initial line, prerelease alpha |
0.13.0 – 0.13.3 | 1.5.1 | tfhe minor bump (1.4 → 1.5) |
0.13.10 | 1.5.4 | tfhe patch bump within 1.5.x |
0.13.20-0 | 1.6.1 | tfhe minor bump (1.5 → 1.6) |
KMS 0.12.7 generated the PubKey/CRS in December 2025
| Chain | Protocol | PubKey/CRS |
|---|---|---|
| Mainnet | 0.11.0 | 1.4.0-alpha.3 |
| Testnet | 0.13.0 | 1.4.0-alpha.3 |
| Devnet | 0.13.0 | 1.4.0-alpha.3 |
| Polygon-Amoy (Devnet) | 0.13.0 | 1.4.0-alpha.3 |
| Protocol | ACL | FHEVMExecutor | KMSVerifier | InputVerifier | HCULimit | ProtocolConfig | PauserSet |
|---|---|---|---|---|---|---|---|
0.10.0 | 0.2.0 | 0.1.0 | 0.1.0 | 0.2.0 | 0.1.0 | - | 0.1.0 |
0.11.0 | 0.2.0 | 0.2.0 | 0.1.0 | 0.2.0 | 0.1.0 | - | 0.1.0 |
0.12.0 | 0.3.0 | 0.3.0 | 0.2.0 | 0.2.0 | 0.2.0 | - | 0.1.0 |
0.13.0 | 0.4.0 | 0.4.0 | 0.3.0 | 0.2.0 | 0.3.0 | 0.1.0 | 0.1.0 |
0.14.0 | 0.5.0 | ? | 0.4.0 | ? | ? | 0.2.0 | ? |
| Protocol | TFHE | KMS | Extra data |
|---|---|---|---|
0.10.0 | 1.4.0-alpha.3 | 0.12.4 | v0 |
0.11.0 | 1.5.1 | 0.13.3 | v0 |
0.12.0 | 1.5.4 | 0.13.10 | v1 |
0.13.0 | 1.6.1 | 0.13.20-0 | v1 |
0.14.0 | ? | ? | v2 |
| Chain | Protocol | PubKey/CRS (TFHE) | TFHE 1.5.3 | TFHE 1.6.1 |
|---|---|---|---|---|
| Mainnet | 0.11.0 | 1.4.0-alpha.3 | ✅ | ❌ |
| Testnet | 0.13.0 | 1.4.0-alpha.3 | ✅ | ✅ |
| Devnet | 0.13.0 | 1.4.0-alpha.3 | ✅ | ✅ |
| Protocol | PubKey/CRS (TFHE) | Readable by TFHE 1.5.3 | Readable by TFHE 1.6.1 |
|---|---|---|---|
0.11.0 | 1.5.1 | ✅ | ✅ |
0.12.0 | 1.5.4 | ✅ | ✅ |
0.13.0 | 1.6.1 | ❌ | ✅ |
0.14.0 | ? | ❌ | ? |
| Protocol | TFHE | Types | Functions |
|---|---|---|---|
v0.11.0 | |||
v0.12.0 | |||
v0.13.0 | |||
v0.14.0 | |||
v1.5.3 | |||
v1.6.1 | CompactCiphertextList.builder | ||
CompactCiphertextListBuilder.push_boolean | |||
CompactCiphertextListBuilder.push_u8 | |||
CompactCiphertextListBuilder.push_u16 | |||
CompactCiphertextListBuilder.push_u32 | |||
CompactCiphertextListBuilder.push_u64 | |||
CompactCiphertextListBuilder.push_u128 | |||
CompactCiphertextListBuilder.push_u160 | |||
CompactCiphertextListBuilder.push_u256 | |||
CompactCiphertextListBuilder.build_with_proof_packed | |||
CompactCiphertextListBuilder.free | |||
CompactPkeCrs.safe_serialize | |||
CompactPkeCrs.safe_deserialize | |||
ProvenCompactCiphertextList.safe_serialize | |||
ProvenCompactCiphertextList.safe_deserialize | |||
ProvenCompactCiphertextList.free | |||
ProvenCompactCiphertextList.len | |||
ProvenCompactCiphertextList.get_kind_of | |||
TfheCompactPublicKey.safe_serialize | |||
TfheCompactPublicKey.safe_deserialize | |||
ZkComputeLoad | init_panic_hook | ||
initThreadPool | |||
setWorkerUrlConfig | |||
getWasmInfo |
| Protocol | KMS | Types | Functions |
|---|---|---|---|
v0.11.0 | |||
v0.12.0 | |||
v0.13.0 | |||
v0.14.0 | |||
v0.13.x | |||
v0.14.0 | Client | ||
PrivateEncKeyMlKem512 | |||
PublicEncKeyMlKem512 | |||
ServerIdAddr | |||
TypedPlaintext | new_client | ||
new_server_id_addr | |||
ml_kem_pke_keygen | |||
ml_kem_pke_get_pk | |||
ml_kem_pke_pk_to_u8vec | |||
ml_kem_pke_sk_to_u8vec | |||
u8vec_to_ml_kem_pke_sk | |||
process_user_decryption_resp_from_js |