SlideShare a Scribd company logo
1 of 21
1
Database Security &
Encryption
c.stanier@staffs.ac.uk
2
A Truly Secure Database
3
So In The Real World
 Database security protects the database against
unwanted effects, accidental or deliberate
 There is always a trade off between high
security and performance/user convenience
 Excessive security can in itself be a security
threat - workarounds
 The first step is always a security audit
 This lecture looks at the use of encryption as
part of a security policy
4
Excessive Security Can
In Itself Be A Security Threat
Dilbert
5
Before Deciding on Encryption
 Know the data and the database
 What should be encrypted?
 Which encryption algorithms?
 DBMS or external encryption?
 What is the acceptable performance hit?
 Who are you protecting against?
 Is the benefit worth the cost?
6
The Role of Encryption
 Most database security techniques focus on controlling access –
passwords, privileges, encrypting data as it travels
 There is much less focus on protecting data at rest (data in storage)
 We are assuming here that access encryption has already been used – this
lecture focuses on data in storage
 Encryption is increasingly being used to protect data in storage
 Which includes backups
 And all the pen drives, portable hard drives, mobiles that get lost or
stolen
 Encryption is often described as ‘the last line of defence’
7
Whole Database Encryption
 The whole database is encrypted
 This protects the data at rest but requires
decryption for use
 Whole DB encryption has traditionally been
regarded as too expensive – SQL Server
TDE, new with 2008, claims to reduce the
performance hit but still acknowledges a cost
(1)
8
(2)
9
Partial Data Encryption
 Partial encryption provides more granularity plus the data is not
decrypted until it is used
 Usually referring to column encryption although it can also be cell
level or encryption of DB objects such as triggers
 Rule of thumb – encrypting a single column is likely to produce a
5% performance hit, but this varies wildly
 Traditional partial encryption can produce a massive performance
hit as indexes are not recognised – but this depends on the DBMS
 Highly configurable – can allocate different keys to different users
 With the downside that this increases the key management
problem
10
Partial Data Encryption
 For SQL Server 2008, Microsoft suggest that with cell
level encryption, basic query performance tends to be
around 20% worse.
 Problem increases with scaling
 “One sample application with 10,000 rows was four times worse
with one column encrypted, and 20 times worse with
nine columns encrypted. Because cell-level encryption is custom
to each application, performance degradation will vary
depending on application and workload specifics.” (1)
 “Custom to each application” - this is an “it depends”
area
11
The Encryption Process
Encrypt Decrypt
Plaintext Plaintext
Cyphertext
12
Encryption Algorithms: Data
Encryption Standard
 DES has a short (56 bit) key plus 8 bits used for
parity checking
 Very susceptible to brute force attacks
 “No sane security expert would consider using
DES to protect data.” (2)
 Now outdated – older versions of DBMS
encryption routines used DES e.g. early
versions of Oracle
13
Encryption Algorithms: 3DES
 The limitations of DES led to 3DES – uses the DES
algorithm but employs a triple key approach
Plain Text
Cipher Text
Much more
secure but
slower
14
Encryption Algorithms: AES
 Key size 128,192 or 256 bits
 Consists of a set of processing rounds – the
number varies depending on the key size e.g.
14 rounds for 256 length keys
 More secure
15
Encryption Algorithms:RC5
 Symmetric (same key used for en/decryption)
block cypher
 Fast and flexible – the user can specify the
number of rounds
 Allows for a variable length key
 Supported in Oracle & DB2
16
Encryption in the DBMS
 Some of the initial problems with DBMS
encryption are on the way to being solved
 Disk size was a major problem as ciphers may
produce output in fixed block sizes, meaning that
the input must be padded – requiring resizing of
columns
 DBMS encryption was typically criticised for using
outdated algorithms such as DES & even 3DES
 Sometimes compatibility issues
 A plus with DBMS encryption is that there
should be minimal change implications
17
Key Management
 The encryption is only as secure as the key
 DBMS based encryptions (typically) store the
key inside the database
 Which raises issues such as
How many keys
Who manages them
Where are they stored
What happens if you lose your key?
18
Encryption Servers
 As an alternative to encrypting within the DB, a central
