Create a key ring in a chosen location (region or global); key rings are permanent and cannot be deleted, so name them carefully
Create a symmetric encryption key within the key ring, selecting an algorithm (e.g., GOOGLE_SYMMETRIC_ENCRYPTION) and protection level (SOFTWARE or HSM)
Grant the service account the roles/cloudkms.cryptoKeyEncrypterDecrypter IAM role on the specific key, not the key ring or project, to enforce least privilege
To encrypt, base64-encode your plaintext and call projects/{project}/locations/{location}/keyRings/{ring}/cryptoKeys/{key}:encrypt via the REST API or client library, optionally supplying additionalAuthenticatedData
Store the returned ciphertext (base64-encoded) and, if used, the additionalAuthenticatedData alongside it
To decrypt, call the :decrypt endpoint with the ciphertext and the same additionalAuthenticatedData; the response contains the base64-encoded plaintext
Known gotchas
Key versions are immutable; to rotate, create a new key version and set it as primary — old versions remain available for decryption of previously encrypted data unless explicitly destroyed
Destroying a key version is irreversible and permanently prevents decryption of data encrypted under that version; maintain a data map before destroying any version
additionalAuthenticatedData must match exactly between encrypt and decrypt calls; a mismatch causes decryption failure with no indication of which field differs
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp