Liking cljdoc? Tell your friends :D

This project uses Break Versioning.


v1.3.0-SNAPSHOT (2026-12-06)

This is a major pre-release that adds post-quantum algorithms, signed encryption, and stronger defaults.

It needs Java 17+, and its post-quantum features (incl. new default KeyChains) need OpenJDK 17.0.21+, 21.0.13+, 25.0.4+ or 27+.

There are some BREAKING changes and data compatibility issues to review below.

Its post-quantum data formats may still change before v1.3.0 final, so please don't use this pre-release for KeyChains or data that you can't recreate. Note that new default KeyChains include post-quantum keys.

Please test carefully with copies of your existing data before upgrading production systems, and report any unexpected issues. Thank you! 🙏

- Peter Taoussanis

Since v1.2.0 (2026-12-03)

Upgrade notes

Existing KeyChains and data keep working unchanged.

Data written with existing KeyChains and default settings is still readable by v1.2, so rolling back won't strand data unless you use the new key algorithms, new default KeyChains, or signed encryption.

Action is needed only if you:

  • Create new KeyChains with the default :asymmetric-keypairs: these now use post-quantum keys. They need a post-quantum JVM and Tempel v1.3+ wherever they're used, a hybrid :backup-key if you use one, and they write larger output. Use {:asymmetric-keypairs [:rsa-3072 :dh-3072]} to keep creating v1.2's KeyChains.
  • Use PBKDF2 for password encryption (the default without the optional scrypt dependency) with a :ref-<num>-msecs work factor: new writes take ~12x longer to encrypt and decrypt, so check your latency budget. Upgrade readers before writers: v1.2 can't read new writes over its :pbkdf-nwf-max if set, or any at :ref-2000-msecs or higher.
  • Encrypt with :hash-algo :md5 or :sha-1: use :sha-256 (the default), or set :sym-cipher-algo :aes-gcm-128-v1.

Recommended: once everything that uses a KeyChain runs v1.3 on a post-quantum JVM, add post-quantum keys to it with the new keychain-add-missing-recommended-keys (see the post-quantum guide).

BREAKING

  • [mod] New default KeyChains prefer post-quantum keys and need a PQ-capable JVM (17.0.21+, 21.0.13+, 25.0.4+, 27+). Output is larger. Use :asymmetric-keypairs [:rsa-3072 :dh-3072] for v1.2-compatible KeyChains. [6e197a1]
  • [mod] Default cipher is now AES-256-GCM. Writes with :hash-algo :md5 or :sha-1 need :sha-256, or an explicit 128-bit cipher. [ffee075]
  • [mod] PBKDF2: re-baseline reference presets. :ref-<num>-msecs work factors use ~12x more iterations (password encryption without scrypt). Upgrade readers before writers. [80ce6f0]

Fixes

  • [fix] keychain-freeze-public: export public keys with non-exportable private keys. [93b8543]
  • [fix] keychain-add-*: always return :key-id with {:return :map}. [0626924]
  • [fix] with-min-runtime: allow non-literal duration. [9204a16]
  • [fix] keychain-update-priority: require an integer from the update fn. [7654375]
  • [fix] :keypair-creator: check that the returned keypair is complete and of the requested algorithm. [b683c5c]
  • [fix] Docs: fix two docstring examples. [76a4496]
  • [fix] Keys: clearer error for encoded key bytes given without a key algorithm. [48d8b2e]

New

  • [new] Add post-quantum encryption and signatures: hybrid ML-KEM-768 + X25519, ML-KEM-768/1024, ML-DSA-65/87. [988844c]
  • [new] Add hybrid signing key :ml-dsa-65-ed25519: ML-DSA-65 + Ed25519, unforgeable while either holds. [5be4476]
  • [new] Add signed encryption: encrypt-signed-with-2-keypairs, decrypt-signed-with-2-keypairs. [bc464f1]
  • [new] Add :require-pq? option to require post-quantum keys. [913f8e7]
  • [new] keychain-add-missing-recommended-keys: upgrade existing KeyChains. [cbb458f]
  • [doc] Wiki: add post-quantum guide. [3dc150b]

v1.2.0 (2026-12-03)

This is a maintenance and feature release with security fixes, new key algorithms, and public-key encryption for keychains. It needs Java 17+.

No significant changes since v1.2.0-RC1.

Please test carefully with copies of your existing data before upgrading production systems, and report any unexpected issues. Thank you! 🙏

- Peter Taoussanis

Since v1.1.0 (2025-12-10)

Upgrade notes

Most users on default settings need no changes. Data written with default settings is readable by v1.1 and vice versa, so rolling back won't strand data unless you use the new algorithms, :key-pub, or RSA keys with a non-default JCA provider (see below).

