Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add bulk decryption API /v1/key/bulk/decrypt #210

Merged
merged 1 commit into from
Mar 22, 2022
Merged

Commits on Mar 22, 2022

  1. add bulk decryption API /v1/key/bulk/decrypt

    This commit adds a new bulk API:
    ```
    /v1/key/bulk/decrypt
    ```
    
    Now, a client can request the corresponding
    plaintext / context pairs for multiple
    ciphertext / context pairs in a single call.
    
    Before, a client had to send each plaintext / context
    pair to the server using the `/v1/key/decrypt` API.
    
    The new bulk API expects an array of ciphertext / context
    pairs. Each context is still optional but must match
    the context used during encryption:
    ```json
    [
      {
        "ciphertext": "...",
        "context":"..."
      },
      {
        "ciphertext":"..."
      },
      {
        "ciphertext":"...",
        "context":"..."
      }
    ]
    ```
    
    It will respond either with an array of plaintexts
    or the first decryption error. It only returns
    plaintexts if and only if it decrypted
    all ciphertexts successfully.
    ```json
    [
      {
        "plaintext": "...",
      },
      {
        "plaintext":"..."
      },
      {
        "plaintext":"...",
      }
    ]
    ```
    
    At the moment, the `/v1/key/bulk/decrypt` API limits
    the number of ciphertext / context pairs to `1000`
    within a single API call.
    
    Signed-off-by: Andreas Auernhammer <hi@aead.dev>
    aead committed Mar 22, 2022
    Configuration menu
    Copy the full SHA
    384bfcf View commit details
    Browse the repository at this point in the history