sdkms.v1.apis.sign_and_verify_api module

Fortanix DSM REST API

This is a set of REST APIs for accessing the Fortanix Data Security Manager. This includes APIs for managing accounts, and for performing cryptographic and key management operations.

OpenAPI spec version: 1.0.0-20200608 Contact: support@fortanix.com Generated by: https://github.com/swagger-api/swagger-codegen.git

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

class sdkms.v1.apis.sign_and_verify_api.SignAndVerifyApi(api_client=None)[source]

Bases: object

__init__(api_client=None)[source]
batch_sign(body, async_call=False, **kwargs)[source]

The data to be signed and the key ids to be used are provided in the request body. The signature is returned in the response body. The ordering of the body matches the ordering of the request. An individual status code is returned for each batch item. Maximum size of the entire batch request is 512 KB.

Parameters:
  • async_call (bool) – Whether the call should be performed asynchronously. (Default is False).

  • body (BatchSignRequest) – Batch Sign request (required)

Return type:

BatchSignResponse

Returns:

If the method is called asynchronously, returns the request thread.

batch_verify(body, async_call=False, **kwargs)[source]

The signature to be verified and the key ids to be used are provided in the request body. The result (true of false) returned in the response body. The ordering of the body matches the ordering of the request. An individual status code is returned for each batch item. Maximum size of the entire batch request is 512 KB.

Parameters:
  • async_call (bool) – Whether the call should be performed asynchronously. (Default is False).

  • body (BatchVerifyRequest) – Batch Verify request (required)

Return type:

BatchVerifyResponse

Returns:

If the method is called asynchronously, returns the request thread.

sign(key_id, body, async_call=False, **kwargs)[source]

Sign data with a private key. The signing key must be an asymmetric key with the private part present. The sign operation must be enabled for this key. Symmetric keys may not be used to sign data. They can be used with the computeMac and verifyMac methods. <br> The data must be hashed with a SHA-1 or SHA-2 family hash algorithm.

Parameters:
  • async_call (bool) – Whether the call should be performed asynchronously. (Default is False).

  • key_id (str) – kid of security object (required)

  • body (SignRequest) – Signature request (required)

Return type:

SignResponse

Returns:

If the method is called asynchronously, returns the request thread.

sign_ex(body, async_call=False, **kwargs)[source]

Sign data with a private key. The signing key must be an asymmetric key with the private part present. The sign operation must be enabled for this key. Symmetric keys may not be used to sign data. They can be used with the computeMac and verifyMac methods. <br> The data must be hashed with a SHA-1 or SHA-2 family hash algorithm.

Parameters:
  • async_call (bool) – Whether the call should be performed asynchronously. (Default is False).

  • body (SignRequestEx) – Signature request (required)

Return type:

SignResponse

Returns:

If the method is called asynchronously, returns the request thread.

verify(key_id, body, async_call=False, **kwargs)[source]

Verify a signature with a public key. The verifying key must be an asymmetric key with the verify operation enabled. Symmetric keys may not be used to verify data. They can be used with the computeMac and verifyMac operations. <br> The signature must have been created with a SHA-1 or SHA-2 family hash algorithm.

Parameters:
  • async_call (bool) – Whether the call should be performed asynchronously. (Default is False).

  • key_id (str) – kid of security object (required)

  • body (VerifyRequest) – Verification request (required)

Return type:

VerifyResponse

Returns:

If the method is called asynchronously, returns the request thread.

verify_ex(body, async_call=False, **kwargs)[source]

Verify a signature with a public key. The verifying key must be an asymmetric key with the verify operation enabled. Symmetric keys may not be used to verify data. They can be used with the computeMac and verifyMac operations. <br> The signature must have been created with a SHA-1 or SHA-2 family hash algorithm.

Parameters:
  • async_call (bool) – Whether the call should be performed asynchronously. (Default is False).

  • body (VerifyRequestEx) – Verification request (required)

Return type:

VerifyResponse

Returns:

If the method is called asynchronously, returns the request thread.