SlideShare a Scribd company logo
1 of 30
Download to read offline
CRYPTAG
BUILDING ENCRYPTED, TAGGABLE,
SEARCHABLE ZERO-KNOWLEDGE
SYSTEMS
Steven Phillips / @elimisteve
DEF CON's Crypto & Privacy Village
2015.08.08
THE PROBLEM/NEED
We need to be able access our data over the internet
without trusting the party storing it
Non-technical users can't or won't self-host (when self-
hosting is even possible)
CURRENT
COMPROMISES
Data is stored unencrypted (loss of privacy)
Almost everything we use is like this
Dropbox, Box, Google Drive, etc
Data is stored encrypted, but can't be searched by the
server
Encrypted backup (e.g., Tarsnap)
CURRENT
COMPROMISES (2)
Data stays on one device
Then you can't access your own data from your own
devices
None of these compromise "solutions" (1) allow the server
to store your encrypted data, (2) let you remotely query this
data and get back just the data you want (without having to
download all of it, which can be impractical), and (3) reveal
nothing about the nature of the data to the server storing it.
BOTTOM LINE
Our data needs to be stored in encrypted storage systems
for privacy, accessible from anywhere for convenience, but
these systems need to be more practical -- and server-side
search would help.
"But the server can't search through your encrypted data
without the encryption key!" Or can it?
WHAT IS CRYPTAG?
CrypTag is a Go library for building encrypted, taggable,
searchable zero-knowledge systems
Lets you send a search query to a server that's storing
your encrypted data, and only send you back the
matching pieces of data
E.g., "Of all my data, just give me my photos of Paris"
WHAT IS CRYPTAG? (2)
The server searching through this data has no idea what it
is, and it doesn't know what you're searching for. And yet,
it finds it for you.
HOW CRYPTAG WORKS
Two concepts: TagPairs, and Rows.
TagPairs associate the human-readable plain text tag (e.g.,
'paris' or 'gmail') with a randomly-generated string that the
server stores in plain text.
HOW CRYPTAG WORKS
(2)
Example TagPairs stored on server:
    {
      "plain_encrypted": "NtZ+WzjTtyWdjOPX6uqr308voeOE", 
      "random":          "9xvv87937" 
    }
    {
      "plain_encrypted": "/1BijKByz4JqYzOTtJEoD4TlPy2FwZf0WrXG2gwZOX1ATN3/MA
      "random":          "fqmt5fkw8" 
    }
