diff --git a/docs/getting_started/gateway/configuration.md b/docs/getting_started/gateway/configuration.md index 0e48ab86..3d0eb6f5 100644 --- a/docs/getting_started/gateway/configuration.md +++ b/docs/getting_started/gateway/configuration.md @@ -41,7 +41,7 @@ services: ``` **Zama Gateway** requires several specific configurations as shown in the provided `docker-compose-gateway.yml` file. - + | Variable | Description | Default Value | | --- | --- | --- | | GATEWAY__ETHEREUM__CHAIN_ID | Chain ID for fhEVM | 9000 | @@ -54,7 +54,8 @@ services: | GATEWAY__STORAGE__URL | URL for storage gateway | http://localhost:8088 | | ASC_CONN__BLOCKCHAIN__ADDRESSES | Blockchain addresses for ASC connection. Same as `GATEWAY__KMS__ADDRESS` | http://localhost:9090 | | GATEWAY__ETHEREUM__RELAYER_KEY | Private key of the relayer | 7ec931411ad75a7c201469a385d6f18a325d4923f9f213bd882bbea87e160b67 | - + + ## Steps for Running 1. Run the **Zama Gateway** Docker Compose: diff --git a/docs/references/gateway_api.md b/docs/references/gateway_api.md index ed033c91..9f1fd1a2 100644 --- a/docs/references/gateway_api.md +++ b/docs/references/gateway_api.md @@ -3,13 +3,13 @@ ## Endpoints
- GET /keys ---- Retrieve public key, CRS (for input proof) and bootstrap key files download URLs + GET /keyurl ---- Retrieve links for retrieving the public keys and CRS' in the system. #### Description -This endpoint returns a JSON object containing URLs from an S3 bucket, allowing the client to download key files such as the blockchain public key, CRS files for input proof generation, and the bootstrap key. +This endpoint returns a JSON object containing URLs from an S3 bucket, allowing the client to download key files such as the blockchain public key, CRS files for input proof generation, the bootstrap key, and the address and public verification keys for each of the MPC servers running the TKMS. -For each file, a list of cryptographic signatures is provided to ensure the integrity and authenticity of the downloaded content. These signatures are generated using a threshold signature scheme. This means that instead of needing all the signatures to validate the content, only a subset—specifically one-third of the total signatures (if n nodes are signing)—is required to verify that the content is legitimate. +For each file (with the exception of the verification key and address), a list of cryptographic signatures is provided to ensure the integrity and authenticity of the downloaded content. These signatures are generated using a threshold signature scheme. This means that instead of needing all the signatures to validate the content, only a subset, specifically >1/3 of the total signatures (if n nodes are signing), is required to verify that the content is legitimate. No query parameters are required, as the gateway is already preconfigured for a specific blockchain. @@ -31,34 +31,89 @@ The request is successful, and the response will include a JSON object with the ```json { - "keyId": "ab12cd", - "crsId": "34ef67", - "publicKey": { - "url": "https://s3.amazonaws.com/bucket-name/pubkey", - "signatures": [ - "a5d2...", - "a8cd...", - "c0ff..." + "response": { + "crs": { + "256": { + "data_id": "d8d94eb3a23d22d3eb6b5e7b694e8afcd571d906", + "param_choice": 1, + "signatures": [ + "0d13...", + "4250...", + "a42c...", + "fhb5..." + ], + "urls": [ + "https://s3.amazonaws.com/bucket-name-1/PUB-p1/CRS/d8d94eb3a23d22d3eb6b5e7b694e8afcd571d906", + "https://s3.amazonaws.com/bucket-name-4/PUB-p4/CRS/d8d94eb3a23d22d3eb6b5e7b694e8afcd571d906", + "https://s3.amazonaws.com/bucket-name-2/PUB-p2/CRS/d8d94eb3a23d22d3eb6b5e7b694e8afcd571d906", + "https://s3.amazonaws.com/bucket-name-3/PUB-p3/CRS/d8d94eb3a23d22d3eb6b5e7b694e8afcd571d906" + ] + } + }, + "fhe_key_info": [ + { + "fhe_public_key": { + "data_id": "408d8cbaa51dece7f782fe04ba0b1c1d017b1088", + "param_choice": 1, + "signatures": [ + "cdff...", + "123c...", + "00ff...", + "a367..." + ], + "urls": [ + "https://s3.amazonaws.com/bucket-name-1/PUB-p1/PublicKey/408d8cbaa51dece7f782fe04ba0b1c1d017b1088", + "https://s3.amazonaws.com/bucket-name-4/PUB-p4/PublicKey/408d8cbaa51dece7f782fe04ba0b1c1d017b1088", + "https://s3.amazonaws.com/bucket-name-2/PUB-p2/PublicKey/408d8cbaa51dece7f782fe04ba0b1c1d017b1088", + "https://s3.amazonaws.com/bucket-name-3/PUB-p3/PublicKey/408d8cbaa51dece7f782fe04ba0b1c1d017b1088" + ] + }, + "fhe_server_key": { + "data_id": "408d8cbaa51dece7f782fe04ba0b1c1d017b1088", + "param_choice": 1, + "signatures": [ + "839b...", + "baef...", + "55cc...", + "81a4..." + ], + "urls": [ + "https://s3.amazonaws.com/bucket-name-1/PUB-p1/ServerKey/408d8cbaa51dece7f782fe04ba0b1c1d017b1088", + "https://s3.amazonaws.com/bucket-name-4/PUB-p4/ServerKey/408d8cbaa51dece7f782fe04ba0b1c1d017b1088", + "https://s3.amazonaws.com/bucket-name-2/PUB-p2/ServerKey/408d8cbaa51dece7f782fe04ba0b1c1d017b1088", + "https://s3.amazonaws.com/bucket-name-3/PUB-p3/ServerKey/408d8cbaa51dece7f782fe04ba0b1c1d017b1088" + ] + } + } + ], + "verf_public_key": [ + { + "key_id": "408d8cbaa51dece7f782fe04ba0b1c1d017b1088", + "server_id": 1, + "verf_public_key_address": "https://s3.amazonaws.com/bucket-name-1/PUB-p1/VerfAddress/408d8cbaa51dece7f782fe04ba0b1c1d017b1088", + "verf_public_key_url": "https://s3.amazonaws.com/bucket-name-1/PUB-p1/VerfKey/408d8cbaa51dece7f782fe04ba0b1c1d017b1088" + }, + { + "key_id": "408d8cbaa51dece7f782fe04ba0b1c1d017b1088", + "server_id": 4, + "verf_public_key_address": "https://s3.amazonaws.com/bucket-name-4/PUB-p4/VerfAddress/408d8cbaa51dece7f782fe04ba0b1c1d017b1088", + "verf_public_key_url": "https://s3.amazonaws.com/bucket-name-4//PUB-p4/VerfKey/408d8cbaa51dece7f782fe04ba0b1c1d017b1088" + }, + { + "key_id": "408d8cbaa51dece7f782fe04ba0b1c1d017b1088", + "server_id": 2, + "verf_public_key_address": "https://s3.amazonaws.com/bucket-name-2/PUB-p2/VerfAddress/408d8cbaa51dece7f782fe04ba0b1c1d017b1088", + "verf_public_key_url": "https://s3.amazonaws.com/bucket-name-2/PUB-p2/VerfKey/408d8cbaa51dece7f782fe04ba0b1c1d017b1088" + }, + { + "key_id": "408d8cbaa51dece7f782fe04ba0b1c1d017b1088", + "server_id": 3, + "verf_public_key_address": "https://s3.amazonaws.com/bucket-name-3/PUB-p3/VerfAddress/408d8cbaa51dece7f782fe04ba0b1c1d017b1088", + "verf_public_key_url": "https://s3.amazonaws.com/bucket-name-3/PUB-p3/VerfKey/408d8cbaa51dece7f782fe04ba0b1c1d017b1088" + } ] }, - "bootstrapKey": { - "url": "https://s3.amazonaws.com/bucket-name/bootstrapkey", - "signatures": [ - "fd7a...", - "487b...", - "20fe..." - ] - }, - "crs": { - "2048": { - "url": "https://s3.amazonaws.com/bucket-name/crs", - "signatures": [ - "ffee...", - "012f...", - "1ab5..." - ] - } - } + "status": "success" } ```