Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Sovereign, high-performance data protection

Sign

Sign and SignatureVerify: key check, then signature generation or verification

Specification

The Sign operation requests the server to generate a digital signature for the provided data using a specified Managed Object.

The request contains the unique identifier of the signing key, data to be signed (or already digested data), and cryptographic parameters. The signature is computed using the specified signing key and cryptographic parameters.

The SignatureVerify operation validates a digital signature against provided data using a specified verification key.

Implementation

The Eviden KMS server supports signing with RSA and EC private keys, as well as OpenPGP keys (PGPKey, non-FIPS mode). The signature algorithms supported include:

  • RSA-PKCS#1 v1.5 with SHA-256, SHA-384, SHA-512
  • RSA-PSS with SHA-256, SHA-384, SHA-512
  • ECDSA with SHA-256, SHA-384, SHA-512
  • Ed25519 (signature verification only for imported keys)
  • OpenPGP detached signatures (SHA-256, RSA or Ed25519)

An RSA key used with a non-RSA Digital Signature Algorithm returns Unsupported_Cryptographic_Parameters. A key whose Cryptographic Usage Mask lacks Sign returns Incompatible_Cryptographic_Usage_Mask, an object of the wrong type Invalid_Object_Type, and a key that is not Active Wrong_Key_Lifecycle_State. Signature Verify also accepts Deactivated and Compromised keys.

Example - Sign with RSA Private Key

Sign data using an RSA private key with SHA-256.

Note: Sign and SignatureVerify operations are available through the KMIP JSON API endpoint but not directly exposed through CLI subcommands. Use direct HTTP requests to the /kmip/2_1 endpoint.

{
  "tag": "Sign",
  "type": "Structure",
  "value": [
    {
      "tag": "UniqueIdentifier",
      "type": "TextString",
      "value": "9382bfec-bd6c-46ed-8f00-90b467f77a15"
    },
    {
      "tag": "CryptographicParameters",
      "type": "Structure",
      "value": [
        {
          "tag": "DigitalSignatureAlgorithm",
          "type": "Enumeration",
          "value": "SHA256WithRSAEncryption"
        }
      ]
    },
    {
      "tag": "Data",
      "type": "ByteString",
      "value": "48656C6C6F2C207369676E61747572652074657374"
    },
    {
      "tag": "InitIndicator",
      "type": "Boolean",
      "value": true
    },
    {
      "tag": "FinalIndicator",
      "type": "Boolean",
      "value": true
    }
  ]
}

Example - Signature Verification

Verify a signature using the corresponding public key.

{
  "tag": "SignatureVerify",
  "type": "Structure",
  "value": [
    {
      "tag": "UniqueIdentifier",
      "type": "TextString",
      "value": "9382bfec-bd6c-46ed-8f00-90b467f77a15_pk"
    },
    {
      "tag": "CryptographicParameters",
      "type": "Structure",
      "value": [
        {
          "tag": "DigitalSignatureAlgorithm",
          "type": "Enumeration",
          "value": "SHA256WithRSAEncryption"
        }
      ]
    },
    {
      "tag": "Data",
      "type": "ByteString",
      "value": "48656C6C6F2C207369676E61747572652074657374"
    },
    {
      "tag": "SignatureData",
      "type": "ByteString",
      "value": "3A4B5C6D7E8F901234567890ABCDEF1234567890ABCDEF1234567890ABCDEF12"
    },
    {
      "tag": "InitIndicator",
      "type": "Boolean",
      "value": true
    },
    {
      "tag": "FinalIndicator",
      "type": "Boolean",
      "value": true
    }
  ]
}

Usage via HTTP API

To use Sign and SignatureVerify operations, send HTTP POST requests to the /kmip/2_1 endpoint:

# Sign operation example
curl -X POST -H "Content-Type: application/json" \
      -d '{
        "tag": "RequestMessage",
        "value": [
          {
            "tag": "RequestHeader",
            "value": [
              {
                "tag": "ProtocolVersion",
                "value": [
                  {"tag": "ProtocolVersionMajor", "type": "Integer", "value": 2},
                  {"tag": "ProtocolVersionMinor", "type": "Integer", "value": 1}
                ]
              },
              {"tag": "BatchCount", "type": "Integer", "value": 1}
            ]
          },
          {
            "tag": "BatchItem",
            "value": [
              {"tag": "Operation", "type": "Enumeration", "value": "Sign"},
              {
                "tag": "RequestPayload",
                "value": [
                  {"tag": "UniqueIdentifier", "type": "TextString", "value": "your-key-id"},
                  {"tag": "Data", "type": "ByteString", "value": "48656C6C6F"}
                ]
              }
            ]
          }
        ]
      }' \
      http://localhost:9998/kmip/2_1

Streaming Support

Both Sign and SignatureVerify operations support multi-part requests for large data:

  • The InitIndicator: true request returns a 16-byte CorrelationValue; send it back unchanged with every later part, and set FinalIndicator: true on the last one.
  • InitIndicator and FinalIndicator together without a CorrelationValue make a single-part request.
  • Multi-part requests take Data, not DigestedData (Invalid_Field).
  • The input is buffered, up to 16 MiB per operation, 64 MiB per user and 256 MiB in total (Server_Limit_Exceeded).
  • For Signature Verify, SignatureData may be sent on the Init or the Final part; if it is still missing at the end the request fails with Invalid_Field.
  • An unknown or foreign CorrelationValue returns Invalid_Correlation_Value.
  • HSM keys and OpenPGP (PGPKey) keys do not support multi-part requests (Feature_Not_Supported).

Sign multi-part: Init, middle and Final parts with a Correlation Value