HOW CRYPTAG WORKS
(3)
Data is stored in "Rows". Rows store arbitrary data and
associated tags. Example Row stored on server:
{ 
  "data": "OcSufyNLTXwrjWW3ZSkWiVOBaM4OqJwevuFAO5RM", 
  "tags": ["9xvv87937", "fqmt5fkw8"] 
} 
DEMO: ROW AND
TAGPAIR CREATION,
STEP BY STEP
Using the cryptpass demo app, tell CrypTag to create a new
Row (of arbitrary data) + associated tags
cryptpass create mycr4zy4ssp4ss gmail email cryptagdemo@gmail.com tag4
CrypTag then...
1. Fetches all existing TagPairs from the server
2. Decrypts the encrypted human-readable tags (e.g.,
'email')
3. Locally creates new TagPairs for the tags that don't
already exist, generating new random tags associated
4. Locally creates a Row consisting of encrypted data (e.g.,
'mycr4zy4ssp4ss') and the associated randomly-
generated plaintext tags
5. Uploads the TagPairs and Row to the server
FEATURES
NaCl-based crypto
("Networking and Cryptography Library", not Native
Client)
Libraries in many languages (JS, Python, etc)
Pluggable backends
Next: Amazon S3 bucket
Webserver + filesystem
Webserver + database
SSH (coming soon)
MORE ON PLUGGABLE
BACKENDS
(Used by client programs)
type Backend interface { 
    Encrypt(plain []byte, nonce *[24]byte) ([]byte, error) 
    Decrypt(cipher []byte, nonce *[24]byte) ([]byte, error) 
    AllTagPairs() (types.TagPairs, error) 
    TagPairsFromRandomTags(randtags []string) (types.TagPairs, error)
    SaveTagPair(*types.TagPair) (*types.TagPair, error) 
    RowsFromPlainTags(plaintags []string) (types.Rows, error) 
    SaveRow(*types.Row) (*types.Row, error) 
} 
COMPARING
ALTERNATIVES
TARSNAP
Simple encrypted backups
Can query files by
filename
No search
COMPARING
ALTERNATIVES (2)
CRYPTON (FROM SPIDEROAK)
More complex
"Session objects are required to interact with
Transaction-based classes, like Containers and
Messages."
Node, Postgres, Redis
WebSockets
Transactions
But more full-
featured
Auth built in
Messaging :-)
No search
COMPARING
ALTERNATIVES (3)
TAHOE-LAFS
Good sharing model
Different key for each file
Awesome replication model
Built-in file versioning
I can't wait for RAIC and Magic
Folders!
Unfortunately, to get your data, you need the URL +
contained password of every file/directory
Idea: how about storing these URLs using CrypTag? :-)
No search
MY FANTASY (WELL,
ONE OF THEM)
CrypTag app + Cheap, untrusted storage => Tag-
searchable, zero-knowledge _______
Dropbox
Store all your data in S3? your own server?
Mailpile emails?
"...you can use Mailpile with an existing GMail
account, improving your privacy by configuring
Mailpile to download the mail and then delete it
from Google's servers."
Notes?
Bookmarks? (my original use case)
Contacts?
Anything but rapidly-updating data? or GIANT data you
don't want to query?
UPCOMING ADDITIONS
TO CRYPTAG
Timestamps
"Give me the latest 10 files with the tags 'paris' and
'type:photo'"
Allows for efficient updating of locally-cached TagPair
Enables easy versioning!
"Give me the most recent Row with tag
'filename:mydocument.doc'"
Sharing(?)
Different key for each piece of encrypted data (Row)?
Problem: which key is used to encrypt the TagPairs?
Encrypt TagPairs with your own key?
You can search your own server, others can't?
Then you can still link people to individual pieces of
data without giving up your main key, just the key for
that data
Need to think more about this
Row deletion might be handy...
MOBILE SUPPORT
Go 1.5 supports Android and iOS!
Go 1.5rc1 hit 2 days ago
Call CrypTag-wielding Go program/library from your
mobile app
Ubuntu Touch apps can be written in Go (or JS, or C++)
MY GOALS WITH
CRYPTAG
Convince project developers to use CrypTag
...or at least the idea of CrypTag (mostly
TagPairs)
Build useful apps with CrypTag
Send me requests/ideas: @elimisteve
Create CrypTag libraries for Python, JavaScript
MY GOALS WITH
CRYPTAG (2)
Write more CrypTag storage backends
Webserver + file system storage backend almost
done
Next: Amazon S3 bucket
Google Drive? Azure Cloud Storage?
Web server + actual database?
Write data migration/re-keying tool
Other devices just need crypto key and server info (auth
credentials and URL)
Explicit threat model
Proper security audit of all < 1000 SLOC
TECHNICAL THANK
YOUS
Jonathan Rudenberg
Crypto recommendation: AES -> NaCl's
secretbox
Joe Andrieu, Garrett Holmstrom, Sam Dolan
Data migration, re-keying, sharing
PERSONAL THANK
YOUS
Jacob
Appelbaum
AJ Bahnken
Gabrielle Molina
CRYPTAG
github.com/elimisteve/cryptag
Send me feedback/ideas: @elimisteve
THANK YOU to the Crypto & Privacy Village organizers!

More Related Content

Viewers also liked

