SlideShare une entreprise Scribd logo
1  sur  23
Télécharger pour lire hors ligne
云和恩墨 成就所托 by 王朝阳 18516271611 sonne.k.wang@gmail.com
Transparent Data Encryption
云和恩墨 成就所托 by 王朝阳 18516271611 sonne.k.wang@gmail.com
Objectives
After completing this lesson, you should be able to do
the following:
• Describe the encryption options
• Generate random encryption keys
• Encrypt and decrypt table columns
• Encrypt tablespace
云和恩墨 成就所托 by 王朝阳 18516271611 sonne.k.wang@gmail.com
Overview
• Data encryption issues
• Data encryption challenges
• DBMS_CRYPTO package:
– Encrypts column data
– Decrypts column data
– Supercedes DBMS_OBFUSCATION_TOOLKIT
DBMS_CRYPTO
OKYMSEISPDTGA
MyCreditCardNum
CUST.CREDITCARD
云和恩墨 成就所托 by 王朝阳 18516271611 sonne.k.wang@gmail.com
Encryption Issues: Cost
• Encryption and decryption of data
– Accessibility
– Performance
• Management of encryption keys
– Secure transmission
– Administrative overhead
云和恩墨 成就所托 by 王朝阳 18516271611 sonne.k.wang@gmail.com
Encryption Issues: Access Control
Do not use encryption instead of access control.
• Strong data access mechanisms are available.
• Encryption must not interfere with access control.
云和恩墨 成就所托 by 王朝阳 18516271611 sonne.k.wang@gmail.com
Encryption Issues: Access
by Privileged Users
• DBAs can access all data. Limit and monitor the
DBA by:
– Using SYSOPER with limited privileges
– Creating junior DBA roles to limit access
– Auditing the actions of the DBA
– Running background checks on the DBAs
– Encrypting sensitive columns
• The system administrator has access to all data
files.
• Backup media may be compromised.
云和恩墨 成就所托 by 王朝阳 18516271611 sonne.k.wang@gmail.com
Encryption Issues: Do Not Encrypt
Everything
• Encrypting everything does not make data secure.
• Data is unavailable during key changes.
• Lost keys mean lost data.
• The management of keys becomes critical.
云和恩墨 成就所托 by 王朝阳 18516271611 sonne.k.wang@gmail.com
Data Encryption: Challenges
• Key management:
– Generation
– Changing
– Transmission
– Storage
• Encrypting special types of data:
– Indexed
– Large objects (LOBs)
云和恩墨 成就所托 by 王朝阳 18516271611 sonne.k.wang@gmail.com
Encryption Key Management:
Key Generation
Keys are generated with random numbers. Use an
approved random-number generator:
• DBMS_CRYPTO.RANDOMBYTES is based on RSA
x9.31 PRNG.
• DBMS_RANDOM is not approved.
• DBMS_OBFUSCATION_TOOLKIT.GETKEY is still
available.
云和恩墨 成就所托 by 王朝阳 18516271611 sonne.k.wang@gmail.com
Encryption Key Management: Key
Modification and Transmission
• Modify periodically, like you would a password:
– Reduce the possibility of brute force key discovery.
– Reencrypt the data.
• Transmit the keys in a secure manner:
– Electronic transmission (encrypt the key)
– Physical transmission
云和恩墨 成就所托 by 王朝阳 18516271611 sonne.k.wang@gmail.com
Encryption Key Management: Storage
Store the keys by using one of the following methods:
• Store the key in the database.
• Store the key in an operating system file.
• Let the user manage the key.
云和恩墨 成就所托 by 王朝阳 18516271611 sonne.k.wang@gmail.com
Storing the Key in the Database
The techniques for protecting keys in the database are:
• Store keys in a separate table.
• Perform additional data transformation.
• Wrap the PL/SQL package that performs the
encryption.
• Use a key per row.
• Combine the techniques.
云和恩墨 成就所托 by 王朝阳 18516271611 sonne.k.wang@gmail.com
Storing the Key in the Operating System
Use this method to restrict DBA access to the keys:
1. Set up the file storing the keys so that the DBA
does not have access to the file.
2. Retrieve the data from the database without
decrypting the data.
3. Decrypt the data in the application accessing the
data. The DBA must also be denied access to this
application.
云和恩墨 成就所托 by 王朝阳 18516271611 sonne.k.wang@gmail.com
Letting the User Manage the Key
User-managed keys have these problems:
• Users forget the key.
• Users archive the key in an insecure manner.
• Users must use secure transmission methods,
such as network encryption.
云和恩墨 成就所托 by 王朝阳 18516271611 sonne.k.wang@gmail.com
Encrypting Special Types of Data
• Indexed data:
– Encrypt the variable used to access the data
– Not supported
• Large objects (LOBs):
– Use the ENCRYPT procedure of the DBMS_CRYPTO
package.
云和恩墨 成就所托 by 王朝阳 18516271611 sonne.k.wang@gmail.com
Comparing DBMS_CRYPTO with
DBMS_OBFUSCATION_TOOLKIT
Package
Feature
DBMS_CRYPTO DBMS_OBFUSCATION_TOOLKIT
Cryptographic
algorithms
DES, 3DES, AES,
RC4,
3DES_2KEY
DES, 3DES
Database types RAW, CLOB,
BLOB
RAW, VARCHAR2
Block cipher
chaining modes
CBC, CFB, ECB,
OFB
CBC
Cryptographic
hash algorithms
MD5, SHA-1,
MD4
MD5
Keyed hash
(MAC)
algorithms
HMAC_MD5,
HMAC_SH1
None supported
云和恩墨 成就所托 by 王朝阳 18516271611 sonne.k.wang@gmail.com
DBMS_CRYPTO Package
• Functionality:
– Random-number generation for encryption keys
– Encryption and decryption by using various
algorithms
– Multiple cipher block chaining modes
– Multiple cryptographic hash algorithms
– Multiple padding forms
• Procedures and functions in the package include:
– RANDOMBYTES creates random keys.
– ENCRYPT to encrypt columns or LOBs
– DECRYPT to decrypt columns or LOBs
– HASH applies a hash algorithm to data.
云和恩墨 成就所托 by 王朝阳 18516271611 sonne.k.wang@gmail.com
Using ENCRYPT and DECRYPT
• ENCRYPT:
• DECRYPT:
encrypted_raw := dbms_crypto.Encrypt (
src => raw_input,
typ => dbms_crypto.DES3_CBC_PKCS5,
key => raw_key,
iv => NULL);
decrypted_raw := dbms_ crypto.Decrypt (
encrypted_raw,
dbms_crypto.DES3_CBC_PKCS5,
raw_key);
云和恩墨 成就所托 by 王朝阳 18516271611 sonne.k.wang@gmail.com
Using RANDOMBYTES
• Generate a key:
• Encrypt:
raw_key := dbms_crypto.randombytes (
number_bytes => 24);
encrypted_raw := dbms_crypto.encrypt (
src => raw_input,
typ => DBMS_CRYPTO.DES3_CBC_PKCS5
key => raw_key);
云和恩墨 成就所托 by 王朝阳 18516271611 sonne.k.wang@gmail.com
Enhanced Security Using
the Cipher Block Modes
Initial value
block
First block
Encrypt Encrypt
Next block
Encrypted
first block
Encrypted
next block
Cipher Block Chaining
云和恩墨 成就所托 by 王朝阳 18516271611 sonne.k.wang@gmail.com
Hash and Message Authentication Code
• DBMS_CRYPTO includes both HASH and Message
Authentication Code (MAC) functions.
• Both produce a one-way hash of an LOB or RAW.
• Use this hash to verify data integrity.
• MAC uses a secret key.
• Example:
encrypted_raw := dbms_crypto.Mac(
src => raw_input,
typ => DBMS_CRYPTO.HMAC_MD5,
key => raw_key);
云和恩墨 成就所托 by 王朝阳 18516271611 sonne.k.wang@gmail.com
Summary
In this lesson, you should have learned how to:
• Describe the encryption options available with
Oracle Database 10g
• Use DBMS_CRYPTO to:
– Generate random encryption keys
– Encrypt and decrypt table columns
云和恩墨 成就所托 by 王朝阳 18516271611 sonne.k.wang@gmail.com
Q&A

