SlideShare uma empresa Scribd logo
1 de 53
Baixar para ler offline
Improving password-based authentication
Improving

password-based
authentication
Frank Denis @jedisct1
Improving password-based authentication
What’s wrong with
passwords?
Improving password-based authentication
Passwords are reused: find one, pwn many.
Companies don’t always communicate
about a breach until they are forced to.
Which can have side effects if discovered
when you are negotiating an acquisition
by Verizon.
Breaches happen all the time, even big
corporations and banks cannot be trusted.
Improving password-based authentication
API keys are passwords, too.
Committed to public repositories.
Present on present and past employees
laptops.
Long-term, shared secrets.
Intentionally leaked by customers because
you asked them to!
Improving password-based authentication
OpenDNS

support

forum
Improving password-based authentication
Password!
https://support.opendns.com/hc/en-us/community/posts/220033527-OpenDNS-Blocking-never-set-it-up
Many more leaks happen due to bad design.

Ex: HTTP_REFERER
Improving password-based authentication
Face it: passwords are here to stay
Convenient, universal way to log in from
anywhere, on any device.
Today’s passwords might be less terrible

than 10 years ago.
This is something you know, not something

that you have. Stealing them requires a $5

wrench.
Improving password-based authentication
How to survive a
password breach
Improving password-based authentication
Database encryption
Useless against other threats we are going

to talk about soon.
Useless if the key is leaked.
Useless if passwords are leaked using a

post-decryption vulnerability.
Improving password-based authentication
Hashing
Gives a false sense of security
Deterministic

Can be broken by using Google.
Improving password-based authentication
Hashing with a salt
Defeats rainbow tables.
This is not enough.
Improving password-based authentication
Hashing with a salt
Every time a new breach is announced,
about 70% of the passwords were already
present in previous lists.
Lists of > 500 million passwords from
previous breaches can be freely
downloaded.
What about the remaining 30%?
Improving password-based authentication
Hashing with a salt
A personal cracking rig can run 100 billion
guesses per second.
An exhaustive search of all the possible 8
characters passwords can be performed by
a single rig in less than a day.
But wait… it gets worse…
Improving password-based authentication
Hashing with a salt
Password entropy is almost always
overestimated.
Improving password-based authentication
Hashing with a salt
Humans are bad at generating randomness.
Improving password-based authentication
Hashing with a salt
Modern password crackers use
permutations, substitutions, Markov chains,
and neural networks in order to efficiently
probe the key space.
Smart contracts can reward people for
cracking passwords.
Improving password-based authentication
CPU-hard hash functions
PBKDF2, bcrypt
Can be massively parallelized
A perfect fit for GPUs and ASICs
We’d like to minimize the advantage
attackers have over defenders.
Improving password-based authentication
Memory-hard hash functions
scrypt
Require a lot of memory: each iteration
requires data from previous iterations.
TMTO attacks.
Improving password-based authentication
2013-2015: password hashing competition
Winner: Argon2
For a given set of parameters, computing a
hash requires a fixed amount of silicon
(transistors, capacitors, routing).
Improving password-based authentication
2015-2019: Argon2 adoption
libsodium, libargon2
Now available for all programming
languages.
Quickly adopted by cryptocurrencies and