Financial Communications Society - BDI 11/06 The Future of Financial Services...
Financial Communications Society - BDI 11/06 The Future of Financial Services...Financial Communications Society - BDI 11/06 The Future of Financial Services...
Financial Communications Society - BDI 11/06 The Future of Financial Services...Business Development Institute
 
EtherCalc: Multiplayer Spreadsheet
EtherCalc: Multiplayer SpreadsheetEtherCalc: Multiplayer Spreadsheet
EtherCalc: Multiplayer SpreadsheetAudrey Tang
 
Inventory management system
Inventory management systemInventory management system
Inventory management systemcopo7475
 
Cost Accounting
Cost AccountingCost Accounting
Cost Accountingashu1983
 
Cyber crime and security ppt
Cyber crime and security pptCyber crime and security ppt
Cyber crime and security pptLipsita Behera
 
Financial Accounting
Financial AccountingFinancial Accounting
Financial Accountingashu1983
 
Basics of accounting
Basics of accountingBasics of accounting
Basics of accountingajithjoanes
 
Big Data - 25 Amazing Facts Everyone Should Know
Big Data - 25 Amazing Facts Everyone Should KnowBig Data - 25 Amazing Facts Everyone Should Know
Big Data - 25 Amazing Facts Everyone Should KnowBernard Marr
 
Introduction of Cloud computing
Introduction of Cloud computingIntroduction of Cloud computing
Introduction of Cloud computingRkrishna Mishra
 
24 Time Management Hacks to Develop for Increased Productivity
24 Time Management Hacks to Develop for Increased Productivity24 Time Management Hacks to Develop for Increased Productivity
24 Time Management Hacks to Develop for Increased ProductivityIulian Olariu
 

Viewers also liked (12)

Financial Communications Society - BDI 11/06 The Future of Financial Services...
Financial Communications Society - BDI 11/06 The Future of Financial Services...Financial Communications Society - BDI 11/06 The Future of Financial Services...
Financial Communications Society - BDI 11/06 The Future of Financial Services...
 
EtherCalc: Multiplayer Spreadsheet
EtherCalc: Multiplayer SpreadsheetEtherCalc: Multiplayer Spreadsheet
EtherCalc: Multiplayer Spreadsheet
 
reveal.js 3.0.0
reveal.js 3.0.0reveal.js 3.0.0
reveal.js 3.0.0
 
Inventory management system
Inventory management systemInventory management system
Inventory management system
 
Cost Accounting
Cost AccountingCost Accounting
Cost Accounting
 
Cyber crime and security ppt
Cyber crime and security pptCyber crime and security ppt
Cyber crime and security ppt
 
Financial Accounting
Financial AccountingFinancial Accounting
Financial Accounting
 
Basics of accounting
Basics of accountingBasics of accounting
Basics of accounting
 
Big Data - 25 Amazing Facts Everyone Should Know
Big Data - 25 Amazing Facts Everyone Should KnowBig Data - 25 Amazing Facts Everyone Should Know
Big Data - 25 Amazing Facts Everyone Should Know
 
Introduction of Cloud computing
Introduction of Cloud computingIntroduction of Cloud computing
Introduction of Cloud computing
 
24 Time Management Hacks to Develop for Increased Productivity
24 Time Management Hacks to Develop for Increased Productivity24 Time Management Hacks to Develop for Increased Productivity
24 Time Management Hacks to Develop for Increased Productivity
 
How Google Works
How Google WorksHow Google Works
How Google Works
 

Similar to CrypTag: Building Encrypted, Taggable, Searchable Zero-knowledge Systems

OSDC 2019 | Automating Security in Your Data Pipline by Troy Harvey
OSDC 2019 | Automating Security in Your Data Pipline by Troy HarveyOSDC 2019 | Automating Security in Your Data Pipline by Troy Harvey
OSDC 2019 | Automating Security in Your Data Pipline by Troy HarveyNETWAYS
 
STIX Patterning: Viva la revolución!
STIX Patterning: Viva la revolución!STIX Patterning: Viva la revolución!
STIX Patterning: Viva la revolución!treyka
 
IRJET- Key-Aggregate Cryptosystem for Scalable Data Sharing in Cloud Storage
IRJET-  	  Key-Aggregate Cryptosystem for Scalable Data Sharing in Cloud StorageIRJET-  	  Key-Aggregate Cryptosystem for Scalable Data Sharing in Cloud Storage
IRJET- Key-Aggregate Cryptosystem for Scalable Data Sharing in Cloud StorageIRJET Journal
 
Data Privacy with Apache Spark: Defensive and Offensive Approaches
Data Privacy with Apache Spark: Defensive and Offensive ApproachesData Privacy with Apache Spark: Defensive and Offensive Approaches
Data Privacy with Apache Spark: Defensive and Offensive ApproachesDatabricks
 
Datastax / Cassandra Modeling Strategies
Datastax / Cassandra Modeling Strategies Datastax / Cassandra Modeling Strategies
Datastax / Cassandra Modeling Strategies Anant Corporation
 
OVHcloud Partner Webinar - Data Processing
OVHcloud Partner Webinar - Data ProcessingOVHcloud Partner Webinar - Data Processing
OVHcloud Partner Webinar - Data ProcessingOVHcloud
 
Drupal 101: Tips and Tricks for Troubleshooting Drupal
Drupal 101: Tips and Tricks for Troubleshooting DrupalDrupal 101: Tips and Tricks for Troubleshooting Drupal
Drupal 101: Tips and Tricks for Troubleshooting DrupalAcquia
 
Fire-fighting java big data problems
Fire-fighting java big data problemsFire-fighting java big data problems
Fire-fighting java big data problemsgrepalex
 
Amazon Aws Presentation Drupal
Amazon Aws Presentation DrupalAmazon Aws Presentation Drupal
Amazon Aws Presentation Drupalguest856f3a
 
Managing your black friday logs - Code Europe
Managing your black friday logs - Code EuropeManaging your black friday logs - Code Europe
Managing your black friday logs - Code EuropeDavid Pilato
 
Sv big datascience_cliffclick_5_2_2013
Sv big datascience_cliffclick_5_2_2013Sv big datascience_cliffclick_5_2_2013
Sv big datascience_cliffclick_5_2_2013Sri Ambati
 
Managing your Black Friday Logs NDC Oslo
Managing your  Black Friday Logs NDC OsloManaging your  Black Friday Logs NDC Oslo
Managing your Black Friday Logs NDC OsloDavid Pilato
 
My Little Data in a Big Data World
My Little Data in a Big Data WorldMy Little Data in a Big Data World
My Little Data in a Big Data WorldCandida Haynes
 
Implementation of De-Duplication Algorithm
Implementation of De-Duplication AlgorithmImplementation of De-Duplication Algorithm
Implementation of De-Duplication AlgorithmIRJET Journal
 
Strata Presentation: One Billion Objects in 2GB: Big Data Analytics on Small ...
Strata Presentation: One Billion Objects in 2GB: Big Data Analytics on Small ...Strata Presentation: One Billion Objects in 2GB: Big Data Analytics on Small ...
Strata Presentation: One Billion Objects in 2GB: Big Data Analytics on Small ...randyguck
 
Taboola's experience with Apache Spark (presentation @ Reversim 2014)
Taboola's experience with Apache Spark (presentation @ Reversim 2014)Taboola's experience with Apache Spark (presentation @ Reversim 2014)
Taboola's experience with Apache Spark (presentation @ Reversim 2014)tsliwowicz
 
Data sync on iOS with Couchbase Mobile
Data sync on iOS with Couchbase MobileData sync on iOS with Couchbase Mobile
Data sync on iOS with Couchbase MobileThiago Alencar
 

Similar to CrypTag: Building Encrypted, Taggable, Searchable Zero-knowledge Systems (20)

