Article · 8 min read
BYOK before the roadmap: wrapping AES-256 keys with RSA-3072
A customer wanted to hold their own keys for a SaaS platform before the vendor supported it natively. How key wrapping makes that safe, and why the key never travels in the clear.
Bring-your-own-key sounds like a feature you wait for. Sometimes you cannot. A customer needed to control the encryption keys for a SaaS security platform while the product's native BYOK was still on the roadmap, so we built the bridge ourselves.
The core idea is key wrapping. You never upload a key in plaintext. The customer's key management platform, CipherTrust Manager in this case, generates an AES-256 data key. That key is then wrapped, which is to say encrypted, with an RSA-3072 public key that belongs to the destination platform. Only the destination's matching private key can unwrap it, so the key material is protected the entire way across the wire and at rest in transit.
The utility that did this was a small Java 17 program using the CADP library to talk to CipherTrust Manager and REST calls to the SaaS side, in this case Palo Alto Cortex XSIAM. Generate the AES-256 key in the HSM-backed manager, fetch the destination's RSA-3072 wrapping key, wrap, upload, and record. Rotation was built in from the start, because a BYOK story without rotation is half a story.
Two things made it defensible. First, the plaintext key never existed outside the key manager; wrapping happened against a public key, so there was nothing sensitive to leak in the tool itself. Second, rotation and revocation were real operations, not a promise, which is what let the customer sign off without waiting for the vendor roadmap.
The lesson generalises. When a platform cannot yet hold your keys the way you need, wrapping is usually the mechanism that lets you do it safely in the meantime, as long as you treat rotation and auditability as part of the build rather than a later phase.
Keep going
There's usually a recorded series on this.
I work through these topics hands-on in the training series, free to watch.