# All Things Oracle Database Encryption

- URL: https://www.integrigy.com/security-resources/all-things-oracle-database-encryption
- Published: 2016-01-23
- Type: Webinar
- Products: Oracle Database
- Focus areas: Encryption
- Applies to: DB 11g, DB 12c
- PDF: https://www.integrigy.com/sites/default/files/Integrigy%20All%20Things%20Oracle%20Database%20Encryption%20v1_0.pdf
- Recording: https://www.youtube.com/watch?v=s_swBezkNW8

> Webinar on Oracle Database encryption at the storage, application, network and backup layers, with the benefits, pitfalls, performance impact and key management issues of each option.

Encrypting data is a useful tool to protect sensitive data at rest, in motion or in use, and for an Oracle Database it can be done at the storage, application, network and backup layers. Implementing database encryption can be time-consuming and difficult, with performance considerations and challenges such as effective key management for each solution.

We start with what counts as sensitive data and where it hides, then examine the Oracle Database encryption technologies and deployment options, from Transparent Data Encryption (TDE) to application, view and trigger encryption and SQL*Net encryption, with the benefits and pitfalls of each and how to audit them. DBAs and security teams can then choose where and how to encrypt.

## Key Points

- Oracle TDE, licensed with the Advanced Security Option, needs no application changes and protects only data at rest, such as a stolen disk, database file or backup tape: it is not an access control tool, an authenticated user sees no change, and it does not protect against malicious privileged employees, since DBAs have full access.
- Encrypt standard application columns such as `NATIONAL_IDENTIFIER` in `HR.PER_ALL_PEOPLE_F` in place with `ALTER TABLE`, without SALT if the column is indexed, and custom tablespaces or the whole database with tablespace encryption, which needs an export and import but allows index range scans and keeps data encrypted when joins and sorts move it to temporary tablespaces.
- TDE costs CPU, not disk I/O, and AES-NI processors accelerate it: several customers saw a 5% to 20% CPU impact from column encryption and one saw 5% to 10% from tablespace encryption on high-volume tables, but with column encryption a range scan on an indexed column, or a join on encrypted columns, means full table scans.
- Keep the wallet out of the database backups but back it up and protect its file permissions, or use a hardware security module (HSM), which TDE is fully certified to use, avoid PKI certificates for the master key, encrypt large volumes into a new tablespace and shred the old one, and audit with `dba_encrypted_columns` and `dba_tablespaces`.
- For data in use, the application, or views for reads and triggers for writes, call encryption routines that check security, such as `DBMS_CRYPTO`, which has no key management, never the deprecated `DBMS_OBFUSCATION_TOOLKIT` or custom routines, and keys must not be hard-coded in wrapped PL/SQL, as is fairly common even in packaged applications.
- SQL*Net encryption, now included with the database rather than the Advanced Security Option, is set in `sqlnet.ora` by `SQLNET.ENCRYPTION_SERVER` and `SQLNET.ENCRYPTION_CLIENT`, which should be `REQUIRED` where encryption is required, using only AES and 3DES; `v$session_connect_info` shows which sessions are encrypted, and encryption may blind database auditing tools used in network tap mode.
