Tink-backed implementation of hive-system.protocols/ICrypto.
See hive-system.protocols/ICrypto for the parameter-object contract —
every op receives a single map keyed under :crypto/*.
Algorithms supported: :xchacha20-poly1305 — symmetric AEAD (subtle.XChaCha20Poly1305) :hpke-x25519 — RFC 9180 single-shot HPKE (DHKEM-X25519 + HKDF-SHA256 + ChaCha20-Poly1305) :sha256 — message digest
Ed25519 keys default to RAW 32-byte material. Pass
:crypto/key-encoding :der to work in the JDK encodings instead — PKCS#8
private under :crypto/key, X.509 public under :crypto/pubkey — which is
what a keyring stores. Both encodings wrap the same 32 bytes and produce
byte-identical signatures. See hive-system.crypto.ed25519-der.
Tink-backed implementation of `hive-system.protocols/ICrypto`.
See `hive-system.protocols/ICrypto` for the parameter-object contract —
every op receives a single map keyed under `:crypto/*`.
Algorithms supported:
:xchacha20-poly1305 — symmetric AEAD (subtle.XChaCha20Poly1305)
:hpke-x25519 — RFC 9180 single-shot HPKE
(DHKEM-X25519 + HKDF-SHA256 + ChaCha20-Poly1305)
:sha256 — message digest
Ed25519 keys default to RAW 32-byte material. Pass
`:crypto/key-encoding :der` to work in the JDK encodings instead — PKCS#8
private under `:crypto/key`, X.509 public under `:crypto/pubkey` — which is
what a keyring stores. Both encodings wrap the same 32 bytes and produce
byte-identical signatures. See `hive-system.crypto.ed25519-der`.(->tink-crypto)Construct a Tink-backed ICrypto.
Construct a Tink-backed ICrypto.
(generate-ed25519-keypair)Generate a fresh Ed25519 keypair. Returns {:public 32-bytes :private 32-bytes}.
Generate a fresh Ed25519 keypair. Returns {:public 32-bytes :private 32-bytes}.
(generate-x25519-keypair)Generate a fresh DHKEM-X25519 key pair. Returns {:public 32-bytes :private 32-bytes}.
Generate a fresh DHKEM-X25519 key pair. Returns {:public 32-bytes :private 32-bytes}.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |