Package co.cryptoservice.sdk
package co.cryptoservice.sdk
A thin, typed Java client for the Crypto Service REST API (crypto-server).
Start with CryptoServiceClient. Requests are records named
...Request, results records named ...Result (or the key-pair and document types the API
returns); members carry the API's encodings (hex, base64, UTF-8 text) as strings, with
...Bytes() accessors and Bytes for byte[]. Errors are
ApiError and TransportError.
The SDK implements no cryptography: every operation is performed by the server.
-
ClassDescriptionWhat
POST /v2/encryptanswers: encrypt with XChaCha20-Poly1305.The server answered with a status outside 2xx.Theparamsmember.The two binary encodings the API uses, so callers can pass and readbyte[]without guessing: lowercase hex for keys, signatures, digests, MACs, shared secrets, KEM ciphertexts and HPKE output; standard base64 with padding for AEAD, secretbox, sealed-box, stream, password-encryption and AES-KW output.One element ofcomponents.WhatGET /v2/compliance/cbomanswers: cryptographic Bill of Materials (CBOM) in CycloneDX 1.6 format.One element ofproperties.Theclassicalmember.A client for the Crypto Service REST API (crypto-server).Builds aCryptoServiceClient.The base of every error the client raises for a call:ApiErrorwhen the server answered with an error status,TransportErrorwhen no usable answer arrived.The body ofPOST /v2/decrypt.WhatPOST /v2/decryptanswers: decrypt with XChaCha20-Poly1305.One element ofalgorithmDeprecationSchedule.One element ofcryptographicInventory.WhatGET /v2/compliance/doraanswers: DORA cryptographic inventory (self-assessment).The body ofPOST /v2/encrypt.A hash algorithm accepted byPOST /v2/hash.The body ofPOST /v2/hash.WhatPOST /v2/hashanswers: compute a cryptographic hash.WhatGET /healthanswers: health check.An HMAC hash accepted byPOST /v2/hmacand/v2/hmac/verify.An HPKE AEAD.An HPKE key-encapsulation mechanism (RFC 9180, plus the X-Wing and X25519 + ML-KEM-768 hybrids).The body ofPOST /v2/hpke/keygen.WhatPOST /v2/hpke/keygenanswers: generate a server-held HPKE key pair (classical or post-quantum hybrid).The body ofPOST /v2/hpke/open.WhatPOST /v2/hpke/openanswers: decrypt (open) an HPKE ciphertext with a server-held key.The body ofPOST /v2/hpke/seal.WhatPOST /v2/hpke/sealanswers: encrypt (seal) a message using HPKE (RFC 9180).The body ofPOST /v2/pq/hybrid/decapsulate.WhatPOST /v2/pq/hybrid/decapsulateanswers: hybrid decapsulate (X25519 + ML-KEM-768).The body ofPOST /v2/pq/hybrid/encapsulate.WhatPOST /v2/pq/hybrid/encapsulateanswers: hybrid encapsulate (X25519 + ML-KEM-768).WhatPOST /v2/pq/hybrid/keygenanswers: generate a server-held hybrid X25519 + ML-KEM-768 key pair.Theenvelopemember.The body ofPOST /v2/stream/iso20022.WhatPOST /v2/stream/iso20022answers: verify ISO 20022 post-quantum dual-signature envelope.A key-derivation function accepted byPOST /v2/kdf.Theparamsmember.The body ofPOST /v2/kdf.WhatPOST /v2/kdfanswers: derive a key from a password.WhatPOST /v2/pq/decapsulateanswers: ML-KEM decapsulate.A key-pair algorithm accepted byPOST /v2/keys/generate.WhatPOST /v2/keys/deleteanswers: delete a server-held key.WhatPOST /v2/keys/exportanswers: export a server-held private key.The body ofPOST /v2/keys/generate.WhatPOST /v2/keys/generateanswers: generate a server-held key pair for any supported algorithm.The body ofPOST /v2/keys/export.Themetadatamember.The body ofPOST /v2/keys/unwrap.An AES key-wrap mode accepted byPOST /v2/keys/wrapand/v2/keys/unwrap.The body ofPOST /v2/keys/wrap.WhatPOST /v2/keys/wrapanswers: wrap a key using AES-KW or AES-KWP (RFC 3394/5649).The body ofPOST /v2/kms/create-key.WhatPOST /v2/kms/generate-data-keyanswers: generate a Data Encryption Key (DEK) via KMS provider.The body ofPOST /v2/kms/decrypt.WhatPOST /v2/kms/decryptanswers: decrypt ciphertext with a managed KMS key.HowPOST /v2/kms/encryptreads its plaintext; never guessed from the content.The body ofPOST /v2/kms/encrypt.WhatPOST /v2/kms/encryptanswers: encrypt plaintext with a managed KMS key.The body ofPOST /v2/kms/generate-data-key.WhatPOST /v2/kms/create-keyanswers: create a managed key in the designated KMS provider.What a KMS key is created for.The body ofPOST /v2/kms/unwrap.WhatPOST /v2/kms/unwrapanswers: unwrap a wrapped key using a managed KMS key.The body ofPOST /v2/kms/wrap.WhatPOST /v2/kms/wrapanswers: wrap an existing key using a managed KMS key.WhatGET /liveanswers: liveness probe.The body ofPOST /v2/hmac.WhatPOST /v2/hmacanswers: compute an HMAC.The body ofPOST /v2/hmac/verify.WhatPOST /v2/hmac/verifyanswers: verify an HMAC.The body ofPOST /v2/pq/dsa/keygen.WhatPOST /v2/pq/dsa/keygenanswers: generate a server-held ML-DSA key pair (FIPS 204).An ML-DSA (FIPS 204) security level.WhatPOST /v2/pq/dsa/signanswers: sign with ML-DSA (FIPS 204).The body ofPOST /v2/pq/dsa/verify.WhatPOST /v2/pq/dsa/verifyanswers: verify with ML-DSA (FIPS 204).The body ofPOST /v2/pq/decapsulate.The body ofPOST /v2/pq/encapsulate.WhatPOST /v2/pq/encapsulateanswers: ML-KEM encapsulate.WhatPOST /v2/pq/keygenanswers: generate a server-held ML-KEM-768 key pair.The body ofPOST /v2/multi-recipient/encrypt.WhatPOST /v2/multi-recipient/encryptanswers: encrypt for multiple recipients (hybrid key wrapping).The body ofPOST /v2/opaque/login/finish.WhatPOST /v2/opaque/login/finishanswers: finish OPAQUE login handshake.The body ofPOST /v2/opaque/login/init.WhatPOST /v2/opaque/login/initanswers: initiate OPAQUE login handshake.The body ofPOST /v2/opaque/register/finish.WhatPOST /v2/opaque/register/finishanswers: finish OPAQUE credential registration.The body ofPOST /v2/opaque/register/init.WhatPOST /v2/opaque/register/initanswers: initiate OPAQUE credential registration.An OPAQUE cipher suite.The body ofPOST /v2/password/decrypt.The body ofPOST /v2/password/encrypt.WhatPOST /v2/password/encryptanswers: encrypt with password (Argon2id + XChaCha20-Poly1305).The body ofPOST /v2/password/hash.WhatPOST /v2/password/hashanswers: hash a password with Argon2id.The body ofPOST /v2/password/verify.WhatPOST /v2/password/verifyanswers: verify a password against an Argon2id hash.ThepostQuantummember.An RFC 9457 problem: the body of every error the server sends (application/problem+json).The answer toCryptoServiceClient.request(java.lang.String, java.lang.String, byte[], java.lang.String), whatever its status: the low-level escape hatch for routes the typed methods do not cover.WhatGET /readyanswers: readiness probe.One element ofrecipients.One element ofrecipients.A recipient kind forPOST /v2/multi-recipient/encrypt.What aResponseListenerlearns about one HTTP response: never a body.Observes every HTTP response the client receives, retried attempts included: for metrics, quota tracking (X-Tenant-RateLimit-*) or tests.Automatic retries of transient failures; off by default (maxRetries = 0).The body ofPOST /v2/sealedbox/open.The body ofPOST /v2/sealedbox/seal-pq.The body ofPOST /v2/sealedbox/seal.WhatPOST /v2/sealedbox/sealanswers: anonymous public-key encryption (X25519 sealed box).The body ofPOST /v2/secretbox/open.The body ofPOST /v2/secretbox/seal.WhatPOST /v2/secretbox/sealanswers: encrypt with XChaCha20-Poly1305 (secretbox seal).WhatGET /answers: service metadata.The body ofPOST /v2/sign.WhatPOST /v2/signanswers: sign with Ed25519.The body ofPOST /v2/pq/slh-dsa/keygen.WhatPOST /v2/pq/slh-dsa/keygenanswers: generate a server-held SLH-DSA key pair (FIPS 205).WhatPOST /v2/pq/slh-dsa/signanswers: sign with SLH-DSA (FIPS 205).An SLH-DSA (FIPS 205) parameter set.The body ofPOST /v2/pq/slh-dsa/verify.WhatPOST /v2/pq/slh-dsa/verifyanswers: verify with SLH-DSA (FIPS 205).The body ofPOST /v2/stream/multi-pq-decrypt.WhatPOST /v2/stream/multi-pq-decryptanswers: decrypt multi-recipient stream with server-held hybrid post-quantum key.The body ofPOST /v2/stream/multi-pq-encrypt.WhatPOST /v2/stream/multi-pq-encryptanswers: encrypt stream for multiple recipients with hybrid post-quantum AEAD.The body ofPOST /v2/stream/pq-decrypt.WhatPOST /v2/stream/pq-decryptanswers: decrypt stream with server-held hybrid post-quantum key.The body ofPOST /v2/stream/pq-encrypt.WhatPOST /v2/stream/pq-encryptanswers: encrypt stream with hybrid post-quantum AEAD.One element ofrecipients.One element ofsignatures.One element ofitems.The body ofPOST /v2/stream/sign.WhatPOST /v2/stream/signanswers: batch sign messages with sub-millisecond throughput.One element ofitems.One element ofresults.The body ofPOST /v2/stream/verify.WhatPOST /v2/stream/verifyanswers: batch verify digital signatures.No usable answer arrived: the connection failed, an attempt or the overall deadline timed out, the calling thread was interrupted, or a 2xx body could not be decoded.ThetrustedKeysmember.One field that failed validation, in avalidation-failedproblem.The body ofPOST /v2/verify.WhatPOST /v2/verifyanswers: verify an Ed25519 signature.