Contenu connexe

Plus de Zhaoyang Wang

海通证券金融云思考与实践(数据技术嘉年华2017)
海通证券金融云思考与实践(数据技术嘉年华2017)海通证券金融云思考与实践(数据技术嘉年华2017)
海通证券金融云思考与实践(数据技术嘉年华2017)Zhaoyang Wang
 
云管理平台助力海通金融云建设
云管理平台助力海通金融云建设云管理平台助力海通金融云建设
云管理平台助力海通金融云建设Zhaoyang Wang
 
海通证券数据库备份恢复云平台实践(OTN Tour Shanghai 2017)
海通证券数据库备份恢复云平台实践(OTN Tour Shanghai 2017)海通证券数据库备份恢复云平台实践(OTN Tour Shanghai 2017)
海通证券数据库备份恢复云平台实践(OTN Tour Shanghai 2017)Zhaoyang Wang
 
Oracle Compute Cloud Service快速实践
Oracle Compute Cloud Service快速实践Oracle Compute Cloud Service快速实践
Oracle Compute Cloud Service快速实践Zhaoyang Wang
 
Oracle Compute Cloud Service介绍
Oracle Compute Cloud Service介绍Oracle Compute Cloud Service介绍
Oracle Compute Cloud Service介绍Zhaoyang Wang
 
