Module Values.SignResponseSource

Creates a digital signature for a message or message digest by using the private key in an asymmetric signing KMS key. To verify the signature, use the Verify operation, or use the public key in the same asymmetric KMS key outside of KMS. For information about asymmetric KMS keys, see Asymmetric KMS keys in the Key Management Service Developer Guide. Digital signatures are generated and verified by using asymmetric key pair, such as an RSA, ECC, or ML-DSA pair that is represented by an asymmetric KMS key. The key owner (or an authorized user) uses their private key to sign a message. Anyone with the public key can verify that the message was signed with that particular private key and that the message hasn't changed since it was signed. To use the Sign operation, provide the following information: Use the KeyId parameter to identify an asymmetric KMS key with a KeyUsage value of SIGN_VERIFY. To get the KeyUsage value of a KMS key, use the DescribeKey operation. The caller must have kms:Sign permission on the KMS key. Use the Message parameter to specify the message or message digest to sign. You can submit messages of up to 4096 bytes. To sign a larger message, generate a hash digest of the message, and then provide the hash digest in the Message parameter. To indicate whether the message is a full message, a digest, or an ML-DSA EXTERNAL_MU, use the MessageType parameter. Choose a signing algorithm that is compatible with the KMS key. When signing a message, be sure to record the KMS key and the signing algorithm. This information is required to verify the signature. Best practices recommend that you limit the time during which any signature is effective. This deters an attack where the actor uses a signed message to establish validity repeatedly or long after the message is superseded. Signatures do not include a timestamp, but you can include a timestamp in the signed message to help you detect when its time to refresh the signature. To verify the signature that this operation generates, use the Verify operation. Or use the GetPublicKey operation to download the public key and then use the public key to verify the signature outside of KMS. The KMS key that you use for this operation must be in a compatible key state. For details, see Key states of KMS keys in the Key Management Service Developer Guide. Cross-account use: Yes. To perform this operation with a KMS key in a different Amazon Web Services account, specify the key ARN or alias ARN in the value of the KeyId parameter. Required permissions: kms:Sign (key policy) Related operations: Verify Eventual consistency: The KMS API follows an eventual consistency model. For more information, see KMS eventual consistency.

Sourcetype nonrec t = {
  1. keyId : KeyIdType.t option;
    (*

    The Amazon Resource Name (key ARN) of the asymmetric KMS key that was used to sign the message.

    *)
  2. signature : CiphertextType.t option;
    (*

    The cryptographic signature that was generated for the message. When used with the supported RSA signing algorithms, the encoding of this value is defined by PKCS #1 in RFC 8017. When used with the ECDSA_SHA_256, ECDSA_SHA_384, or ECDSA_SHA_512 signing algorithms, this value is a DER-encoded object as defined by ANSI X9.62–2005 and RFC 3279 Section 2.2.3. This is the most commonly used signature format and is appropriate for most uses. When you use the HTTP API or the Amazon Web Services CLI, the value is Base64-encoded. Otherwise, it is not Base64-encoded.

    *)
  3. signingAlgorithm : SigningAlgorithmSpec.t option;
    (*

    The signing algorithm that was used to sign the message.

    *)
}
Sourcetype nonrec error = [
  1. | `DependencyTimeoutException of DependencyTimeoutException.t
  2. | `DisabledException of DisabledException.t
  3. | `DryRunOperationException of DryRunOperationException.t
  4. | `InvalidGrantTokenException of InvalidGrantTokenException.t
  5. | `InvalidKeyUsageException of InvalidKeyUsageException.t
  6. | `KMSInternalException of KMSInternalException.t
  7. | `KMSInvalidStateException of KMSInvalidStateException.t
  8. | `KeyUnavailableException of KeyUnavailableException.t
  9. | `NotFoundException of NotFoundException.t
  10. | `Unknown_operation_error of string * string option
]
Sourceval make : ?keyId:??? -> ?signature:??? -> ?signingAlgorithm:??? -> unit -> t
Sourceval error_of_json : string -> Yojson.Safe.t -> [> `DependencyTimeoutException of DependencyTimeoutException.t | `DisabledException of DisabledException.t | `DryRunOperationException of DryRunOperationException.t | `InvalidGrantTokenException of InvalidGrantTokenException.t | `InvalidKeyUsageException of InvalidKeyUsageException.t | `KMSInternalException of KMSInternalException.t | `KMSInvalidStateException of KMSInvalidStateException.t | `KeyUnavailableException of KeyUnavailableException.t | `NotFoundException of NotFoundException.t | `Unknown_operation_error of string * string option ]
Sourceval error_of_xml : string -> Awso.Xml.t -> [> `DependencyTimeoutException of DependencyTimeoutException.t | `DisabledException of DisabledException.t | `DryRunOperationException of DryRunOperationException.t | `InvalidGrantTokenException of InvalidGrantTokenException.t | `InvalidKeyUsageException of InvalidKeyUsageException.t | `KMSInternalException of KMSInternalException.t | `KMSInvalidStateException of KMSInvalidStateException.t | `KeyUnavailableException of KeyUnavailableException.t | `NotFoundException of NotFoundException.t | `Unknown_operation_error of string * string option ]
Sourceval error_to_json : error -> Yojson.Safe.t
Sourceval to_value : t -> [> `Structure of (string * [> `Blob of CiphertextType.t | `Enum of string | `String of KeyIdType.t ]) list ]
Sourceval to_query : t -> Awso.Client.Query.t
Sourceval of_xml : Awso.Xml.t -> t
Sourceval of_string : string -> t
Sourceval of_json : Yojson.Safe.t -> t
Sourceval to_json : t -> Yojson.Safe.t