encryption server can be used to encrypt data in
applications as well as in the database
 This is a heavily vendor led area; benefits claimed
include
 More secure key management
 Wider choice of algorithms
 Wider coverage of data
 Easier management of encryption
 Removing computation overhead from DBMS/application
servers
 The downside is:
 Added complexity
 Applications changes
 Cost
 And – is the extra layer necessary?
19
Further Work
 You should understand the significance of the
different encryption algorithms but the main
areas to focus on are:
 The benefits of encryption in a DB context
 The downside to encryption in a DB context
 The business environment in which encryption would
be useful
 What and how you should encrypt if you decide
encryption would be useful
 How encryption would fit into your overall DB
security policy
And a personal opinion
 My view:
If someone truly wants to get into your
database, they will probably manage it
The biggest risk to data is accidental or
casual intrusion
People will lose pen drives – but an encrypted
pen drive should not be too much of a
problem
Should we focus less on the main database
and more on data storage?
20
21
References
1. http://msdn.microsoft.com/en-
us/library/cc278098.aspx
2. http://msdn.microsoft.com/en-
us/library/bb934049.aspx
3. http://www.tropsoft.com/strongenc/des3.htm

More Related Content

Similar to Formal Lecture.ppt

Database security technique with database cache
Database security technique with database cacheDatabase security technique with database cache
Database security technique with database cacheIJARIIT
 
Alex Hanway - Securing the Breach: Using a Holistic Data Protection Framework
Alex Hanway - Securing the Breach: Using a Holistic Data Protection FrameworkAlex Hanway - Securing the Breach: Using a Holistic Data Protection Framework
Alex Hanway - Securing the Breach: Using a Holistic Data Protection Frameworkcentralohioissa
 
A Novel Approach for Data Security in Cloud Environment
A Novel Approach for Data Security in  Cloud EnvironmentA Novel Approach for Data Security in  Cloud Environment
A Novel Approach for Data Security in Cloud EnvironmentSHREYASSRINATH94
 
DOTNET 2013 IEEE CLOUDCOMPUTING PROJECT A privacy leakage upper bound constra...
DOTNET 2013 IEEE CLOUDCOMPUTING PROJECT A privacy leakage upper bound constra...DOTNET 2013 IEEE CLOUDCOMPUTING PROJECT A privacy leakage upper bound constra...
DOTNET 2013 IEEE CLOUDCOMPUTING PROJECT A privacy leakage upper bound constra...IEEEGLOBALSOFTTECHNOLOGIES
 
A robust and verifiable threshold multi authority access control system in pu...
A robust and verifiable threshold multi authority access control system in pu...A robust and verifiable threshold multi authority access control system in pu...
A robust and verifiable threshold multi authority access control system in pu...IJARIIT
 
iaetsd Using encryption to increase the security of network storage
iaetsd Using encryption to increase the security of network storageiaetsd Using encryption to increase the security of network storage
iaetsd Using encryption to increase the security of network storageIaetsd Iaetsd
 
Solve Big Data Security Issues
Solve Big Data Security IssuesSolve Big Data Security Issues
Solve Big Data Security IssuesEditor IJCATR
 
IBM Share Conference 2010, Boston, Ulf Mattsson
IBM Share Conference 2010, Boston, Ulf MattssonIBM Share Conference 2010, Boston, Ulf Mattsson
IBM Share Conference 2010, Boston, Ulf MattssonUlf Mattsson
 
Presentation1.pptx
Presentation1.pptxPresentation1.pptx
Presentation1.pptxchWaqasZahid
 
Securing data at rest with encryption
Securing data at rest with encryptionSecuring data at rest with encryption
Securing data at rest with encryptionRuban Deventhiran
 
ISSA Boston - PCI and Beyond: A Cost Effective Approach to Data Protection
ISSA Boston - PCI and Beyond: A Cost Effective Approach to Data ProtectionISSA Boston - PCI and Beyond: A Cost Effective Approach to Data Protection
ISSA Boston - PCI and Beyond: A Cost Effective Approach to Data ProtectionUlf Mattsson
 