Oracle cloud 使用云市场快速搭建小型电商网站
Oracle cloud 使用云市场快速搭建小型电商网站Oracle cloud 使用云市场快速搭建小型电商网站
Oracle cloud 使用云市场快速搭建小型电商网站Zhaoyang Wang
 
Oracle cloud ravello介绍及测试账户申请
Oracle cloud ravello介绍及测试账户申请Oracle cloud ravello介绍及测试账户申请
Oracle cloud ravello介绍及测试账户申请Zhaoyang Wang
 
Oracle cloud 云介绍及测试账户申请
Oracle cloud 云介绍及测试账户申请Oracle cloud 云介绍及测试账户申请
Oracle cloud 云介绍及测试账户申请Zhaoyang Wang
 
New awesome features in MySQL 5.7
New awesome features in MySQL 5.7New awesome features in MySQL 5.7
New awesome features in MySQL 5.7Zhaoyang Wang
 
Performance Tuning Tool01-Statspack
Performance Tuning Tool01-StatspackPerformance Tuning Tool01-Statspack
Performance Tuning Tool01-StatspackZhaoyang Wang
 
SQL Tuning02-Intorduction to the CBO Optimizer
SQL Tuning02-Intorduction to the CBO OptimizerSQL Tuning02-Intorduction to the CBO Optimizer
SQL Tuning02-Intorduction to the CBO OptimizerZhaoyang Wang
 
SQL Tuning04-Interpreting Execution Plans
SQL Tuning04-Interpreting Execution PlansSQL Tuning04-Interpreting Execution Plans
SQL Tuning04-Interpreting Execution PlansZhaoyang Wang
 
SQL Tuning01-Introduction to SQL Tuning
SQL Tuning01-Introduction to SQL TuningSQL Tuning01-Introduction to SQL Tuning
SQL Tuning01-Introduction to SQL TuningZhaoyang Wang
 
MySQL Fulltext Search Tutorial
MySQL Fulltext Search TutorialMySQL Fulltext Search Tutorial
MySQL Fulltext Search TutorialZhaoyang Wang
 
Data Organization in InnoDB
Data Organization in InnoDBData Organization in InnoDB
Data Organization in InnoDBZhaoyang Wang
 
Oracle enterprise manager cloud control 12c release 5 installation on oracle ...
Oracle enterprise manager cloud control 12c release 5 installation on oracle ...Oracle enterprise manager cloud control 12c release 5 installation on oracle ...
Oracle enterprise manager cloud control 12c release 5 installation on oracle ...Zhaoyang Wang
 
Oracle enterprise manager cloud control 12c r5 agent installation
Oracle enterprise manager cloud control 12c r5 agent installationOracle enterprise manager cloud control 12c r5 agent installation
Oracle enterprise manager cloud control 12c r5 agent installationZhaoyang Wang
 
MYSQLCLONE Introduction
MYSQLCLONE IntroductionMYSQLCLONE Introduction
MYSQLCLONE IntroductionZhaoyang Wang
 
