Cert EspressoLearn. Practise. Find your flow.

A LITTLE FOCUS.
A BIG NEXT STEP.

Your pace. Your space.
Oracle · OCI Foundations

Encryption and Vault

OCI Foundations · Lesson 13 of 15 · 1:34:30

YouTube loads only after you press play. This chapter opens at its timestamp in the full course. Watch on YouTube ↗

Learning with these videos? Subscribe for new courses and exam-style questions.

In this lesson

Prepare for the Oracle Cloud Infrastructure Foundations Associate exam (1Z0-1085-26). In this lesson: encryption at rest and in transit, OCI Vault, master keys and data encryption keys, HSM and software protection, key rotation, bring your own key, External Key Management, and secrets. Includes three original practice questions, with Kettlebrook Fitness, a fictional gym chain, as the example.

Study notes

The text of this lesson, to read at your own pace. Information as of November 2026.

Who holds the keys

Kettlebrook stores member names, addresses, and payment details in OCI. Its auditors ask three questions: is the data encrypted, who controls the keys, and where is the database password kept? This lesson covers encryption at rest and in transit, envelope encryption, vaults and keys, and secrets.

Encryption at rest and in transit

Encryption turns readable data, called plaintext, into ciphertext, which is useless without the right key. Data at rest is data that is stored: OCI encrypts block volumes, boot volumes, file systems, and objects with AES-256 by default, and there is no option to store them unencrypted. Data in transit is data that moves: your communications with OCI services use TLS by default, and for volumes attached to virtual machines, in-transit encryption is an option that you can turn on. Oracle manages the keys by default, and you can choose your own key in a vault instead.

Envelope encryption

Envelope encryption uses two levels of keys. A data encryption key encrypts your data, and a master encryption key encrypts that data key, like a letter in a sealed envelope. To read the data, a service must first work with the Key Management service, which decrypts the data key with the master key. And access to the master key is controlled by IAM policies, so OCI services cannot read your plaintext data without it.

Vaults

A vault is where the Key Management service creates and stores your keys. In a virtual private vault, your keys sit in an isolated partition of a hardware security module, or HSM, and you can back up the vault. Otherwise, a shared vault uses HSM partitions together with other vaults, and you pay for each key version as you need it. You choose the type when you create the vault, and you cannot change it afterward.

Keys and HSMs

Each vault holds master encryption keys. AES keys encrypt and decrypt data, RSA keys can encrypt and also sign, and ECDSA keys only sign. A key protected by an HSM is stored on the HSM, cannot be exported, and every operation with it runs on the HSM, while a software key is stored on a server. OCI uses HSMs certified to FIPS 140-2 Level 3: tamper-evident hardware that deletes its keys when it detects tampering. And a master key must be in the same region as the service that relies on it.

Rotation, secrets, and your own keys

Rotating a key creates a new key version, while the key keeps the same OCID. New data is encrypted with the new version, and older versions stay available to decrypt the data that they protected. In a virtual private vault, you can also schedule automatic rotation, every sixty to three hundred sixty-five days. Secrets, like database passwords, API keys, and tokens, are stored encrypted by a master key, so that they stay out of your code and configuration files. And for compliance, you can import your own key material, known as bring your own key, or keep your keys outside OCI with External Key Management.

Recap

Let's recap. OCI encrypts data at rest by default, and protects data in transit with TLS. Envelope encryption protects your data with a data key, and that data key with a master key. Vaults store master keys on FIPS 140-2 Level 3 HSMs, in a shared vault or a virtual private vault. Rotation creates new key versions with the same OCID, and older versions still decrypt. Secrets keep passwords and tokens out of your code, and bring your own key or External Key Management keeps your key material under your control.

Quick checks for this lesson

The 3 questions of this lesson, as plain text. The button above runs them with shuffled choices and the reason behind every choice.

  1. Kettlebrook’s auditor asks: with envelope encryption, what encrypts the data encryption key that protects the member files?

    • A TLS certificate
    • The master encryption key in a vault
    • The SSH key of the instance
    • A second data encryption key
    Show the answer

    The master encryption key in a vault

    In envelope encryption, a master encryption key, kept in a vault, encrypts the data encryption key. “A TLS certificate” would protect data in transit, not a stored key. “The SSH key of the instance” is only for signing in to a Linux instance. And “A second data encryption key” would only move the problem, since that second key would also need protection.

  2. Kettlebrook needs its keys in an isolated HSM partition, and wants to back up its vault. What should it create?

    • A shared vault with software keys
    • A security zone
    • A bucket with versioning
    • A virtual private vault
    Show the answer

    A virtual private vault

    A virtual private vault is an isolated partition of an HSM, and it can be backed up. “A shared vault with software keys” would share HSM partitions with other vaults, and software keys are not stored on an HSM. “A security zone” would deny unsafe operations, without storing any key. And “A bucket with versioning” would keep versions of objects, not encryption keys.

  3. Kettlebrook rotates the master key of its member database. What happens to the data that was encrypted with the previous key version?

    • It can still be decrypted with that older version
    • It is deleted with the old version
    • It becomes readable without any key
    • It must be decrypted before the rotation
    Show the answer

    It can still be decrypted with that older version

    After a rotation, older key versions no longer encrypt, but they stay available to decrypt the data that they protected. “It is deleted with the old version” is wrong, since a rotation does not delete any data. “It becomes readable without any key” would defeat the purpose of encryption. And “It must be decrypted before the rotation” is not needed, since the key keeps the same OCID and its older versions.