Action is needed only if you:

  • Run Java < 17: upgrade your JVM, or stay on v1.1.
  • Use :pbkdf-nwf :ref-5000-msecs: a typo gave this only ~10 msecs of work. It now takes ~5 secs as intended (~500x slower), so check your latency budget and re-encrypt existing data.
  • Have a private :backup-key in *config*: this let a wrong password pass keychain-decrypt. Backup keys must now be given per call to decrypt.
  • Use RSA keys with Bouncy Castle (or similar) as your preferred JCA provider: upgrade readers before writers.
  • Are affected by a breaking change below (all rare).

Recommended when decrypting untrusted data: enable the new opt-in :require-hmac? and :pbkdf-nwf-max options (see *config* docstring).

BREAKING

  • [mod] Require Java 17+, add Ed25519 [147641f]
  • [mod] Require explicit backup-key recovery [4c5c025]
  • [mod] Require HMAC for keychains and CBC [14745af]
  • [mod] signed: reject MD5 and SHA-1 [0437fc1]
  • [mod] Reject zero-round SHA-512 PBKDF [9f0bcb3]
  • [mod] :ba-akm: require a byte array [fc15cf2]

Fixes

  • [sec] Check envelope field sizes before allocating [2321f80]
  • [sec] :pbkdf-nwf :ref-5000-msecs: fix wrong work factor [1013203]
  • [sec] keypair-creator: isolate buffer from custom RNGs [f3c50ff]
  • [sec] X25519: reject all-zero shared secrets [18331c6]
  • [fix] keychain-add-*: preserve added keys [fdd519d]
  • [fix] decrypt-with-2-keypairs: fix key lookup [bc4fabc]
  • [fix] RSA-OAEP: fix provider-dependent params [212e7ae]
  • [fix] keychain-decrypt: don't return nil for non-key errors [85f0237]
  • [fix] Backup keys: fix recursion with global :backup-key [0de3910]
  • [fix] KeyChains: don't share byte[]s with callers [8343902]
  • [fix] ChainKeys: don't share symmetric byte[]s [11a110e]
  • [fix] Reject :random as direct encryption key [97f3cc1]
  • [fix] sign: support SHA-512 ECDSA envelopes [b6d9069]
  • [sec] Misc defensive hardening [5e2f0f9]
  • [fix] KeyChains: clear error for out-of-range priorities [7037dd4]
  • [fix] Fix login system examples [27404ae]

New

  • [new] Add new key algo: :x25519 [7b29928]
  • [new] Add new public-key encryption: :x25519 [330d557]
  • [new] Add new key algo: :ed25519 [147641f]
  • [new] #12 keychain-encrypt: support public keys [405c999]
  • [new] Add :require-hmac? decryption option [7c6fff1]
  • [new] Add :pbkdf-nwf-max decryption option [0b55255]
  • [new] sign: add RSA-PSS signature algorithms [3f6669e]
  • [doc] Backup recovery caveats, forward secrecy, AES-256 note [346d124]
  • [doc] Wiki: cover password settings and sharing [dcd91db]

v1.2.0-RC1 (2026-11-21)

This is a release candidate for v1.2, with security fixes, new key algorithms, and public-key encryption for keychains. It needs Java 17+.

Please test carefully with copies of your existing data before upgrading production systems, and report any unexpected issues. Thank you! 🙏

- Peter Taoussanis

Since v1.1.0 (2025-12-10)

Upgrade notes

Most users on default settings need no changes. Data written with default settings is readable by v1.1 and vice versa, so rolling back won't strand data unless you use the new algorithms, :key-pub, or RSA keys with a non-default JCA provider (see below).

Action is needed only if you:

  • Run Java < 17: upgrade your JVM, or stay on v1.1.
  • Use :pbkdf-nwf :ref-5000-msecs: a typo gave this only ~10 msecs of work. It now takes ~5 secs as intended (~500x slower), so check your latency budget and re-encrypt existing data.
  • Have a private :backup-key in *config*: this let a wrong password pass keychain-decrypt. Backup keys must now be given per call to decrypt.
  • Use RSA keys with Bouncy Castle (or similar) as your preferred JCA provider: upgrade readers before writers.
  • Are affected by a breaking change below (all rare).

Recommended when decrypting untrusted data: enable the new opt-in :require-hmac? and :pbkdf-nwf-max options (see *config* docstring).

BREAKING

  • [mod] Require Java 17+, add Ed25519 [147641f]
  • [mod] Require explicit backup-key recovery [4c5c025]
  • [mod] Require HMAC for keychains and CBC [14745af]
  • [mod] signed: reject MD5 and SHA-1 [0437fc1]
  • [mod] Reject zero-round SHA-512 PBKDF [9f0bcb3]
  • [mod] :ba-akm: require a byte array [fc15cf2]