Interpreting execution plans
Interpreting execution plansInterpreting execution plans
Interpreting execution plansZhaoyang Wang
 

Plus de Zhaoyang Wang (20)

海通证券金融云思考与实践(数据技术嘉年华2017)
海通证券金融云思考与实践(数据技术嘉年华2017)海通证券金融云思考与实践(数据技术嘉年华2017)
海通证券金融云思考与实践(数据技术嘉年华2017)
 
云管理平台助力海通金融云建设
云管理平台助力海通金融云建设云管理平台助力海通金融云建设
云管理平台助力海通金融云建设
 
海通证券数据库备份恢复云平台实践(OTN Tour Shanghai 2017)
海通证券数据库备份恢复云平台实践(OTN Tour Shanghai 2017)海通证券数据库备份恢复云平台实践(OTN Tour Shanghai 2017)
海通证券数据库备份恢复云平台实践(OTN Tour Shanghai 2017)
 
Oracle Compute Cloud Service快速实践
Oracle Compute Cloud Service快速实践Oracle Compute Cloud Service快速实践
Oracle Compute Cloud Service快速实践
 
Oracle Compute Cloud Service介绍
Oracle Compute Cloud Service介绍Oracle Compute Cloud Service介绍
Oracle Compute Cloud Service介绍
 
Oracle cloud 使用云市场快速搭建小型电商网站
Oracle cloud 使用云市场快速搭建小型电商网站Oracle cloud 使用云市场快速搭建小型电商网站
Oracle cloud 使用云市场快速搭建小型电商网站
 
Oracle cloud ravello介绍及测试账户申请
Oracle cloud ravello介绍及测试账户申请Oracle cloud ravello介绍及测试账户申请
Oracle cloud ravello介绍及测试账户申请
 
Oracle cloud 云介绍及测试账户申请
Oracle cloud 云介绍及测试账户申请Oracle cloud 云介绍及测试账户申请
Oracle cloud 云介绍及测试账户申请
 
New awesome features in MySQL 5.7
New awesome features in MySQL 5.7New awesome features in MySQL 5.7
New awesome features in MySQL 5.7
 
Performance Tuning Tool01-Statspack
Performance Tuning Tool01-StatspackPerformance Tuning Tool01-Statspack
Performance Tuning Tool01-Statspack
 
SQL Tuning02-Intorduction to the CBO Optimizer
SQL Tuning02-Intorduction to the CBO OptimizerSQL Tuning02-Intorduction to the CBO Optimizer
SQL Tuning02-Intorduction to the CBO Optimizer
 
SQL Tuning04-Interpreting Execution Plans
SQL Tuning04-Interpreting Execution PlansSQL Tuning04-Interpreting Execution Plans
SQL Tuning04-Interpreting Execution Plans
 
SQL Tuning01-Introduction to SQL Tuning
SQL Tuning01-Introduction to SQL TuningSQL Tuning01-Introduction to SQL Tuning
SQL Tuning01-Introduction to SQL Tuning
 
MySQL Fulltext Search Tutorial
MySQL Fulltext Search TutorialMySQL Fulltext Search Tutorial
MySQL Fulltext Search Tutorial
 
Data Organization in InnoDB
Data Organization in InnoDBData Organization in InnoDB
Data Organization in InnoDB
 
Oracle enterprise manager cloud control 12c release 5 installation on oracle ...
Oracle enterprise manager cloud control 12c release 5 installation on oracle ...Oracle enterprise manager cloud control 12c release 5 installation on oracle ...
Oracle enterprise manager cloud control 12c release 5 installation on oracle ...
 
Oracle enterprise manager cloud control 12c r5 agent installation
Oracle enterprise manager cloud control 12c r5 agent installationOracle enterprise manager cloud control 12c r5 agent installation
Oracle enterprise manager cloud control 12c r5 agent installation
 
Why use MySQL
Why use MySQLWhy use MySQL
Why use MySQL
 
MYSQLCLONE Introduction
MYSQLCLONE IntroductionMYSQLCLONE Introduction
MYSQLCLONE Introduction
 
Interpreting execution plans
Interpreting execution plansInterpreting execution plans
Interpreting execution plans
 

