building an encrypted and searchable audit log

53
Building an Encrypted and Searchable Audit Log Brent Waters Dirk Balfanz Glenn Durfee D.K. Smetters

Upload: domani

Post on 11-Feb-2016

40 views

Category:

Documents


0 download

DESCRIPTION

Building an Encrypted and Searchable Audit Log. Brent Waters Dirk Balfanz Glenn Durfee D.K. Smetters. Audit Logs. Employed on most server systems Web logs Database logs Provide invaluable access to past activity Hold users accountable for their actions Diagnostics . - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Building an Encrypted and Searchable Audit Log

Building an Encrypted and Searchable Audit Log

Brent Waters

Dirk BalfanzGlenn DurfeeD.K. Smetters

Page 2: Building an Encrypted and Searchable Audit Log

Audit Logs

• Employed on most server systems– Web logs– Database logs

• Provide invaluable access to past activity– Hold users accountable for their actions– Diagnostics

Page 3: Building an Encrypted and Searchable Audit Log

Desirable Characteristics

• Tamper Resistant• Verifiable

– Can check that entries are present and have not been altered

• Data Access Control– Entries may be sensitive to individuals or log owner

• Searchability– Search for log on specific criteria– e.g keyword search

Page 4: Building an Encrypted and Searchable Audit Log

Desirable Characteristics

• Tamper Resistant• Verifiable

– Can check that entries are present and have not been altered

• Data Access Control– Entries may be sensitive to individuals or log owner

• Searchability– Search for log on specific criteria– e.g keyword search

Page 5: Building an Encrypted and Searchable Audit Log

An Audit Log for a Database System

user: Alice Smithkeyword: carskeyword: makekeyword: fordtime: 2003/08/26 23:34:24

authentication clockkeyword extraction

“select * from cars where make=‘ford’”

databaseaudit record creation

keywords for audit record

log storage (untrusted)

Page 6: Building an Encrypted and Searchable Audit Log

Requirements

• Data Access Control– Entries must be encrypted on untrusted storage– Forward security in case auditing device becomes

compromised asymmetric encryption– Limit scope of data released to that of the search

• Searchability– Be able to efficiently retrieve entries based on certain criteria– We focus on keyword search

Page 7: Building an Encrypted and Searchable Audit Log

A Simple Solution

• Encrypt all entries with a public key• Auditor downloads all entries, then decrypts them,

then performs the search

Page 8: Building an Encrypted and Searchable Audit Log

A Simple Solution

• Encrypt all entries with a public key• Auditor downloads all entries, then decrypts them,

then performs the search

Disadvantages• Auditor sees all entries and regardless of what

search criteria was• All entries must be transmitted from server

Page 9: Building an Encrypted and Searchable Audit Log

auditrecord

Delegating Search Capabilities

investigator audit escrow agent

mastersecret

“user: Alice Smith”

capabilityfor search

investigator audit log

capabilityfor search

auditrecord

auditrecord …

1

2

The investigator submits the capability to the audit log and receives only entries that the capability matches.

The investigator requests a capability to search for all entries that were made by the user Alice.

Page 10: Building an Encrypted and Searchable Audit Log

Searching on Asymmetrically Encrypted Data

Auditing Device

Keywords

Alice

Ford

Loans

Document

Page 11: Building an Encrypted and Searchable Audit Log

Searching on Asymmetrically Encrypted Data

Auditing Device

Keywords

Alice

Ford

Loans

Document

Encrypted Data

Keywords must not be in the clear!

Page 12: Building an Encrypted and Searchable Audit Log

Searching on Asymmetrically Encrypted Data

Auditing Device

Keywords

Alice

Ford

Loans

Document

audit escrow agent

mastersecret

Encrypted Data

Page 13: Building an Encrypted and Searchable Audit Log

Searching on Asymmetrically Encrypted Data

Auditing Device

Keywords

Alice

Ford

Loans

Document

Honda

Search Capability

mastersecret

Encrypted Data

audit escrow agent

Page 14: Building an Encrypted and Searchable Audit Log

Searching on Asymmetrically Encrypted Data

Auditing Device

Keywords

Alice

Ford

Loans

Document

Honda

Search Capability

mastersecret

Encrypted Data

audit escrow agent

Page 15: Building an Encrypted and Searchable Audit Log

Searching on Asymmetrically Encrypted Data

Auditing Device

Keywords

Alice

Ford

Loans

Document

Honda

Search Capability

mastersecret

Encrypted Data

No information is learned

audit escrow agent

Page 16: Building an Encrypted and Searchable Audit Log

Searching on Asymmetrically Encrypted Data

Auditing Device

Keywords

Alice

Ford

Loans

Document

mastersecret

Encrypted Data

audit escrow agent

Page 17: Building an Encrypted and Searchable Audit Log

Searching on Asymmetrically Encrypted Data

Auditing Device