A privacy leakage upper bound constraint based approach for cost-effective pr...
A privacy leakage upper bound constraint based approach for cost-effective pr...A privacy leakage upper bound constraint based approach for cost-effective pr...
A privacy leakage upper bound constraint based approach for cost-effective pr...JPINFOTECH JAYAPRAKASH
 
Block-Level Message-Locked Encryption for Secure Large File De-duplication
Block-Level Message-Locked Encryption for Secure Large File De-duplicationBlock-Level Message-Locked Encryption for Secure Large File De-duplication
Block-Level Message-Locked Encryption for Secure Large File De-duplicationIRJET Journal
 
Implementation of De-Duplication Algorithm
Implementation of De-Duplication AlgorithmImplementation of De-Duplication Algorithm
Implementation of De-Duplication AlgorithmIRJET Journal
 
SECURITY BASED ISSUES IN VIEW OF CLOUD BASED STORAGE SYSTEM
SECURITY BASED ISSUES IN VIEW OF CLOUD BASED STORAGE SYSTEMSECURITY BASED ISSUES IN VIEW OF CLOUD BASED STORAGE SYSTEM
SECURITY BASED ISSUES IN VIEW OF CLOUD BASED STORAGE SYSTEMJournal For Research
 
IRJET- Review on Privacy Preserving on Multi Keyword Search over Encrypte...
IRJET-  	  Review on Privacy Preserving on Multi Keyword Search over Encrypte...IRJET-  	  Review on Privacy Preserving on Multi Keyword Search over Encrypte...
IRJET- Review on Privacy Preserving on Multi Keyword Search over Encrypte...IRJET Journal
 
Secure deduplication-evault-endpoint-protection
Secure deduplication-evault-endpoint-protectionSecure deduplication-evault-endpoint-protection
Secure deduplication-evault-endpoint-protectionInka Traktman
 
Secure distributed deduplication systems with improved reliability 2
Secure distributed deduplication systems with improved reliability 2Secure distributed deduplication systems with improved reliability 2
Secure distributed deduplication systems with improved reliability 2Rishikesh Pathak
 
IRJET- Secure Data Deduplication and Auditing for Cloud Data Storage
IRJET-  	  Secure Data Deduplication and Auditing for Cloud Data StorageIRJET-  	  Secure Data Deduplication and Auditing for Cloud Data Storage
IRJET- Secure Data Deduplication and Auditing for Cloud Data StorageIRJET Journal
 

Similar to Formal Lecture.ppt (20)

Database security technique with database cache
Database security technique with database cacheDatabase security technique with database cache
Database security technique with database cache
 
Alex Hanway - Securing the Breach: Using a Holistic Data Protection Framework
Alex Hanway - Securing the Breach: Using a Holistic Data Protection FrameworkAlex Hanway - Securing the Breach: Using a Holistic Data Protection Framework
Alex Hanway - Securing the Breach: Using a Holistic Data Protection Framework
 
A Novel Approach for Data Security in Cloud Environment
A Novel Approach for Data Security in  Cloud EnvironmentA Novel Approach for Data Security in  Cloud Environment
A Novel Approach for Data Security in Cloud Environment
 
DOTNET 2013 IEEE CLOUDCOMPUTING PROJECT A privacy leakage upper bound constra...
DOTNET 2013 IEEE CLOUDCOMPUTING PROJECT A privacy leakage upper bound constra...DOTNET 2013 IEEE CLOUDCOMPUTING PROJECT A privacy leakage upper bound constra...
DOTNET 2013 IEEE CLOUDCOMPUTING PROJECT A privacy leakage upper bound constra...
 
A robust and verifiable threshold multi authority access control system in pu...
A robust and verifiable threshold multi authority access control system in pu...A robust and verifiable threshold multi authority access control system in pu...
A robust and verifiable threshold multi authority access control system in pu...
 
iaetsd Using encryption to increase the security of network storage
iaetsd Using encryption to increase the security of network storageiaetsd Using encryption to increase the security of network storage
iaetsd Using encryption to increase the security of network storage
 
Solve Big Data Security Issues
Solve Big Data Security IssuesSolve Big Data Security Issues
Solve Big Data Security Issues
 