Dernier

EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)Samir Dash
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAnitaRaj43
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMKumar Satyam
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityWSO2
 

Dernier (20)

EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by Anitaraj
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDM
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 

Oracle security 07-transparent data encryption

  • 1. 云和恩墨 成就所托 by 王朝阳 18516271611 sonne.k.wang@gmail.com Transparent Data Encryption
  • 2. 云和恩墨 成就所托 by 王朝阳 18516271611 sonne.k.wang@gmail.com Objectives After completing this lesson, you should be able to do the following: • Describe the encryption options • Generate random encryption keys • Encrypt and decrypt table columns • Encrypt tablespace
  • 3. 云和恩墨 成就所托 by 王朝阳 18516271611 sonne.k.wang@gmail.com Overview • Data encryption issues • Data encryption challenges • DBMS_CRYPTO package: – Encrypts column data – Decrypts column data – Supercedes DBMS_OBFUSCATION_TOOLKIT DBMS_CRYPTO OKYMSEISPDTGA MyCreditCardNum CUST.CREDITCARD
  • 4. 云和恩墨 成就所托 by 王朝阳 18516271611 sonne.k.wang@gmail.com Encryption Issues: Cost • Encryption and decryption of data – Accessibility – Performance • Management of encryption keys – Secure transmission – Administrative overhead
  • 5. 云和恩墨 成就所托 by 王朝阳 18516271611 sonne.k.wang@gmail.com Encryption Issues: Access Control Do not use encryption instead of access control. • Strong data access mechanisms are available. • Encryption must not interfere with access control.
  • 6. 云和恩墨 成就所托 by 王朝阳 18516271611 sonne.k.wang@gmail.com Encryption Issues: Access by Privileged Users • DBAs can access all data. Limit and monitor the DBA by: – Using SYSOPER with limited privileges – Creating junior DBA roles to limit access – Auditing the actions of the DBA – Running background checks on the DBAs – Encrypting sensitive columns • The system administrator has access to all data files. • Backup media may be compromised.
  • 7. 云和恩墨 成就所托 by 王朝阳 18516271611 sonne.k.wang@gmail.com Encryption Issues: Do Not Encrypt Everything • Encrypting everything does not make data secure. • Data is unavailable during key changes. • Lost keys mean lost data. • The management of keys becomes critical.
  • 8. 云和恩墨 成就所托 by 王朝阳 18516271611 sonne.k.wang@gmail.com Data Encryption: Challenges • Key management: – Generation – Changing – Transmission – Storage • Encrypting special types of data: – Indexed – Large objects (LOBs)
  • 9. 云和恩墨 成就所托 by 王朝阳 18516271611 sonne.k.wang@gmail.com Encryption Key Management: Key Generation Keys are generated with random numbers. Use an approved random-number generator: • DBMS_CRYPTO.RANDOMBYTES is based on RSA x9.31 PRNG. • DBMS_RANDOM is not approved. • DBMS_OBFUSCATION_TOOLKIT.GETKEY is still available.
  • 10. 云和恩墨 成就所托 by 王朝阳 18516271611 sonne.k.wang@gmail.com Encryption Key Management: Key Modification and Transmission • Modify periodically, like you would a password: – Reduce the possibility of brute force key discovery. – Reencrypt the data. • Transmit the keys in a secure manner: – Electronic transmission (encrypt the key) – Physical transmission
  • 11. 云和恩墨 成就所托 by 王朝阳 18516271611 sonne.k.wang@gmail.com Encryption Key Management: Storage Store the keys by using one of the following methods: • Store the key in the database. • Store the key in an operating system file. • Let the user manage the key.
  • 12. 云和恩墨 成就所托 by 王朝阳 18516271611 sonne.k.wang@gmail.com Storing the Key in the Database The techniques for protecting keys in the database are: • Store keys in a separate table. • Perform additional data transformation. • Wrap the PL/SQL package that performs the encryption. • Use a key per row. • Combine the techniques.
  • 13. 云和恩墨 成就所托 by 王朝阳 18516271611 sonne.k.wang@gmail.com Storing the Key in the Operating System Use this method to restrict DBA access to the keys: 1. Set up the file storing the keys so that the DBA does not have access to the file. 2. Retrieve the data from the database without decrypting the data. 3. Decrypt the data in the application accessing the data. The DBA must also be denied access to this application.
  • 14. 云和恩墨 成就所托 by 王朝阳 18516271611 sonne.k.wang@gmail.com Letting the User Manage the Key User-managed keys have these problems: • Users forget the key. • Users archive the key in an insecure manner. • Users must use secure transmission methods, such as network encryption.
  • 15. 云和恩墨 成就所托 by 王朝阳 18516271611 sonne.k.wang@gmail.com Encrypting Special Types of Data • Indexed data: – Encrypt the variable used to access the data – Not supported • Large objects (LOBs): – Use the ENCRYPT procedure of the DBMS_CRYPTO package.
  • 16. 云和恩墨 成就所托 by 王朝阳 18516271611 sonne.k.wang@gmail.com Comparing DBMS_CRYPTO with DBMS_OBFUSCATION_TOOLKIT Package Feature DBMS_CRYPTO DBMS_OBFUSCATION_TOOLKIT Cryptographic algorithms DES, 3DES, AES, RC4, 3DES_2KEY DES, 3DES Database types RAW, CLOB, BLOB RAW, VARCHAR2 Block cipher chaining modes CBC, CFB, ECB, OFB CBC Cryptographic hash algorithms MD5, SHA-1, MD4 MD5 Keyed hash (MAC) algorithms HMAC_MD5, HMAC_SH1 None supported
  • 17. 云和恩墨 成就所托 by 王朝阳 18516271611 sonne.k.wang@gmail.com DBMS_CRYPTO Package • Functionality: – Random-number generation for encryption keys – Encryption and decryption by using various algorithms – Multiple cipher block chaining modes – Multiple cryptographic hash algorithms – Multiple padding forms • Procedures and functions in the package include: – RANDOMBYTES creates random keys. – ENCRYPT to encrypt columns or LOBs – DECRYPT to decrypt columns or LOBs – HASH applies a hash algorithm to data.
  • 18. 云和恩墨 成就所托 by 王朝阳 18516271611 sonne.k.wang@gmail.com Using ENCRYPT and DECRYPT • ENCRYPT: • DECRYPT: encrypted_raw := dbms_crypto.Encrypt ( src => raw_input, typ => dbms_crypto.DES3_CBC_PKCS5, key => raw_key, iv => NULL); decrypted_raw := dbms_ crypto.Decrypt ( encrypted_raw, dbms_crypto.DES3_CBC_PKCS5, raw_key);
  • 19. 云和恩墨 成就所托 by 王朝阳 18516271611 sonne.k.wang@gmail.com Using RANDOMBYTES • Generate a key: • Encrypt: raw_key := dbms_crypto.randombytes ( number_bytes => 24); encrypted_raw := dbms_crypto.encrypt ( src => raw_input, typ => DBMS_CRYPTO.DES3_CBC_PKCS5 key => raw_key);
  • 20. 云和恩墨 成就所托 by 王朝阳 18516271611 sonne.k.wang@gmail.com Enhanced Security Using the Cipher Block Modes Initial value block First block Encrypt Encrypt Next block Encrypted first block Encrypted next block Cipher Block Chaining
  • 21. 云和恩墨 成就所托 by 王朝阳 18516271611 sonne.k.wang@gmail.com Hash and Message Authentication Code • DBMS_CRYPTO includes both HASH and Message Authentication Code (MAC) functions. • Both produce a one-way hash of an LOB or RAW. • Use this hash to verify data integrity. • MAC uses a secret key. • Example: encrypted_raw := dbms_crypto.Mac( src => raw_input, typ => DBMS_CRYPTO.HMAC_MD5, key => raw_key);
  • 22. 云和恩墨 成就所托 by 王朝阳 18516271611 sonne.k.wang@gmail.com Summary In this lesson, you should have learned how to: • Describe the encryption options available with Oracle Database 10g • Use DBMS_CRYPTO to: – Generate random encryption keys – Encrypt and decrypt table columns
  • 23. 云和恩墨 成就所托 by 王朝阳 18516271611 sonne.k.wang@gmail.com Q&A