OSDC 2019 | Automating Security in Your Data Pipline by Troy Harvey
OSDC 2019 | Automating Security in Your Data Pipline by Troy HarveyOSDC 2019 | Automating Security in Your Data Pipline by Troy Harvey
OSDC 2019 | Automating Security in Your Data Pipline by Troy Harvey
 
STIX Patterning: Viva la revolución!
STIX Patterning: Viva la revolución!STIX Patterning: Viva la revolución!
STIX Patterning: Viva la revolución!
 
IRJET- Key-Aggregate Cryptosystem for Scalable Data Sharing in Cloud Storage
IRJET-  	  Key-Aggregate Cryptosystem for Scalable Data Sharing in Cloud StorageIRJET-  	  Key-Aggregate Cryptosystem for Scalable Data Sharing in Cloud Storage
IRJET- Key-Aggregate Cryptosystem for Scalable Data Sharing in Cloud Storage
 
Data Privacy with Apache Spark: Defensive and Offensive Approaches
Data Privacy with Apache Spark: Defensive and Offensive ApproachesData Privacy with Apache Spark: Defensive and Offensive Approaches
Data Privacy with Apache Spark: Defensive and Offensive Approaches
 
Datastax / Cassandra Modeling Strategies
Datastax / Cassandra Modeling Strategies Datastax / Cassandra Modeling Strategies
Datastax / Cassandra Modeling Strategies
 
OVHcloud Partner Webinar - Data Processing
OVHcloud Partner Webinar - Data ProcessingOVHcloud Partner Webinar - Data Processing
OVHcloud Partner Webinar - Data Processing
 
druid.io
druid.iodruid.io
druid.io
 
Drupal 101: Tips and Tricks for Troubleshooting Drupal
Drupal 101: Tips and Tricks for Troubleshooting DrupalDrupal 101: Tips and Tricks for Troubleshooting Drupal
Drupal 101: Tips and Tricks for Troubleshooting Drupal
 
Mongodb
MongodbMongodb
Mongodb
 
Fire-fighting java big data problems
Fire-fighting java big data problemsFire-fighting java big data problems
Fire-fighting java big data problems
 
Amazon Aws Presentation Drupal
Amazon Aws Presentation DrupalAmazon Aws Presentation Drupal
Amazon Aws Presentation Drupal
 
Managing your black friday logs - Code Europe
Managing your black friday logs - Code EuropeManaging your black friday logs - Code Europe
Managing your black friday logs - Code Europe
 
Sv big datascience_cliffclick_5_2_2013
Sv big datascience_cliffclick_5_2_2013Sv big datascience_cliffclick_5_2_2013
Sv big datascience_cliffclick_5_2_2013
 
Django at Scale
Django at ScaleDjango at Scale
Django at Scale
 
Managing your Black Friday Logs NDC Oslo
Managing your  Black Friday Logs NDC OsloManaging your  Black Friday Logs NDC Oslo
Managing your Black Friday Logs NDC Oslo
 
My Little Data in a Big Data World
My Little Data in a Big Data WorldMy Little Data in a Big Data World
My Little Data in a Big Data World
 
Implementation of De-Duplication Algorithm
Implementation of De-Duplication AlgorithmImplementation of De-Duplication Algorithm
Implementation of De-Duplication Algorithm
 
Strata Presentation: One Billion Objects in 2GB: Big Data Analytics on Small ...
Strata Presentation: One Billion Objects in 2GB: Big Data Analytics on Small ...Strata Presentation: One Billion Objects in 2GB: Big Data Analytics on Small ...
Strata Presentation: One Billion Objects in 2GB: Big Data Analytics on Small ...
 
Taboola's experience with Apache Spark (presentation @ Reversim 2014)
Taboola's experience with Apache Spark (presentation @ Reversim 2014)Taboola's experience with Apache Spark (presentation @ Reversim 2014)
Taboola's experience with Apache Spark (presentation @ Reversim 2014)
 