applications.
Not a good fit for JavaScript, though.
Improving password-based authentication
2019
We realized that some practical
requirements had been overlooked.
What we may need is cache-hard functions
instead of memory-hard functions.
Due to CPU caches, Argon2 is actually
worse than bcrypt for some parameters.
Improving password-based authentication
2019
Still, if you use any of the functions from the
previous slides, you’ll be in a far better
position than virtually everyone else in the
industry.
Yes, even with random parameters.
Improving password-based authentication
It could have been the
last slide, but…
Improving password-based authentication
Password hashing is an expensive
operation, done server-side.
Introduces a DoS vector.
Choosing optimal parameters is hard.
Improving password-based authentication
Client Server
password over TLS
Improving password-based authentication
Client Server
password over TLS
TLS termination
Improving password-based authentication
Client ServerEnterprise security gateway
SSL added and removed here!
Improving password-based authentication
Client ServerISP
Improving password-based authentication
Passwords can be found in application
logs, displayed on error pages.
Sent to 3rd party services (New Relic,
Datadog…)
Affected Facebook and Twitter.
Password hashing doesn’t do anything.
Improving password-based authentication
Insider threats. Cloud providers.
This is a stealth, passive attack.
Password hashing doesn’t do anything.
Running tcpdump on a production server
can be all it takes.
Improving password-based authentication
Passwords should not
be sent over a network
any more.
Improving password-based authentication
Public-key cryptography to the rescue
Passwordless SSH
Client certificates are widely supported by
web servers and browsers, but they’re
barely usable.
Private keys stay on the clients. Their public
counterparts being leaked is no big deal.
Improving password-based authentication
Deterministic keys from passwords
Derive keys from passwords; servers can
then use public keys for authentication.
h ← H(pwd)
(pk, sk) ← H2KP(h)
The client does the hard work (or a part of
it): no more DoS vector!
But this is deterministic; public keys can be
precomputed from password dictionaries.
Improving password-based authentication
h ← H(s, pwd)
(pk, sk) ← H2KP(h)
But how does the client get the salt?
Deterministic keys from passwords
Client ServerS(sk, n)
Client ServerV(pk, S(sk, n))
Client Servern
Improving password-based authentication
h ← H(s, pwd)
(pk, sk) ← H2KP(h)
Client Servern, s
Client ServerS(sk, n)
Client ServerV(pk, S(sk, n))
Client Servername
But wait…
Improving password-based authentication
Now, the salt is public
Not secure against targeted
precomputation
Improving password-based authentication
A B?
A B?
x
?f(x)
Oblivious transfer
Improving password-based authentication
A Bg(xr
)
A Bxr
(mod p)
x, r g
f(x) = g(xr
)1/r
(mod p)
(V)OPRFs
blind(x)
Improving password-based authentication
A Bg(xr
)
A Bxr
x, r k
f(x) = g(xr
)1/r
(V)OPRFs
g(x) = xk
blind(x)
random oracle for A
Improving password-based authentication
Client Serverg ∘ blind(s)
Client Serverblind(s)
OPAQUE blind salts
h′ ← H′(pwd)
s ← H2S(h′)
s′ ← g(s)
Improving password-based authentication
Client Serverg ∘ blind(s)
Client Serverblind(s)
OPAQUE blind salts
s′ ← g(s)
h ← H(s, pwd)
(pk, sk) ← H2KP(h)
h′ ← H′(pwd)
s ← H2S(h′)
Improving password-based authentication
Client Serverg ∘ blind(s), n
Client ServerS(sk, n)
Client ServerV(pk, S(sk, n))
Client Servername, blind(s)
A shared session key can also be
computed.
User enumeration can be prevented.
Improving password-based authentication
The server doesn’t know the salt.
Defeats precomputation.
Every attempt requires an interaction with
the server.
Knowing the salt requires knowing the
password.
Proof of concept implemented for
Terrarium.
Improving password-based authentication
PAKEs
Improving password-based authentication
PAKEs
Password-based authentication.
Use cases:
More generally: secure key exchange from

low-entropy secrets. Ex: Magic Wormhole, 

biometric authentication, pairing IoT devices,

QRCode-based pairing…
Bootstraping a PKI
Improving password-based authentication
The PAKE selection process
SRP and SCRAM can be improved.
Improving password-based authentication
Deployment
Requires tight coupling with operating

systems and web browsers.
Integration into TLS 1.3 is being considered.
May be a solid defense against phishing.
Browser vendors haven’t been involved yet.
Improving password-based authentication
Improving password-based authentication
Dependencies
Improving password-based authentication
Dependencies
Improving password-based authentication
Dependencies
Improving password-based authentication
Terrarium demo - Shows that PAKEs need

shared code between clients and servers, and
that WebAssembly can help with that.
SPAKE2+EE implementation for libsodium.
Now in libsodium 1.0.18 and wasm-crypto:

- hash-to-curve

- ristretto

- arithmetic to implement (V)OPRFs.
https://github.com/jedisct1/wasm-crypto https://sk.tl/66AuXfXS
Improving password-based authentication
Thanks!

Mais conteúdo relacionado

Mais procurados

Profiling your Applications using the Linux Perf Tools
Profiling your Applications using the Linux Perf ToolsProfiling your Applications using the Linux Perf Tools
Profiling your Applications using the Linux Perf Tools
emBO_Conference
 
Cours python
Cours pythonCours python
Cours python
salmazen
 