Keywords

Alice

Ford

Loans

Document

Alice

Search Capability

mastersecret

Encrypted Data

audit escrow agent

Page 18: Building an Encrypted and Searchable Audit Log

Searching on Asymmetrically Encrypted Data

Auditing Device

Keywords

Alice

Ford

Loans

Document

Alice

Search Capability

mastersecret

Encrypted DataKeywords

Alice

Ford

Loans

Document

Embed decryption in search

audit escrow agent

Page 19: Building an Encrypted and Searchable Audit Log

Identity Based Encryption (IBE)

• Public Key is simply a string e.g. [email protected]

• Private Key given from master secret holder(s)

• Removes need for distribution of public key certificates

• We use scheme of Boneh and Franklin (2001)

Page 20: Building an Encrypted and Searchable Audit Log

Using IBE to Search on Asymmetrically Encrypted Data

Keywords

Alice

Ford

Loans

Document Auditing Device

Page 21: Building an Encrypted and Searchable Audit Log

Using IBE to Search on Asymmetrically Encrypted Data

Auditing DeviceKeywords

Alice

Ford

Loans

Document

Document

K

Page 22: Building an Encrypted and Searchable Audit Log

Using IBE to Search on Asymmetrically Encrypted Data

Auditing DeviceKeywords

Alice

Ford

Loans

Document

Document

K

FLAG | K“Alice”

Page 23: Building an Encrypted and Searchable Audit Log

Using IBE to Search on Asymmetrically Encrypted Data

Auditing DeviceKeywords

Alice

Ford

Loans

Document

Document

K

FLAG | K“Alice”

FLAG | K“Ford”

Page 24: Building an Encrypted and Searchable Audit Log

Using IBE to Search on Asymmetrically Encrypted Data

Auditing DeviceKeywords

Alice

Ford

Loans

Document

Document

K

FLAG | K“Alice”

FLAG | K“Ford”

FLAG | K“Loans”

Page 25: Building an Encrypted and Searchable Audit Log

Using IBE to Search on Asymmetrically Encrypted Data

Auditing Device

•FLAG used to test

K to decrypt on match

Keywords

Alice

Ford

Loans

Document

Document

K

FLAG | K“Alice”

FLAG | K“Ford”

FLAG | K“Loans”

Page 26: Building an Encrypted and Searchable Audit Log

Using IBE to Search on Asymmetrically Encrypted Data

Auditing Device

•FLAG used to test

K to decrypt on match

•Key-privacy propertykeywords kept private

Keywords

Alice

Ford

Loans

Document

Document

K

FLAG | K“Alice”

FLAG | K“Ford”

FLAG | K“Loans”

Page 27: Building an Encrypted and Searchable Audit Log

Using IBE to Search on Asymmetrically Encrypted Data

Auditing Device

•FLAG used to test

K to decrypt on match

•Key-privacy propertykeywords kept private

•“Pairing” operation per keyword

Keywords

Alice

Ford

Loans

Document

Document

K

FLAG | K“Alice”

FLAG | K“Ford”

FLAG | K“Loans”

Page 28: Building an Encrypted and Searchable Audit Log

Using IBE to Search on Asymmetrically Encrypted Data

Alice

Search Capability

Document

K

FLAG | K“Alice”

FLAG | K“Ford”

FLAG | K“Loans”

Page 29: Building an Encrypted and Searchable Audit Log

Using IBE to Search on Asymmetrically Encrypted Data

Alice

Search Capability

•Attempt IBE decryption on each part

Test for presence of FLAGDocument

K

FLAG | K“Alice”

FLAG | K“Ford”

FLAG | K“Loans”

Page 30: Building an Encrypted and Searchable Audit Log

Using IBE to Search on Asymmetrically Encrypted Data

Alice

Search Capability

•Attempt IBE decryption on each part

Test for presence of FLAG

011010…

Document

K

FLAG | K“Alice”

FLAG | K“Ford”

FLAG | K“Loans”

Page 31: Building an Encrypted and Searchable Audit Log

Using IBE to Search on Asymmetrically Encrypted Data

Alice

Search Capability

•Attempt IBE decryption on each part

Test for presence of FLAG

0011100…

Document

K

FLAG | K“Alice”

FLAG | K“Ford”

FLAG | K“Loans”

Page 32: Building an Encrypted and Searchable Audit Log

Using IBE to Search on Asymmetrically Encrypted Data

Alice

Search Capability

•Attempt IBE decryption on each part

Test for presence of FLAG

FLAG | K

Document

K

FLAG | K“Alice”

FLAG | K“Ford”

FLAG | K“Loans”

Page 33: Building an Encrypted and Searchable Audit Log

Using IBE to Search on Asymmetrically Encrypted Data

Alice

Search Capability

•Attempt IBE decryption on each part

Test for presence of FLAG

•On match use K to decrypt document