Data sync on iOS with Couchbase Mobile
Data sync on iOS with Couchbase MobileData sync on iOS with Couchbase Mobile
Data sync on iOS with Couchbase Mobile
 

Recently uploaded

ETHICAL HACKING dddddddddddddddfnandni.pptx
ETHICAL HACKING dddddddddddddddfnandni.pptxETHICAL HACKING dddddddddddddddfnandni.pptx
ETHICAL HACKING dddddddddddddddfnandni.pptxNIMMANAGANTI RAMAKRISHNA
 
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书zdzoqco
 
IP addressing and IPv6, presented by Paul Wilson at IETF 119
IP addressing and IPv6, presented by Paul Wilson at IETF 119IP addressing and IPv6, presented by Paul Wilson at IETF 119
IP addressing and IPv6, presented by Paul Wilson at IETF 119APNIC
 
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书rnrncn29
 
TRENDS Enabling and inhibiting dimensions.pptx
TRENDS Enabling and inhibiting dimensions.pptxTRENDS Enabling and inhibiting dimensions.pptx
TRENDS Enabling and inhibiting dimensions.pptxAndrieCagasanAkio
 
Unidad 4 – Redes de ordenadores (en inglés).pptx
Unidad 4 – Redes de ordenadores (en inglés).pptxUnidad 4 – Redes de ordenadores (en inglés).pptx
Unidad 4 – Redes de ordenadores (en inglés).pptxmibuzondetrabajo
 
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书rnrncn29
 
Top 10 Interactive Website Design Trends in 2024.pptx
Top 10 Interactive Website Design Trends in 2024.pptxTop 10 Interactive Website Design Trends in 2024.pptx
Top 10 Interactive Website Design Trends in 2024.pptxDyna Gilbert
 
SCM Symposium PPT Format Customer loyalty is predi
SCM Symposium PPT Format Customer loyalty is prediSCM Symposium PPT Format Customer loyalty is predi
SCM Symposium PPT Format Customer loyalty is predieusebiomeyer
 
Film cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasaFilm cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasa494f574xmv
 
Company Snapshot Theme for Business by Slidesgo.pptx
Company Snapshot Theme for Business by Slidesgo.pptxCompany Snapshot Theme for Business by Slidesgo.pptx
Company Snapshot Theme for Business by Slidesgo.pptxMario
 

Recently uploaded (11)

ETHICAL HACKING dddddddddddddddfnandni.pptx
ETHICAL HACKING dddddddddddddddfnandni.pptxETHICAL HACKING dddddddddddddddfnandni.pptx
ETHICAL HACKING dddddddddddddddfnandni.pptx
 
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
 
IP addressing and IPv6, presented by Paul Wilson at IETF 119
IP addressing and IPv6, presented by Paul Wilson at IETF 119IP addressing and IPv6, presented by Paul Wilson at IETF 119
IP addressing and IPv6, presented by Paul Wilson at IETF 119
 
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
 
TRENDS Enabling and inhibiting dimensions.pptx
TRENDS Enabling and inhibiting dimensions.pptxTRENDS Enabling and inhibiting dimensions.pptx
TRENDS Enabling and inhibiting dimensions.pptx
 
Unidad 4 – Redes de ordenadores (en inglés).pptx
Unidad 4 – Redes de ordenadores (en inglés).pptxUnidad 4 – Redes de ordenadores (en inglés).pptx
Unidad 4 – Redes de ordenadores (en inglés).pptx
 
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
 
Top 10 Interactive Website Design Trends in 2024.pptx
Top 10 Interactive Website Design Trends in 2024.pptxTop 10 Interactive Website Design Trends in 2024.pptx
Top 10 Interactive Website Design Trends in 2024.pptx
 