Porting a new architecture (NDS32) to open wrt project
Porting a new architecture (NDS32) to open wrt projectPorting a new architecture (NDS32) to open wrt project
Porting a new architecture (NDS32) to open wrt project
Macpaul Lin
 

Mais procurados (13)

АНАСТАСІЯ РУСОВА «Побудова якості в команді без тестувальників – міф чи реаль...
АНАСТАСІЯ РУСОВА «Побудова якості в команді без тестувальників – міф чи реаль...АНАСТАСІЯ РУСОВА «Побудова якості в команді без тестувальників – міф чи реаль...
АНАСТАСІЯ РУСОВА «Побудова якості в команді без тестувальників – міф чи реаль...
 
Introduction à JPA (Java Persistence API )
Introduction à JPA  (Java Persistence API )Introduction à JPA  (Java Persistence API )
Introduction à JPA (Java Persistence API )
 
CNTUG x SDN Meetup #33 Talk 1: 從 Cilium 認識 cgroup ebpf - Ruian
CNTUG x SDN Meetup #33  Talk 1: 從 Cilium 認識 cgroup ebpf - RuianCNTUG x SDN Meetup #33  Talk 1: 從 Cilium 認識 cgroup ebpf - Ruian
CNTUG x SDN Meetup #33 Talk 1: 從 Cilium 認識 cgroup ebpf - Ruian
 
Profiling your Applications using the Linux Perf Tools
Profiling your Applications using the Linux Perf ToolsProfiling your Applications using the Linux Perf Tools
Profiling your Applications using the Linux Perf Tools
 
OVN 設定サンプル | OVN config example 2015/12/27
OVN 設定サンプル | OVN config example 2015/12/27OVN 設定サンプル | OVN config example 2015/12/27
OVN 設定サンプル | OVN config example 2015/12/27
 
Testes pythonicos com pytest
Testes pythonicos com pytestTestes pythonicos com pytest
Testes pythonicos com pytest
 
2 years with python and serverless
2 years with python and serverless2 years with python and serverless
2 years with python and serverless
 
PythonOOP
PythonOOPPythonOOP
PythonOOP
 
COURS_PYTHON_22.ppt
COURS_PYTHON_22.pptCOURS_PYTHON_22.ppt
COURS_PYTHON_22.ppt
 
Cours python
Cours pythonCours python
Cours python
 
Practical non blocking microservices in java 8
Practical non blocking microservices in java 8Practical non blocking microservices in java 8
Practical non blocking microservices in java 8
 
Introduction à Python
Introduction à PythonIntroduction à Python
Introduction à Python
 
Porting a new architecture (NDS32) to open wrt project
Porting a new architecture (NDS32) to open wrt projectPorting a new architecture (NDS32) to open wrt project
Porting a new architecture (NDS32) to open wrt project
 

Semelhante a Improving password-based authentication

Secure Communication with an Insecure Internet Infrastructure
Secure Communication with an Insecure Internet InfrastructureSecure Communication with an Insecure Internet Infrastructure
Secure Communication with an Insecure Internet Infrastructure
webhostingguy
 
Hacking Client Side Insecurities
Hacking Client Side InsecuritiesHacking Client Side Insecurities
Hacking Client Side Insecurities
amiable_indian
 

Semelhante a Improving password-based authentication (20)

Secure Communication with an Insecure Internet Infrastructure
Secure Communication with an Insecure Internet InfrastructureSecure Communication with an Insecure Internet Infrastructure
Secure Communication with an Insecure Internet Infrastructure
 
Secure socket layer
Secure socket layerSecure socket layer
Secure socket layer
 
Securing Network Access with Open Source solutions
Securing Network Access with Open Source solutionsSecuring Network Access with Open Source solutions
Securing Network Access with Open Source solutions
 
TLS and Certificates
TLS and CertificatesTLS and Certificates
TLS and Certificates
 
"Crypto wallets security. For developers", Julia Potapenko
"Crypto wallets security. For developers", Julia Potapenko"Crypto wallets security. For developers", Julia Potapenko
"Crypto wallets security. For developers", Julia Potapenko
 
Raconte-moi X.509 : anatomie d'une autorité de certification
Raconte-moi X.509 : anatomie d'une autorité de certificationRaconte-moi X.509 : anatomie d'une autorité de certification
Raconte-moi X.509 : anatomie d'une autorité de certification
 