IBM Share Conference 2010, Boston, Ulf Mattsson
IBM Share Conference 2010, Boston, Ulf MattssonIBM Share Conference 2010, Boston, Ulf Mattsson
IBM Share Conference 2010, Boston, Ulf Mattsson
 
Presentation1.pptx
Presentation1.pptxPresentation1.pptx
Presentation1.pptx
 
Securing data at rest with encryption
Securing data at rest with encryptionSecuring data at rest with encryption
Securing data at rest with encryption
 
ISSA Boston - PCI and Beyond: A Cost Effective Approach to Data Protection
ISSA Boston - PCI and Beyond: A Cost Effective Approach to Data ProtectionISSA Boston - PCI and Beyond: A Cost Effective Approach to Data Protection
ISSA Boston - PCI and Beyond: A Cost Effective Approach to Data Protection
 
A privacy leakage upper bound constraint based approach for cost-effective pr...
A privacy leakage upper bound constraint based approach for cost-effective pr...A privacy leakage upper bound constraint based approach for cost-effective pr...
A privacy leakage upper bound constraint based approach for cost-effective pr...
 
Block-Level Message-Locked Encryption for Secure Large File De-duplication
Block-Level Message-Locked Encryption for Secure Large File De-duplicationBlock-Level Message-Locked Encryption for Secure Large File De-duplication
Block-Level Message-Locked Encryption for Secure Large File De-duplication
 
Implementation of De-Duplication Algorithm
Implementation of De-Duplication AlgorithmImplementation of De-Duplication Algorithm
Implementation of De-Duplication Algorithm
 
Kp3419221926
Kp3419221926Kp3419221926
Kp3419221926
 
SECURITY BASED ISSUES IN VIEW OF CLOUD BASED STORAGE SYSTEM
SECURITY BASED ISSUES IN VIEW OF CLOUD BASED STORAGE SYSTEMSECURITY BASED ISSUES IN VIEW OF CLOUD BASED STORAGE SYSTEM
SECURITY BASED ISSUES IN VIEW OF CLOUD BASED STORAGE SYSTEM
 
IRJET- Review on Privacy Preserving on Multi Keyword Search over Encrypte...
IRJET-  	  Review on Privacy Preserving on Multi Keyword Search over Encrypte...IRJET-  	  Review on Privacy Preserving on Multi Keyword Search over Encrypte...
IRJET- Review on Privacy Preserving on Multi Keyword Search over Encrypte...
 
Secure deduplication-evault-endpoint-protection
Secure deduplication-evault-endpoint-protectionSecure deduplication-evault-endpoint-protection
Secure deduplication-evault-endpoint-protection
 
Secure distributed deduplication systems with improved reliability 2
Secure distributed deduplication systems with improved reliability 2Secure distributed deduplication systems with improved reliability 2
Secure distributed deduplication systems with improved reliability 2
 
IRJET- Secure Data Deduplication and Auditing for Cloud Data Storage
IRJET-  	  Secure Data Deduplication and Auditing for Cloud Data StorageIRJET-  	  Secure Data Deduplication and Auditing for Cloud Data Storage
IRJET- Secure Data Deduplication and Auditing for Cloud Data Storage
 

Recently uploaded

Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajanpragatimahajan3
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhikauryashika82
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingTeacherCyreneCayanan
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 

Recently uploaded (20)

Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 