SCM Symposium PPT Format Customer loyalty is predi
SCM Symposium PPT Format Customer loyalty is prediSCM Symposium PPT Format Customer loyalty is predi
SCM Symposium PPT Format Customer loyalty is predi
 
Film cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasaFilm cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasa
 
Company Snapshot Theme for Business by Slidesgo.pptx
Company Snapshot Theme for Business by Slidesgo.pptxCompany Snapshot Theme for Business by Slidesgo.pptx
Company Snapshot Theme for Business by Slidesgo.pptx
 

CrypTag: Building Encrypted, Taggable, Searchable Zero-knowledge Systems

  • 1. CRYPTAG BUILDING ENCRYPTED, TAGGABLE, SEARCHABLE ZERO-KNOWLEDGE SYSTEMS Steven Phillips / @elimisteve DEF CON's Crypto & Privacy Village 2015.08.08
  • 2. THE PROBLEM/NEED We need to be able access our data over the internet without trusting the party storing it Non-technical users can't or won't self-host (when self- hosting is even possible)
  • 3. CURRENT COMPROMISES Data is stored unencrypted (loss of privacy) Almost everything we use is like this Dropbox, Box, Google Drive, etc Data is stored encrypted, but can't be searched by the server Encrypted backup (e.g., Tarsnap)
  • 4. CURRENT COMPROMISES (2) Data stays on one device Then you can't access your own data from your own devices None of these compromise "solutions" (1) allow the server to store your encrypted data, (2) let you remotely query this data and get back just the data you want (without having to download all of it, which can be impractical), and (3) reveal nothing about the nature of the data to the server storing it.
  • 5. BOTTOM LINE Our data needs to be stored in encrypted storage systems for privacy, accessible from anywhere for convenience, but these systems need to be more practical -- and server-side search would help. "But the server can't search through your encrypted data without the encryption key!" Or can it?
  • 6. WHAT IS CRYPTAG? CrypTag is a Go library for building encrypted, taggable, searchable zero-knowledge systems Lets you send a search query to a server that's storing your encrypted data, and only send you back the matching pieces of data E.g., "Of all my data, just give me my photos of Paris"
  • 7. WHAT IS CRYPTAG? (2) The server searching through this data has no idea what it is, and it doesn't know what you're searching for. And yet, it finds it for you.
  • 8. HOW CRYPTAG WORKS Two concepts: TagPairs, and Rows. TagPairs associate the human-readable plain text tag (e.g., 'paris' or 'gmail') with a randomly-generated string that the server stores in plain text.
  • 9. HOW CRYPTAG WORKS (2) Example TagPairs stored on server:     {       "plain_encrypted": "NtZ+WzjTtyWdjOPX6uqr308voeOE",        "random":          "9xvv87937"      }     {       "plain_encrypted": "/1BijKByz4JqYzOTtJEoD4TlPy2FwZf0WrXG2gwZOX1ATN3/MA       "random":          "fqmt5fkw8"      }
  • 10. HOW CRYPTAG WORKS (3) Data is stored in "Rows". Rows store arbitrary data and associated tags. Example Row stored on server: {    "data": "OcSufyNLTXwrjWW3ZSkWiVOBaM4OqJwevuFAO5RM",    "tags": ["9xvv87937", "fqmt5fkw8"]  } 
  • 11. DEMO: ROW AND TAGPAIR CREATION, STEP BY STEP Using the cryptpass demo app, tell CrypTag to create a new Row (of arbitrary data) + associated tags cryptpass create mycr4zy4ssp4ss gmail email cryptagdemo@gmail.com tag4
  • 12. CrypTag then... 1. Fetches all existing TagPairs from the server 2. Decrypts the encrypted human-readable tags (e.g., 'email') 3. Locally creates new TagPairs for the tags that don't already exist, generating new random tags associated 4. Locally creates a Row consisting of encrypted data (e.g., 'mycr4zy4ssp4ss') and the associated randomly- generated plaintext tags 5. Uploads the TagPairs and Row to the server
  • 13. FEATURES NaCl-based crypto ("Networking and Cryptography Library", not Native Client) Libraries in many languages (JS, Python, etc) Pluggable backends Next: Amazon S3 bucket Webserver + filesystem Webserver + database SSH (coming soon)
  • 14. MORE ON PLUGGABLE BACKENDS (Used by client programs) type Backend interface {      Encrypt(plain []byte, nonce *[24]byte) ([]byte, error)      Decrypt(cipher []byte, nonce *[24]byte) ([]byte, error)      AllTagPairs() (types.TagPairs, error)      TagPairsFromRandomTags(randtags []string) (types.TagPairs, error)     SaveTagPair(*types.TagPair) (*types.TagPair, error)      RowsFromPlainTags(plaintags []string) (types.Rows, error)      SaveRow(*types.Row) (*types.Row, error)  } 
  • 16. COMPARING ALTERNATIVES (2) CRYPTON (FROM SPIDEROAK) More complex "Session objects are required to interact with Transaction-based classes, like Containers and Messages." Node, Postgres, Redis WebSockets Transactions
  • 17. But more full- featured Auth built in Messaging :-) No search
  • 18. COMPARING ALTERNATIVES (3) TAHOE-LAFS Good sharing model Different key for each file Awesome replication model Built-in file versioning I can't wait for RAIC and Magic Folders!
  • 19. Unfortunately, to get your data, you need the URL + contained password of every file/directory Idea: how about storing these URLs using CrypTag? :-) No search
  • 20. MY FANTASY (WELL, ONE OF THEM) CrypTag app + Cheap, untrusted storage => Tag- searchable, zero-knowledge _______ Dropbox Store all your data in S3? your own server? Mailpile emails? "...you can use Mailpile with an existing GMail account, improving your privacy by configuring Mailpile to download the mail and then delete it from Google's servers."
  • 21. Notes? Bookmarks? (my original use case) Contacts? Anything but rapidly-updating data? or GIANT data you don't want to query?
  • 22. UPCOMING ADDITIONS TO CRYPTAG Timestamps "Give me the latest 10 files with the tags 'paris' and 'type:photo'" Allows for efficient updating of locally-cached TagPair Enables easy versioning! "Give me the most recent Row with tag 'filename:mydocument.doc'"
  • 23. Sharing(?) Different key for each piece of encrypted data (Row)? Problem: which key is used to encrypt the TagPairs? Encrypt TagPairs with your own key? You can search your own server, others can't? Then you can still link people to individual pieces of data without giving up your main key, just the key for that data Need to think more about this Row deletion might be handy...
  • 24. MOBILE SUPPORT Go 1.5 supports Android and iOS! Go 1.5rc1 hit 2 days ago Call CrypTag-wielding Go program/library from your mobile app Ubuntu Touch apps can be written in Go (or JS, or C++)
  • 25. MY GOALS WITH CRYPTAG Convince project developers to use CrypTag ...or at least the idea of CrypTag (mostly TagPairs) Build useful apps with CrypTag Send me requests/ideas: @elimisteve Create CrypTag libraries for Python, JavaScript
  • 26. MY GOALS WITH CRYPTAG (2) Write more CrypTag storage backends Webserver + file system storage backend almost done Next: Amazon S3 bucket Google Drive? Azure Cloud Storage? Web server + actual database?
  • 27. Write data migration/re-keying tool Other devices just need crypto key and server info (auth credentials and URL) Explicit threat model Proper security audit of all < 1000 SLOC
  • 28. TECHNICAL THANK YOUS Jonathan Rudenberg Crypto recommendation: AES -> NaCl's secretbox Joe Andrieu, Garrett Holmstrom, Sam Dolan Data migration, re-keying, sharing
  • 30. CRYPTAG github.com/elimisteve/cryptag Send me feedback/ideas: @elimisteve THANK YOU to the Crypto & Privacy Village organizers!