Download OpenAPI specification:
A self-hosted engine for computing on encrypted data. Clients keep their TFHE client key; the server evaluates on ciphertexts with the server key they upload. Every error is {"error": {"code", "message"}}.
{- "checks": {
- "database": "ok",
- "job_store": "ok",
- "key_store": "ok",
- "workers": "2/2"
}, - "status": "ready"
}{- "config": "ConfigBuilder::default() + PARAM_PKE_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M128",
- "integer_type": "FheUint16",
- "integer_types": [
- "u8"
], - "library": "TFHE-rs",
- "max_batch_jobs": 0,
- "max_ciphertext_bytes": 0,
- "max_inputs": 0,
- "max_job_input_bytes": 0,
- "max_keys_per_user": 0,
- "max_program_outputs": 0,
- "max_program_steps": 0,
- "max_server_key_bytes": 0,
- "max_table_entries": 0,
- "operations": [
- "add"
], - "plaintext_modulus": 0,
- "proofs": {
- "crs_sha256": "string",
- "max_bits": 0,
- "max_list_bytes": 0,
- "max_public_key_bytes": 0,
- "metadata_prefix": "he-engine/proof/v1/"
}, - "scheme": "TFHE (CGGI)",
- "tfhe_version": "1.8.2"
}| code required | string |
{- "code": "string"
}{- "expires_in": 0,
- "token": "string",
- "user": {
- "created_at": "2019-08-24T14:15:22Z",
- "email": "string",
- "id": "string"
}
}| email required | string |
| password required | string |
{- "email": "string",
- "password": "string"
}{- "expires_in": 0,
- "token": "string",
- "user": {
- "created_at": "2019-08-24T14:15:22Z",
- "email": "string",
- "id": "string"
}
}{- "expires_in": 0,
- "token": "string",
- "user": {
- "created_at": "2019-08-24T14:15:22Z",
- "email": "string",
- "id": "string"
}
}| email required | string |
| password required | string |
{- "email": "string",
- "password": "string"
}{- "message": "string"
}| new_password required | string |
| token required | string |
{- "new_password": "string",
- "token": "string"
}{- "message": "string"
}| token | string |
{- "error": {
- "code": "not_found",
- "message": "string"
}
}| token required | string |
{- "token": "string"
}{- "expires_in": 0,
- "token": "string",
- "user": {
- "created_at": "2019-08-24T14:15:22Z",
- "email": "string",
- "id": "string"
}
}| password required | string |
{- "password": "string"
}{- "message": "string"
}{- "created_at": "2019-08-24T14:15:22Z",
- "daily_usage": {
- "count": 0,
- "date": "string",
- "quota": 0
}, - "email": "string",
- "email_verified": true,
- "has_password": true,
- "id": "string",
- "oauth_providers": [
- "string"
]
}| current_password required | string |
| new_password required | string |
{- "current_password": "string",
- "new_password": "string"
}{- "message": "string"
}[- {
- "created_at": "2019-08-24T14:15:22Z",
- "has_public_key": true,
- "id": "string",
- "sha256": "string",
- "size_bytes": 0,
- "supports_compression": true,
- "supports_proofs": true
}
]A safe_serialized TFHE-rs CompressedServerKey for the parameters of /he/params
{- "created_at": "2019-08-24T14:15:22Z",
- "has_public_key": true,
- "id": "string",
- "sha256": "string",
- "size_bytes": 0,
- "supports_compression": true,
- "supports_proofs": true
}| id required | string Key id |
A safe_serialized TFHE-rs CompactPublicKey (at most proofs.max_public_key_bytes)
{- "created_at": "2019-08-24T14:15:22Z",
- "has_public_key": true,
- "id": "string",
- "sha256": "string",
- "size_bytes": 0,
- "supports_compression": true,
- "supports_proofs": true
}| cursor | string
|
| limit | integer <int32> [ 1 .. 100 ] Jobs per page (default 20). |
{- "data": [
- {
- "attempts": 0,
- "compressed_results": true,
- "created_at": "2019-08-24T14:15:22Z",
- "error_message": "string",
- "finished_at": "2019-08-24T14:15:22Z",
- "id": "string",
- "input_bytes": 0,
- "input_count": 0,
- "integer_type": "u8",
- "key_id": "string",
- "operation": "add",
- "program": {
- "outputs": [
- 0
], - "steps": [
- {
- "args": [
- {
- "input": 0
}
], - "op": "add",
- "table": [
- {
- "key": "string",
- "value": "string"
}
]
}
]
}, - "proven": true,
- "result_bytes": 0,
- "result_type": "bool",
- "result_types": [
- "bool"
], - "scalar": "string",
- "started_at": "2019-08-24T14:15:22Z",
- "status": "pending"
}
], - "next_cursor": "string"
}Honours an Idempotency-Key header: resending the same request with the same
key returns the original job (with Idempotent-Replayed: true) instead of
queuing and charging a second one.
| Idempotency-Key | string or null 1-255 visible ASCII characters. A retry with the same key and body returns the original job instead of queuing (and charging) another. |
| compress_results | boolean Return the results as one TFHE-rs |
| inputs | Array of strings Standard base64 of |
| integer_type | string (IntegerType) Enum: "u8" "u16" "u32" "u64" "i8" "i16" "i32" "i64" The inputs' type; |
| key_id required | string One of the caller's registered server keys. |
| operation required | string (Operation) Enum: "add" "subtract" "multiply" "min" "max" "eq" "ne" "lt" "le" "gt" "ge" "sum" "program" Homomorphic operations. Arithmetic wraps modulo 2^bits of the input type; comparisons return an encrypted boolean. Every operation except |
Program (object) or null | |
| proven_inputs | string or null Standard base64 of one |
| scalar | string or null A plaintext right-hand operand in decimal, e.g. |
{- "compress_results": true,
- "inputs": [
- "string"
], - "integer_type": "u8",
- "key_id": "string",
- "operation": "add",
- "program": {
- "outputs": [
- 0
], - "steps": [
- {
- "args": [
- {
- "input": 0
}
], - "op": "add",
- "table": [
- {
- "key": "string",
- "value": "string"
}
]
}
]
}, - "proven_inputs": "string",
- "scalar": "string"
}{- "attempts": 0,
- "compressed_results": true,
- "created_at": "2019-08-24T14:15:22Z",
- "error_message": "string",
- "finished_at": "2019-08-24T14:15:22Z",
- "id": "string",
- "input_bytes": 0,
- "input_count": 0,
- "integer_type": "u8",
- "key_id": "string",
- "operation": "add",
- "program": {
- "outputs": [
- 0
], - "steps": [
- {
- "args": [
- {
- "input": 0
}
], - "op": "add",
- "table": [
- {
- "key": "string",
- "value": "string"
}
]
}
]
}, - "proven": true,
- "result_bytes": 0,
- "result_type": "bool",
- "result_types": [
- "bool"
], - "scalar": "string",
- "started_at": "2019-08-24T14:15:22Z",
- "status": "pending"
}With an Idempotency-Key, job i is keyed <key>/<i>: resending the batch
returns the original jobs.
| Idempotency-Key | string or null 1-255 visible ASCII characters, for the whole batch. A retry with the same key and body returns the original jobs. |
required | Array of objects (CreateJobRequest) 1 to |
{- "jobs": [
- {
- "compress_results": true,
- "inputs": [
- "string"
], - "integer_type": "u8",
- "key_id": "string",
- "operation": "add",
- "program": {
- "outputs": [
- 0
], - "steps": [
- {
- "args": [
- {
- "input": 0
}
], - "op": "add",
- "table": [
- {
- "key": "string",
- "value": "string"
}
]
}
]
}, - "proven_inputs": "string",
- "scalar": "string"
}
]
}{- "jobs": [
- {
- "attempts": 0,
- "compressed_results": true,
- "created_at": "2019-08-24T14:15:22Z",
- "error_message": "string",
- "finished_at": "2019-08-24T14:15:22Z",
- "id": "string",
- "input_bytes": 0,
- "input_count": 0,
- "integer_type": "u8",
- "key_id": "string",
- "operation": "add",
- "program": {
- "outputs": [
- 0
], - "steps": [
- {
- "args": [
- {
- "input": 0
}
], - "op": "add",
- "table": [
- {
- "key": "string",
- "value": "string"
}
]
}
]
}, - "proven": true,
- "result_bytes": 0,
- "result_type": "bool",
- "result_types": [
- "bool"
], - "scalar": "string",
- "started_at": "2019-08-24T14:15:22Z",
- "status": "pending"
}
]
}| id required | string Job id |
{- "attempts": 0,
- "compressed_results": true,
- "created_at": "2019-08-24T14:15:22Z",
- "error_message": "string",
- "finished_at": "2019-08-24T14:15:22Z",
- "id": "string",
- "input_bytes": 0,
- "input_count": 0,
- "integer_type": "u8",
- "key_id": "string",
- "operation": "add",
- "program": {
- "outputs": [
- 0
], - "steps": [
- {
- "args": [
- {
- "input": 0
}
], - "op": "add",
- "table": [
- {
- "key": "string",
- "value": "string"
}
]
}
]
}, - "proven": true,
- "result_bytes": 0,
- "result_type": "bool",
- "result_types": [
- "bool"
], - "scalar": "string",
- "started_at": "2019-08-24T14:15:22Z",
- "status": "pending"
}| id required | string Job id |
| output | integer >= 0 Which result (0-based; default 0), for a program with several outputs. A compressed job has one list holding them all: output 0. |
{- "error": {
- "code": "not_found",
- "message": "string"
}
}