Documentation Index
Fetch the complete documentation index at: https://mintlify.com/lamassuiot/lamassuiot/llms.txt
Use this file to discover all available pages before exploring further.
Sign Message
Sign a message or digest using the specified key.Key identifier
Request Body
Signature algorithm to use:
SHA256WithRSA- RSA with SHA-256SHA384WithRSA- RSA with SHA-384SHA512WithRSA- RSA with SHA-512SHA256WithECDSA- ECDSA with SHA-256SHA384WithECDSA- ECDSA with SHA-384SHA512WithECDSA- ECDSA with SHA-512Ed25519- Ed25519 signature
Message to sign (base64 encoded)
Type of message:
RAW- Raw message (will be hashed by the KMS)DIGEST- Pre-computed message digest
Response
Base64 encoded signature
Example Request - Sign Raw Message
Example Request - Sign Digest
Example Response
Verify Signature
Verify a signature against a message using the specified key.Key identifier (must contain the public key)
Request Body
Signature algorithm used (same values as Sign Message)
Original message (base64 encoded)
Signature to verify (base64 encoded)
Type of message:
RAW or DIGESTResponse
Whether the signature is valid
Error message if validation failed (empty string if successful)
Example Request
Example Response - Valid Signature
Example Response - Invalid Signature
Signature Algorithms by Key Type
RSA Keys
Supported signature algorithms:SHA256WithRSA- Recommended for most use casesSHA384WithRSA- Higher securitySHA512WithRSA- Maximum security
ECDSA Keys
Supported signature algorithms:SHA256WithECDSA- For P-256 keysSHA384WithECDSA- For P-384 keysSHA512WithECDSA- For P-521 keys
Ed25519 Keys
Supported signature algorithms:Ed25519- Native Ed25519 signature (no separate hash algorithm needed)
Common Use Cases
Certificate Signing
Firmware Signing
Document Signing
Signature Verification
Best Practices
Choose Appropriate Hash Algorithm
Choose Appropriate Hash Algorithm
- SHA-256: Standard choice for most applications
- SHA-384/512: Use when security requirements demand higher resistance to collisions
- Match hash strength to key strength (e.g., SHA-256 for 2048-bit RSA, SHA-384 for 3072-bit RSA)
RAW vs DIGEST Message Type
RAW vs DIGEST Message Type
- RAW: Use when you want the KMS to handle hashing. Simpler and less error-prone.
- DIGEST: Use when:
- You’re signing very large data (hash locally to reduce network transfer)
- You need to match existing signature formats
- You’re implementing specific protocols that require pre-hashing
Signature Verification
Signature Verification
- Always verify signatures using the same algorithm used for signing
- Ensure message encoding (base64) is consistent between signing and verification
- For certificate validation, verify the entire chain, not just the leaf certificate
Performance Optimization
Performance Optimization
- For large files, compute the digest locally and use
message_type: "DIGEST" - Cache public keys for verification to avoid repeated API calls
- Consider batching signature operations when possible
Security Considerations
Security Considerations
- Never expose private keys - always use KMS operations
- Rotate signing keys according to your security policy
- Use HSM-backed engines (AWS KMS, Vault, PKCS#11) for critical signing operations
- Implement proper access controls on signing keys
- Log all signing operations for audit purposes
Error Handling
Common errors when performing cryptographic operations:Invalid Key ID
GET /keys/{id}
Algorithm Mismatch
SHA256WithRSA for RSA keys, SHA256WithECDSA for ECDSA keys)
Invalid Message Format
Signature Verification Failed
- Wrong message or signature
- Algorithm mismatch
- Message encoding issue
- Corrupted signature data