DocumentDocument

K

FLAG | K“Alice”

FLAG | K“Ford”

FLAG | K“Loans”

FLAG | K

Page 34: Building an Encrypted and Searchable Audit Log

Using IBE to Search on Asymmetrically Encrypted Data

Alice

Search Capability

•Attempt IBE decryption on each part

Test for presence of FLAG

•On match use K to decrypt document

•Pairing per keyword in document

Document

K

FLAG | K“Alice”

FLAG | K“Ford”

FLAG | K“Loans”

Document

FLAG | K

Page 35: Building an Encrypted and Searchable Audit Log

Scoping of Keywords

• We want to type keywords

• e.g. Capability to search on entries about “Alice” vs. those made by “Alice”

• Solution: Prefix keywords with type– “user:Alice”– “kw:Alice”

Page 36: Building an Encrypted and Searchable Audit Log

Performance

• Encryption– One pairing per keyword in document– One exponentiation per keyword

• Search/Decryption– One pairing per keyword per document

Page 37: Building an Encrypted and Searchable Audit Log

Optimizations

• Cache pairings of frequently used keywords– eg. ê(“user:Alice”,sP)– Only need a pairing per new keyword on encryption– In limit exponentiation per keyword is dominant cost

Page 38: Building an Encrypted and Searchable Audit Log

Optimizations

• Cache pairings of frequently used keywords– eg. ê(“user:Alice”,sP)– Only need a pairing per new keyword on encryption– In limit exponentiation per keyword is dominant cost

• Reuse randomness for IBE encryption within one document– Okay since cannot use same public key per document– In decryption only one pairing per document– Save storage in log

Page 39: Building an Encrypted and Searchable Audit Log

Indexing

• Incremental update of an index on untrusted storage is insecure

Page 40: Building an Encrypted and Searchable Audit Log

Indexing

• Incremental update of an index on untrusted storage is insecure

Keywords

Alice

Ford

Loans

Document Index

Page 41: Building an Encrypted and Searchable Audit Log

Indexing

• Incremental update of an index on untrusted storage is insecure

Keywords

Alice

Ford

Loans

Document Index

Page 42: Building an Encrypted and Searchable Audit Log

Indexing

• Incremental update of an index on untrusted storage is insecure

Keywords

Alice

Loans

Washington

Document Index

Page 43: Building an Encrypted and Searchable Audit Log

Indexing

• Incremental update of an index on untrusted storage is insecure

Keywords

Alice

Loans

Washington

Document Index

Page 44: Building an Encrypted and Searchable Audit Log

Indexing• Build local index on auditing device and flush out

to storage

Page 45: Building an Encrypted and Searchable Audit Log

Indexing• Build local index on auditing device and flush out

to storage

Document

K’

Document

K’’

Document

K

FLAG | K | K’’ “Alice”

FLAG | …“Sam”

Page 46: Building an Encrypted and Searchable Audit Log

Indexing• Longer index is held in auditing device more

information leaked on device compromise

Page 47: Building an Encrypted and Searchable Audit Log

Implementation

• Implemented a logging system for MySQL database queries

• Goal to protect individual’s privacy

• Used Stanford IBE library

• Pairing cost ~80ms on current machines

Page 48: Building an Encrypted and Searchable Audit Log

Related Work

Searching on Encrypted Data• Boneh, Crescenzo, Ostrovsky and Persiano (2003)• Song, Wagner and Perrig (2000)• Goh (2003)

Identity Based Encryption• Boneh and Franklin (2001)

Page 49: Building an Encrypted and Searchable Audit Log

Conclusion

• Tension between data access control and searchability in audit logs

• Asymmetric scheme for searching on encrypted data

• Explored optimizations for practical systems

Page 50: Building an Encrypted and Searchable Audit Log
Page 51: Building an Encrypted and Searchable Audit Log

Searching on Asymmetrically Encrypted Data

Auditing Device

KeywordsAlice

Ford

Loans

Document

KeywordsAlice

Ford

Loans

Document

Bob

Search Capability

audit escrow agent

mastersecret

Encrypted Data

Page 52: Building an Encrypted and Searchable Audit Log

Using IBE to Search on Asymmetrically Encrypted Data

KeywordsAlice

Ford

Loans

Document Auditing Device

Document

K

FLAG | K“Alice”

FLAG | K“Ford”

FLAG | K“Loans”

•FLAG used to test

K to decrypt on match

•Key-privacy propertykeywords kept private

•“Pairing” operation per keyword

Page 53: Building an Encrypted and Searchable Audit Log

Using IBE to Search on Asymmetrically Encrypted Data

Document

K

FLAG | K“Alice”

FLAG | K“Ford”

FLAG | K“Loans”

Alice

Search Capability

•Attempt IBE decryption on each part

Test for presence of FLAG

•On match use K to decrypt document

•Pairing per test