crypto is not a
but a method to manage
the attack surface
@vixentael
Slide 10
Slide 10 text
ATTACK SURFACE
– all the possible places
where sensitive data may be
stolen by adversary
https://www.owasp.org/index.php/Attack_Surface_Analysis_Cheat_Sheet @vixentael
Slide 11
Slide 11 text
it’s easier to monitor
the suspicious behavior
in a small place
@vixentael
Slide 12
Slide 12 text
HANDLING SENSITIVE DATA
WITH CARE
avoid plaintext as possible
manage keys properly
decrease time of plaintext secrets in memory
log, monitor and inspect
@vixentael
limit access to data
Slide 13
Slide 13 text
– HOW TO MANAGE
THE ATTACK SURFACE
OF MY DATA?
Slide 14
Slide 14 text
one container one key
@vixentael
symmetric encryption
with poor key
management
Slide 15
Slide 15 text
attack surface
is arbitrary
one container one key
symmetric encryption
with poor key
management
key leaked
→ data leaked
@vixentael
WHERE TO USE THIS
TECHNIQUE?
micro-services infrastructure
@vixentael
public-oriented interfaces
non-trusted client side (browsers, IoT devices)
hard to store keys securely
Slide 36
Slide 36 text
HOW TO IMPLEMENT?
ACRA
https://github.com/cossacklabs/acra
GREEN SQL
https://github.com/larskanis/greensql-fw
HEXATIER
http://www.hexatier.com/
ORACLE DATABASE
FIREWALL / TDE
http://www.oracle.com/
@vixentael
Slide 37
Slide 37 text
No content
Slide 38
Slide 38 text
CLIENT-SIDE
ENCRYPTION
Slide 39
Slide 39 text
MOVE TRUST TO CLIENTS
session hijacking
unattended backups
MitM
replay attacks
misconfigured ACL
trusted element in
infrastructure
@vixentael
Slide 40
Slide 40 text
P2P TRUST
system doesn’t know
anything about data
encrypted
containers
user-generated
keys
@vixentael
Slide 41
Slide 41 text
ZERO KNOWLEDGE
ARCHITECTURES
@vixentael
Slide 42
Slide 42 text
ZKA is a design principle that
enables software to provide services
over protected client data without
having an unencrypted access to it.
@vixentael
Slide 43
Slide 43 text
e2ee clients
@vixentael
ZKA INCLUDES:
Slide 44
Slide 44 text
e2ee clients
all operations are on encrypted data:
– control access to data from different users
– CRUD
– search (in encrypted data)
ZKA INCLUDES:
@vixentael
Slide 45
Slide 45 text
weak key management
algorithm weakness
user pocket
attack surface
RISKS FOR ZKA:
@vixentael
Slide 46
Slide 46 text
WHEN TO USE ZKA?
trusted client side (mobile, HSM/TPM)
@vixentael
Slide 47
Slide 47 text
ZKA is already solved for
specific use-cases or
in a naive ways
@vixentael
Slide 48
Slide 48 text
MESSAGING END-TO-END
ENCRYPTION
@vixentael
Slide 49
Slide 49 text
AUTHENTICATION ZERO KNOWLEDGE
PROOF
https://www.cossacklabs.com/zero-
knowledge-protocols-without-magic.html
@vixentael
Slide 50
Slide 50 text
COLLABORATING
ON DATA
– store encrypted
– share with others
– manage access to
parties
???
@vixentael
Cryptography is well implemented,
if it allows to narrow attack surface,
and increase control of data.
@vixentael
Slide 61
Slide 61 text
if the system has
one perimeter,
it will fail!
ECHELONIZATION
@vixentael
Slide 62
Slide 62 text
#qconlondon @vixentael
..add more layers
of defense
ECHELONIZATION
Slide 63
Slide 63 text
EXCEPT CRYPTO, YOU ALSO NEED
log and monitor events
credential management
access control, access logging
firewall, IDS, infrastructure management
...
Slide 64
Slide 64 text
https://pdos.csail.mit.edu/papers/cryptobugs:apsys14.pdf
269 CVEs
from 2011-2014
17%
83%
bugs inside crypto libs
misuses of crypto libs
by individual apps
@vixentael
Slide 65
Slide 65 text
2
RECAP
Slide 66
Slide 66 text
THINGS TO REMEMBER
1. cryptography aims to narrow the attack surface
2. choose relevant encryption scheme
3. combine cryptography and classic security
techniques
@vixentael
4. echelonization, compartmentalization
Slide 67
Slide 67 text
https://medium.freecodecamp.org/preventing-leaks-and-injections-in-your-database-
be3743af7614
How to prevent database leaks and injections
https://medium.com/@cossacklabs/12-and-1-ideas-how-to-enhance-backend-data-
security-4b8ceb5ccb88
12 and 1 ideas how to enhance backend data security
BACKEND SECURITY
https://www.cossacklabs.com/blog/gdpr-for-engineers.html
GDPR for engineers: technical requirements
https://samnewman.io/talks/insecure-transit-microservice-security/
Insecure Transit - Microservice Security
Slide 68
Slide 68 text
CRYPTOGRAPHY
https://hackernoon.com/eli5-zero-knowledge-proof-78a276db9eff
Explain Like I’m 5: Zero Knowledge Proof
https://www.owasp.org/index.php/Secure_Coding_Cheat_Sheet
Secure Coding Cheat Sheet
https://www.owasp.org/index.php/OWASP_Secure_Coding_Practices_-
_Quick_Reference_Guide
Secure Coding Practices
Slide 69
Slide 69 text
@vixentael
cryptographic software,
security consulting,
developers training
github.com/
vixentael/my-talks