Noise Explorer
Fully automated modeling, analysis and verification for arbitrary Noise protocols
Nadim Kobeissi Karthikeyan Bhargavan
IACR Real World Crypto Symposium 2019 San Jose, California
Noise Explorer Fully automated modeling, analysis and verification - - PowerPoint PPT Presentation
Noise Explorer Fully automated modeling, analysis and verification for arbitrary Noise protocols IACR Real World Crypto Nadim Kobeissi Symposium 2019 Karthikeyan Bhargavan San Jose, California Noise Protocol Framework: What is it? A
Fully automated modeling, analysis and verification for arbitrary Noise protocols
Nadim Kobeissi Karthikeyan Bhargavan
IACR Real World Crypto Symposium 2019 San Jose, California
Example Noise Handshake Pattern
NK: <- s ...
<- e, ee
A Framework for Secure Channel Protocols
agreement.
messages.
state transformations are derived.
2
3
https://youtu.be/3gipxdJ22iM
Example Noise Handshake Pattern
IK: <- s ...
<- e, ee, se
Handshake Pattern Notation
they appear in a message.
state.
agreement, encryption on certain payload elements kicks in automatically.
4
Example Noise Handshake Pattern
XX:
<- e, ee, s, es
State Transformation Functions
EncryptAndHash, HKDF, etc.
CipherState, SymmetricState, HandshakeState.
processing tokens in messages: MixHash, MixKey, etc.
5
WireGuard
IKpsk2: <- s ...
<- e, ee, se, psk
XX:
<- e, ee, s, es
IK: <- s ...
<- e, ee, se
6
Example Noise Handshake Pattern
KN:
...
<- e, ee, se 0 3
<- 0 5
Grade Based System
7
Example Noise Handshake Pattern
KN:
...
<- e, ee, se 0 3
<- 0 5
Authentication Grades
party, including an active attacker.”
authentication vulnerable to KCI.
been compromised, this authentication can be forged.”
authentication resistant to KCI.
secure, this authentication cannot be forged.”
8
Example Noise Handshake Pattern
KN:
...
<- e, ee, se 0 3
<- 0 5 Confidentiality Grades
recipient.
involves an ephemeral-ephemeral DH ("ee"). However, the sender has not authenticated the recipient, so this payload might be sent to any party, including an active attacker.”
compromise only, vulnerable to replay.
even at a later date, this payload can be decrypted. This message can also be replayed, since there's no ephemeral contribution from the recipient.”
9
Example Noise Handshake Pattern
KN:
...
<- e, ee, se 0 3
<- 0 5 Confidentiality Grades
been forged by an active attacker. In this case, the attacker could later compromise the recipient's static private key to decrypt the payload.”
sender’s private key was compromised.
compromised, the recipient's alleged ephemeral public key may have been forged by an active attacker. In this case, the attacker could later compromise the intended recipient's static private key to decrypt the payload.”
the recipient is not being actively impersonated by an attacker that has stolen its static private key, this payload cannot be decrypted.”
10
Noise Allows for Use-Case Specific Protocols
to everything.
promises any Noise Handshake Pattern can give?
50+ Handshake Patterns in the Spec Alone
against (50+ · 10) = 500+ security queries?
11
12
ise Explorer Compendium dium: Formal verification results for 50+ Noise Handshake Patterns.
ener erat ate e Imp mplem emen entations tations: Generates full implementations of your Noise Handshake Pattern in JS and Go.
ign n Nois ise Protoc
spec validity checks, helpful visualizations.
ener erat ate e Model els for Forma mal Verif ific icatio ion: Symbolic models for ProVerif.
13
…with ProVerif.
Blanchet and team.
http://prosecco.gforge.inria.fr/personal /bblanche/proverif/
which has many, many, many uses of ProVerif: https://hal.inria.fr/tel- 01950884
Automated formal verification…
ever) methodology.
in models: Symbolic model and computational model.
can model protocol flows and try to find contradictions to security queries.
14
Diffie-Hellman in ProVerif
fun dhexp(key, key):key. equation forall a:key, b:key; dhexp(b, dhexp(a, g)) = dhexp(a, dhexp(b, g)).
Components to Model
are perfect symbolic black-boxes with no algebraic properties.
15
AEAD in ProVerif
fun encrypt(key, nonce, bitstring, bitstring):bitstring. fun decrypt(key, nonce, bitstring, bitstring):aead reduc
forall k:key, n:nonce, ad:bitstring, plaintext:bitstring; decrypt(k, n, ad, encrypt(k, n, ad, plaintext)) = aeadpack(true, ad, plaintext).
Components to Model
are perfect symbolic black-boxes with no algebraic properties.
etc.
16
State Management in ProVerif
letfun mixKeyAndHash(ss:symmetricstate, input_key_material:key) = let (cs:cipherstate, ck:key, h:bitstring) = symmetricstateunpack(ss) in let (ck:key, temp_h:key, temp_k:key) = hkdf(ck, input_key_material) in let (cs:cipherstate, temp_ck:key, h:bitstring) = symmetricstateunpack(mixHash(symmetricstat epack(cs, ck, h), key2bit(temp_h))) in symmetricstatepack(initializeKey(t emp_k), ck, h).
Components to Model
are perfect symbolic black-boxes with no algebraic properties.
etc.
all generated models.
17
Our Findings
security goals.
subtle attacks can be found.
18
Contributions to Noise Specification
Improvements to Revision 34:
grades.
19
20
50000 100000 150000 200000 250000 300000 BORINGSSL BEARSSL NOISEEXP: IK Lines of Code
21
Aspects that will be demonstrated:
https://noiseexplorer.com/patterns/IK/ (as an example)
22
Upcoming Work in Noise
crypto overhaul.
implementations?
Small, Use-Case Specific Protocols
Handshake Patterns can be smaller. (Great post by David Wong: https://cryptologie.net/article/446/qui c-crypto-and-simple-state-machines/)
specific state machine than TLS or similar.
23
Noise Explorer’s potential: the ultimate online compendium for reasoning about, designing, studying, implementing and verifying Noise Handshake Patterns. Special thanks: Bruno Blanchet, Trevor Perrin. Related work: Benjamin Lipp, WireGuard verification in CryptoVerif.