Formal Lecture.ppt

  • 2. 2 A Truly Secure Database
  • 3. 3 So In The Real World  Database security protects the database against unwanted effects, accidental or deliberate  There is always a trade off between high security and performance/user convenience  Excessive security can in itself be a security threat - workarounds  The first step is always a security audit  This lecture looks at the use of encryption as part of a security policy
  • 4. 4 Excessive Security Can In Itself Be A Security Threat Dilbert
  • 5. 5 Before Deciding on Encryption  Know the data and the database  What should be encrypted?  Which encryption algorithms?  DBMS or external encryption?  What is the acceptable performance hit?  Who are you protecting against?  Is the benefit worth the cost?
  • 6. 6 The Role of Encryption  Most database security techniques focus on controlling access – passwords, privileges, encrypting data as it travels  There is much less focus on protecting data at rest (data in storage)  We are assuming here that access encryption has already been used – this lecture focuses on data in storage  Encryption is increasingly being used to protect data in storage  Which includes backups  And all the pen drives, portable hard drives, mobiles that get lost or stolen  Encryption is often described as ‘the last line of defence’
  • 7. 7 Whole Database Encryption  The whole database is encrypted  This protects the data at rest but requires decryption for use  Whole DB encryption has traditionally been regarded as too expensive – SQL Server TDE, new with 2008, claims to reduce the performance hit but still acknowledges a cost (1)
  • 9. 9 Partial Data Encryption  Partial encryption provides more granularity plus the data is not decrypted until it is used  Usually referring to column encryption although it can also be cell level or encryption of DB objects such as triggers  Rule of thumb – encrypting a single column is likely to produce a 5% performance hit, but this varies wildly  Traditional partial encryption can produce a massive performance hit as indexes are not recognised – but this depends on the DBMS  Highly configurable – can allocate different keys to different users  With the downside that this increases the key management problem
  • 10. 10 Partial Data Encryption  For SQL Server 2008, Microsoft suggest that with cell level encryption, basic query performance tends to be around 20% worse.  Problem increases with scaling  “One sample application with 10,000 rows was four times worse with one column encrypted, and 20 times worse with nine columns encrypted. Because cell-level encryption is custom to each application, performance degradation will vary depending on application and workload specifics.” (1)  “Custom to each application” - this is an “it depends” area
  • 11. 11 The Encryption Process Encrypt Decrypt Plaintext Plaintext Cyphertext
  • 12. 12 Encryption Algorithms: Data Encryption Standard  DES has a short (56 bit) key plus 8 bits used for parity checking  Very susceptible to brute force attacks  “No sane security expert would consider using DES to protect data.” (2)  Now outdated – older versions of DBMS encryption routines used DES e.g. early versions of Oracle
  • 13. 13 Encryption Algorithms: 3DES  The limitations of DES led to 3DES – uses the DES algorithm but employs a triple key approach Plain Text Cipher Text Much more secure but slower
  • 14. 14 Encryption Algorithms: AES  Key size 128,192 or 256 bits  Consists of a set of processing rounds – the number varies depending on the key size e.g. 14 rounds for 256 length keys  More secure
  • 15. 15 Encryption Algorithms:RC5  Symmetric (same key used for en/decryption) block cypher  Fast and flexible – the user can specify the number of rounds  Allows for a variable length key  Supported in Oracle & DB2
  • 16. 16 Encryption in the DBMS  Some of the initial problems with DBMS encryption are on the way to being solved  Disk size was a major problem as ciphers may produce output in fixed block sizes, meaning that the input must be padded – requiring resizing of columns  DBMS encryption was typically criticised for using outdated algorithms such as DES & even 3DES  Sometimes compatibility issues  A plus with DBMS encryption is that there should be minimal change implications
  • 17. 17 Key Management  The encryption is only as secure as the key  DBMS based encryptions (typically) store the key inside the database  Which raises issues such as How many keys Who manages them Where are they stored What happens if you lose your key?
  • 18. 18 Encryption Servers  As an alternative to encrypting within the DB, a central encryption server can be used to encrypt data in applications as well as in the database  This is a heavily vendor led area; benefits claimed include  More secure key management  Wider choice of algorithms  Wider coverage of data  Easier management of encryption  Removing computation overhead from DBMS/application servers  The downside is:  Added complexity  Applications changes  Cost  And – is the extra layer necessary?
  • 19. 19 Further Work  You should understand the significance of the different encryption algorithms but the main areas to focus on are:  The benefits of encryption in a DB context  The downside to encryption in a DB context  The business environment in which encryption would be useful  What and how you should encrypt if you decide encryption would be useful  How encryption would fit into your overall DB security policy
  • 20. And a personal opinion  My view: If someone truly wants to get into your database, they will probably manage it The biggest risk to data is accidental or casual intrusion People will lose pen drives – but an encrypted pen drive should not be too much of a problem Should we focus less on the main database and more on data storage? 20