Delivering Javascript to World+Dog
Delivering Javascript to World+DogDelivering Javascript to World+Dog
Delivering Javascript to World+Dog
 
Hacking Client Side Insecurities
Hacking Client Side InsecuritiesHacking Client Side Insecurities
Hacking Client Side Insecurities
 
Best Practices of IoT in the Cloud
Best Practices of IoT in the CloudBest Practices of IoT in the Cloud
Best Practices of IoT in the Cloud
 
Best Practices for IoT Security in the Cloud
Best Practices for IoT Security in the CloudBest Practices for IoT Security in the Cloud
Best Practices for IoT Security in the Cloud
 
Defending Against Attacks With Rails
Defending Against Attacks With RailsDefending Against Attacks With Rails
Defending Against Attacks With Rails
 
Believe It Or Not SSL Attacks
Believe It Or Not SSL AttacksBelieve It Or Not SSL Attacks
Believe It Or Not SSL Attacks
 
Best Practices for IoT Security in the Cloud
Best Practices for IoT Security in the CloudBest Practices for IoT Security in the Cloud
Best Practices for IoT Security in the Cloud
 
How to get along with HATEOAS without letting the bad guys steal your lunch?
How to get along with HATEOAS without letting the bad guys steal your lunch?How to get along with HATEOAS without letting the bad guys steal your lunch?
How to get along with HATEOAS without letting the bad guys steal your lunch?
 
Password (in)security
Password (in)securityPassword (in)security
Password (in)security
 
Seattle C* Meetup: Hardening cassandra for compliance or paranoia
Seattle C* Meetup: Hardening cassandra for compliance or paranoiaSeattle C* Meetup: Hardening cassandra for compliance or paranoia
Seattle C* Meetup: Hardening cassandra for compliance or paranoia
 
Gartner Security & Risk Management Summit 2018
Gartner Security & Risk Management Summit 2018Gartner Security & Risk Management Summit 2018
Gartner Security & Risk Management Summit 2018
 
MITRE ATT&CKcon 2018: Playing Devil’s Advocate to Security Initiatives with A...
MITRE ATT&CKcon 2018: Playing Devil’s Advocate to Security Initiatives with A...MITRE ATT&CKcon 2018: Playing Devil’s Advocate to Security Initiatives with A...
MITRE ATT&CKcon 2018: Playing Devil’s Advocate to Security Initiatives with A...
 
Jon McCoy - AppSec-USA-2014 Hacking C#(.NET) Applications:Defend by Design
Jon McCoy - AppSec-USA-2014 Hacking C#(.NET) Applications:Defend by DesignJon McCoy - AppSec-USA-2014 Hacking C#(.NET) Applications:Defend by Design
Jon McCoy - AppSec-USA-2014 Hacking C#(.NET) Applications:Defend by Design
 
BCS_PKI_part1.ppt
BCS_PKI_part1.pptBCS_PKI_part1.ppt
BCS_PKI_part1.ppt
 

Mais de Frank Denis (7)

El Passo - Privacy-preserving single sign on
El Passo - Privacy-preserving single sign onEl Passo - Privacy-preserving single sign on
El Passo - Privacy-preserving single sign on
 
This domain name will self-destruct tomorrow
This domain name will self-destruct tomorrowThis domain name will self-destruct tomorrow
This domain name will self-destruct tomorrow
 
Malware vs Big Data
Malware vs Big DataMalware vs Big Data
Malware vs Big Data
 
Abusing Javascript to speedup mobile web sites
Abusing Javascript to speedup mobile web sitesAbusing Javascript to speedup mobile web sites
Abusing Javascript to speedup mobile web sites
 
An introduction to Pincaster
An introduction to PincasterAn introduction to Pincaster
An introduction to Pincaster
 
Graphs
GraphsGraphs
Graphs
 
Redis - (nosqlfr meetup #2)
Redis - (nosqlfr meetup #2) Redis - (nosqlfr meetup #2)
Redis - (nosqlfr meetup #2)
 

Último

VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
dharasingh5698
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
ankushspencer015
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
Tonystark477637
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Christo Ananth
 

Último (20)

Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdf
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSIS
 
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank  Design by Working Stress - IS Method.pdfIntze Overhead Water Tank  Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01
 
Glass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesGlass Ceramics: Processing and Properties
Glass Ceramics: Processing and Properties
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduits
 
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELLPVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
 

Improving password-based authentication