Fixes

  • [sec] Check envelope field sizes before allocating [2321f80]
  • [sec] :pbkdf-nwf :ref-5000-msecs: fix wrong work factor [1013203]
  • [sec] keypair-creator: isolate buffer from custom RNGs [f3c50ff]
  • [sec] X25519: reject all-zero shared secrets [18331c6]
  • [fix] keychain-add-*: preserve added keys [fdd519d]
  • [fix] decrypt-with-2-keypairs: fix key lookup [bc4fabc]
  • [fix] RSA-OAEP: fix provider-dependent params [212e7ae]
  • [fix] keychain-decrypt: don't return nil for non-key errors [85f0237]
  • [fix] Backup keys: fix recursion with global :backup-key [0de3910]
  • [fix] KeyChains: don't share byte[]s with callers [8343902]
  • [fix] ChainKeys: don't share symmetric byte[]s [11a110e]
  • [fix] Reject :random as direct encryption key [97f3cc1]
  • [fix] sign: support SHA-512 ECDSA envelopes [b6d9069]
  • [sec] Misc defensive hardening [5e2f0f9]
  • [fix] KeyChains: clear error for out-of-range priorities [7037dd4]
  • [fix] Fix login system examples [27404ae]

New

  • [new] Add new key algo: :x25519 [7b29928]
  • [new] Add new public-key encryption: :x25519 [330d557]
  • [new] Add new key algo: :ed25519 [147641f]
  • [new] #12 keychain-encrypt: support public keys [405c999]
  • [new] Add :require-hmac? decryption option [7c6fff1]
  • [new] Add :pbkdf-nwf-max decryption option [0b55255]
  • [new] sign: add RSA-PSS signature algorithms [3f6669e]
  • [doc] Backup recovery caveats, forward secrecy, AES-256 note [346d124]
  • [doc] Wiki: cover password settings and sharing [dcd91db]

v1.1.0 (2025-12-10)

This is a minor maintenance release that should be a safe upgrade for folks on v1.0.0.

It introduces new utils to make it easier to de/serialize public parts of KeyChains.


v1.0.0 (2025-11-05)

At long last- this is the first stable v1 release of Tempel! 🎉

It is functionally identical to (and bidirectionally data compatible with) v1.0.0-RC1 (2024-02-26), but now marked as "production ready".

Disclaimer

⚠️ Important: this software is provided "as is" and without warranty of any kind. You use it at your own risk!

While Tempel has been written and tested with care, the nature of the problem domain inevitably means that it can be easy to misuse and sensitive to bugs.

Misuse or bugs can be especially harmful - potentially leading to security vulnerabilities or even permanent data loss!

Whenever you use cryptographic libraries/frameworks (including Tempel), please test very carefully and always back up important data!

Please report any unexpected issues! Possible security issues may be responsibly reported here, thank you! 🙏

Since v1.0.0-RC1 (2024-02-26)


v1.0.0-RC1 (2024-02-26)

Dep/s: Tempel is on Clojars.
Versioning: Tempel uses Break Versioning.

⚠️ This release is intended for development/testing with ephemeral or low-value data. Tempel v1.0 final is expected around May 2024.

Please report any problems and let me know if anything is unclear, inconvenient, etc. Thank you! 🙏

New since v1.0.0-beta1

  • 9001f1b [new] Add encrypt-keychain, decrypt-keychain aliases
  • Misc documentation improvements, incl. new demo video

v1.0.0-beta1 (2024-02-01)

📦 Available on Clojars, this project uses Break Versioning.

⚠️ Please don't use this in production yet, this release is intended for early testers and for those that would like to give feedback. Please report any unexpected problems and let me know if anything is unclear, inconvenient, etc. Now's the ideal time to get changes in. Thank you! 🙏

Changes since v1.0.0-alpha1

  • 1931c7d [mod] Rename {:return :as-map} -> {:return :map}

New since v1.0.0-alpha1

  • 1e1fdbd [new] [#1] [#2] Add ChaCha20-Poly1305 AEAD cipher (@iarenaza)

v1.0.0-alpha1 (2023-11-13)

📦 Available on Clojars, this project uses Break Versioning.

This is Tempel's first public pre-release.

⚠️ Please don't use this in production yet, this release is intended for early testers and for those that would like to give feedback. Please report any unexpected problems and let me know if anything is unclear, inconvenient, etc. Now's the ideal time to get changes in. Thank you! 🙏

Can you improve this documentation?Edit on GitHub

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close