The Noise Protocol Framework, sometimes referred to as "Noise" or "Noise Framework", is a public domain cryptographic framework[1] for creating secure communication protocols based on Diffie–Hellman key exchange.[2] Developed by Trevor Perrin, the framework defines a series of handshake patterns—predefined sequences of message exchanges—that outline how parties initiate communication, exchange keys, and establish shared secrets. These patterns can be combined and customized to meet specific security requirements, such as mutual authentication, forward secrecy, and identity protection.
Several popular software applications and protocols, including the messaging platforms WhatsApp and Slack[3] and the VPN protocol WireGuard, have used implementations of the Noise Framework to ensure end-to-end encryption for user communications. The framework remains a topic of development, including post-quantum adaptations.[4] The framework is currently at revision 34, published in July 2018.[1]
Most secure channel protocols rely on authenticated key exchange (AKE) using digital signatures (for authentication) and Diffie–Hellman (for key exchange). In the 2000s–2010s, interest grew in developing pure Diffie–Hellman-based AKEs, without signatures,[5] leading to both theoretical (e.g., Kudla-Paterson,[6] NAXOS,[7] Ntor)[8] and practical advancements (e.g., Ntor,[8] NaCl, CurveCP, DNSCurve, OPTLS).[9] These were often developed from scratch. The Noise Protocol Framework was developed by Trevor Perrin, with support from Moxie Marlinspike, introducing two key innovations:[5]
The Framework evolved based on work initially conducted at Open Whisper Systems, the software organization from which the Signal Protocol and Signal messaging app originated. While unrelated to the signal processing concept of noise, the choice of “Noise” as the name for this cryptographic protocol might be a play on the signal vs. noise concept.
Originally maintained as a wiki starting from February 10, 2013,[12] the framework's development began with an initial commit to its specification on August 4, 2014.[13] The framework evolved through numerous revisions following mailing list discussions until version 34 on July 11, 2018.[14] The Noise Protocol Framework acknowledges[15] inspiration from previous cryptographic designs (e.g., NaCl, CurveCP or the KDF chains used in the Double Ratchet Algorithm) and contributions from figures in cryptography and computing (e.g., Jason Donenfeld, Hugo Krawczyk).
During its development, the Noise Protocol Framework evolved alongside TLS 1.3, including 2015 discussions[16] comparing the protocols, particularly the “OPTLS” proposal.[17] Both projects spanned from 2014 to 2018, with the first draft of TLS 1.3 RFC 8446[18] released in August 2014 and the final Proposed Standard in August 2018. The Noise Framework provided an alternative approach, enabling the selection of specific handshake patterns and cryptographic algorithms to design protocols tailored to specific security properties and performance needs.
Formal verifications[19] of the Noise Protocol Framework have evaluated its security properties. Studies have employed automated tools to model and verify various handshake patterns within the framework,[20][21] assessing their resilience against a range of attacks.
A secure channel protocol has two phases:
The handshake pattern can be described in a diagram as a set of messages, each annotated with a list of tokens that describe cryptographic operations performed on a party's handshake state.
Example handshake pattern having 3 messages: IK <- s ... -> e, es, s, ss <- e, ee, se
IK
Handshake names are formulaic:
I
K
The line(s) before ... represent a message prior to DH AKE such as an out-of-band transfer of a public key.
...
The specification lists three one-way handshake patterns, and 12 fundamental interactive handshake patterns. There are variations of some of these:
1
NK1
X1X1
Npsk0
Xpsk1
fallback
A real world example comes from WireGuard whose Construction on page 10 of the Whitepaper is Noise_IKpsk2_25519_ChaChaPoly_BLAKE2s.
Noise_IKpsk2_25519_ChaChaPoly_BLAKE2s
Each handshake pattern can be combined with one of the 16 combination of the 8 cryptographic algorithms listed in the Specification. As those algorithms are of comparable quality and do not enlarge the design space.
The Specification outlines an API in §5[23] using the following objects each having a small set of methods:
CipherState
SymmetricState
HandshakeState
The implementation of a concrete protocol involves the design of message representation, as well as aspects outside the Noise Framework. An example of the latter happens with protocols using UDP transports, such as WireGuard which uses a sliding window to handle out-of-order arrival.
Security properties of several handshake patterns are described in the Specification and can support mutual authentication, forward secrecy, zero round-trip encryption, identity hiding and other advanced features . Formal cryptographic analyses of common handshake patterns have appeared in the academic literature.[24][25] The second effort has resulted in the online tool Noise Explorer.[26]
Much of the following consists of excerpts from the Specification with formatting:
with the focus on:
To produce a Noise Protocol name for Initialize() you concatenate the ASCII string Noise_ with four underscore-separated name sections which sequentially name the handshake pattern, the DH functions, the cipher functions, and then the hash functions. The resulting name must be 255 bytes or less.[27] Examples:
Initialize()
Noise_
Noise_XX_25519_AESGCM_SHA256
Noise_N_25519_ChaChaPoly_BLAKE2s
Noise_IK_448_ChaChaPoly_BLAKE2b
Each name section must consist only of alphanumeric characters (i.e. characters in one of the ranges "A"..."Z", "a"..."z", and "0"..."9"), and the two special characters "+" and "/".
Additional rules apply to each name section, as specified below.
A handshake pattern name section contains a handshake pattern name plus a sequence of zero or more pattern modifiers.[28]
The handshake pattern name must be an uppercase ASCII string containing only alphabetic characters or numerals (e.g. XX1 or IK).
XX1
Pattern modifiers specify arbitrary extensions or modifications to the behavior specified by the handshake pattern. For example, a modifier could be applied to a handshake pattern which transforms it into a different pattern according to some rule. The psk0 and fallback modifiers are examples of this, and will be defined later in this document.
psk0
A pattern modifier is named with a lowercase alphanumeric ASCII string which must begin with an alphabetic character (not a numeral). The pattern modifier is appended to the base pattern as described below:
The first modifier added onto a base pattern is simply appended. Thus the fallback modifier, when added to the XX pattern, produces XXfallback. Additional modifiers are separated with a plus sign. Thus, adding the psk0 modifier would result in the name section XXfallback+psk0, or a full protocol name such as Noise_XXfallback+psk0_25519_AESGCM_SHA256.
XX
XXfallback
XXfallback+psk0
Noise_XXfallback+psk0_25519_AESGCM_SHA256
In some cases the sequential ordering of modifiers will specify different protocols. However, if the order of some modifiers does not matter, then they are required to be sorted alphabetically (this is an arbitrary convention to ensure interoperability).
The rules for the DH, cipher, and hash name sections are identical. Each name section must contain one or more algorithm names separated by plus signs.[29]
Each algorithm name must consist solely of alphanumeric characters and the forward-slash character ("/"). Algorithm names are recommended to be short, and to use the "/" character only when necessary to avoid ambiguity (e.g. SHA3/256 is preferable to SHA3256).
SHA3/256
SHA3256
In most cases there will be a single algorithm name in each name section (i.e. no plus signs). Multiple algorithm names are only used when called for by the pattern or a modifier.
None of the patterns or modifiers in this document require multiple algorithm names in any name section. However, this functionality might be useful in future extensions. For example, multiple algorithm names might be used in the DH section to specify "hybrid" post-quantum forward secrecy; or multiple hash algorithms might be specified for different purposes.
The Specification lists 8 modern algorithms with the following names.[30][31]
25519
448
ChaChaPoly
AESGCM
SHA256
SHA512
BLAKE2s
BLAKE2b
The Wiki has this list of unofficial algorithms;[32] I've omitted the Post-Quantum ones as the entries pre-date the NIST Post-Quantum Cryptography Standardization effort starting in 2016 with the first three Post Quantum Crypto Standards: FIPS 203, FIP 204, and FIP 205 in 2024.
Here we[who?] document some names which could be used for nonstandard algorithms, so that experimental use of these algorithms could use consistent names (NOTE: None of these algorithms are endorsed for use with Noise, use at your own risk).
secp256k1
FourQ
NIST P256
NIST P384
NIST P521
DeoxysII
AESGCMSIV
AESPMACSIV
Kravatte
KravatteSIV
SHA3/512
SHAKE128
SHAKE256
K12
M14
Noise Protocols have a prologue input which allows arbitrary data to be hashed into the h variable. If both parties do not provide identical prologue data, the handshake will fail due to a decryption error. This is useful when the parties engaged in negotiation prior to the handshake and want to ensure they share identical views of that negotiation.[42]
For example, suppose Bob communicates to Alice a list of Noise Protocols that he is willing to support. Alice will then choose and execute a single protocol. To ensure that a "man-in-the-middle" did not edit Bob's list to remove options, Alice and Bob could include the list as prologue data.
Note that while the parties confirm their prologues are identical, they don't mix prologue data into encryption keys. If an input contains secret data that's intended to strengthen the encryption, a PSK handshake should be used instead (see §9).
The following handshake patterns represent "one-way" handshakes supporting a one-way stream of data from a sender to a recipient. These patterns could be used to encrypt files, database records, or other non-interactive data streams.[43]
Following a one-way handshake the sender can send a stream of transport messages, encrypting them using the first CipherState returned by Split() The second CipherState from Split() is discarded - the recipient must not send any messages using it (as this would violate the rules in §7.3).
Split()
One-way patterns are named with a single character, which indicates the status of the sender's static key:
N
X
N:
<- s ... -> e, es
K:
-> s <- s ... -> e, es, ss
X:
<- s ... -> e, es, s, ss
N is a conventional DH-based public-key encryption. The other patterns add sender authentication, where the sender's public key is either known to the recipient beforehand (K) or transmitted under encryption (X).
The following handshake patterns represent interactive protocols. These 12 patterns are called the "fundamental" interactive handshake patterns.[44]
The fundamental interactive patterns are named with two characters, which indicate the status of the initiator and responder's static keys:
The first character refers to the initiator's static key:
The second character refers to the responder's static key:
NN
-> e
<- e, ee
->
NK
<- s
-> e, es
NX
<- e, ee, s, es
XN
-> s, se
<-
XK
KN
-> s
<- e, ee, se
KK
-> e, es, ss
KX
<- e, ee, se, s, es
IN
-> e, s
-> e, es, s, ss
IX
The first two columns in the table above, prior to each message pattern, lists the security properties for Noise handshake and transport payloads for all the one-way patterns in §7.4 and the fundamental patterns in §7.5. Each payload is assigned a "source" property regarding the degree of authentication of the sender provided to the recipient, and a "destination" property regarding the degree of confidentiality provided to the sender.
For the sender:
Used by: IN#1, IN#2, IN#4, IX#1, KN#2, KN#3, KN#5, KX#2, NK#2, NK#4, NN#1, NN#2, NN#3, NX#1, NX#3, XK#2, XN#1, XN#2, XN#4, XX#1
Used by: IK#2, IN#3, KK#3, KN#4, NK#3, NN#2, NN#3, NX#2, XK#3, XN#2, XN#3, XX#2
Used by: IK#2, IK#3, IK#4, IK#5, IN#3, IX#2, IX#3, IX#4, KK#3, KK#4, KK#5, KK#6, KN#4, KX#3, KX#4, KX#5, NK#2, NK#3, NX#2, XK#2, XK#3, XK#4, XK#5, XN#3, XX#2, XX#3, XX#4
For the recipient:
Used by: IN#2, IX#2, KN#3, KX#3
Used by: IK#3, KK#4
Used by: IK#4, IK#5, IN#4, IX#3, IX#4, KK#5, KK#6, KN#5, KX#4, KX#5, NK#4, NX#3, XK#4, XK#5, XN#4, XX#3, XX#4
The following table lists the identity-hiding properties for all the one-way handshake patterns in §7.4 and the fundamental handshake patterns in §7.5. In addition, we list a few deferred handshake patterns which have different identity-hiding properties than the corresponding fundamental pattern.[45]
Each pattern is assigned properties describing the confidentiality supplied to the initiator's static public key, and to the responder's static public key. The underlying assumptions are that ephemeral private keys are secure, and that parties abort the handshake if they receive a static public key from the other party which they don't trust.
This section only considers identity leakage through static public key fields in handshakes. Of course, the identities of Noise participants might be exposed through other means, including payload fields, traffic analysis, or metadata such as IP addresses.
XK1
IK1
The properties for the relevant public key are:
The fundamental handshake patterns in the previous section perform DH operations for authentication (es and se) as early as possible.[46]
An additional set of handshake patterns can be described which defer these authentication DHs to the next message. To name these deferred handshake patterns, the numeral 1 is used after the first and/or second character in a fundamental pattern name to indicate that the initiator and/or responder's authentication DH is deferred to the next message.
Deferred patterns might be useful for several reasons:
Below are two examples showing a fundamental handshake pattern on the left, and deferred variant(s) on the right. The full set of 23 deferred handshake patterns are in the Appendix §18.[47]
X1X
[48]
So far we've assumed Alice and Bob wish to execute a single Noise Protocol chosen by the initiator (Alice). However, there are a number of reasons why Bob might wish to switch to a different Noise Protocol after receiving Alice's first message. For example:[49]
Alice might have chosen a Noise Protocol based on a cipher, DH function, or handshake pattern which Bob doesn't support.
Alice might have sent a "zero-RTT" encrypted initial message based on an out-of-date version of Bob's static public key or PSK.
Handling these scenarios requires a compound protocol where Bob switches from the initial Noise Protocol chosen by Alice to a new Noise Protocol. In such a compound protocol the roles of initiator and responder would be reversed - Bob would become the initiator of the new Noise Protocol, and Alice the responder.
Compound protocols introduce significant complexity as Alice needs to advertise the Noise Protocol she is beginning with and the Noise Protocol(s) she is capable of switching to, and both parties have to negotiate a secure transition.
These details are largely out of scope for this document. However, to give an example of how compound protocols can be constructed, and to provide some building blocks, the following sections define a fallback modifier and show how it can be used to create a Noise Pipe compound protocol.
Noise Pipes support the XX pattern, but also allow Alice to cache Bob's static public key and attempt an IK handshake with 0-RTT encryption.
In case Bob can't decrypt Alice's initial IK message, he will switch to the XXfallback pattern, which essentially allows the parties to complete an XX handshake as if Alice had sent an XX initial message instead of an IK initial message.
The fallback modifier converts an Alice-initiated pattern to a Bob-initiated pattern by converting Alice's initial message to a pre-message that Bob must receive through some other means (e.g. via an initial IK message from Alice). After this conversion, the rest of the handshake pattern is interpreted as a Bob-initiated handshake pattern.[50]
For example, here is the fallback modifier applied to XX to produce XXfallback:
XX:
-> e <- e, ee, s, es -> s, se
XXfallback:
-> e ... <- e, ee, s, es -> s, se
Note that fallback can only be applied to handshake patterns in Alice-initiated form where Alice's first message is capable of being interpreted as a pre-message (i.e. it must be either e, s, or "e, s").
A typical compound protocol for zero-RTT encryption involves three different Noise Protocols:[51]
There must be some way for Bob to distinguish the full versus zero-RTT cases on receiving the first message. If Alice makes a zero-RTT attempt, there must be some way for her to distinguish the zero-RTT versus switch cases on receiving the response.
For example, each handshake message could be preceded by some negotiation data, such as a type byte (see §13). This data is not part of the Noise message proper, but signals which Noise Protocol is being used.
This section defines the Noise Pipe compound protocol. The following handshake patterns satisfy the full, zero-RTT, and switch roles discussed in the previous section, so can be used to provide a full handshake with a simple zero-RTT option:[22]
IK:
<- s ... -> e, es, s, ss <- e, ee, se
The XX pattern is used for a full handshake if the parties haven't communicated before, after which Alice can cache Bob's static public key.
The IK pattern is used for a zero-RTT handshake.
The XXfallback pattern is used for a switch handshake if Bob fails to decrypt an initial IK message (perhaps due to having changed his static key).
Email from Trevor Perrin on 4-Mar-2018[52]
I've created a draft spec for an "NLS" framework that adds a negotiation language ("NoiseLingo") on top of NoiseSocket (hence "NoiseLingoSocket"). This is based on ideas from 1.[53] This needs a tweaked NoiseSocket draft, with modifications from 2[54] (renaming a couple things, and changing the prologue calculation to differentiate the "retry" case, and to add an application prologue): The NLS Framework[55] The NoiseSocket Protocol[56] The NLS draft also defines some "basic profiles", which are intended as high-level protocols usable by application developers: NoiseLink (1-RTT handshake) NoiseZeroLink (0-RTT handshake) NoiseShortLink (for low-end embedded) NoiseAnonBox (public-key encryption) NoseAuthBox (public-key encryption + sender auth) The idea is that NoiseLingo and NLS give you a menu of negotiation fields that are easy to choose from to create profiles. Also, these profiles will have a lot of similarity and thus potential for interop (e.g. a NoiseZeroLink client can talk to a NoiseLink server, by falling back to 1-RTT). And if you start with something simple like NoiseLink, it's easy to add new NLS fields and negotiation options as you discover new needs.
I've created a draft spec for an "NLS" framework that adds a negotiation language ("NoiseLingo") on top of NoiseSocket (hence "NoiseLingoSocket"). This is based on ideas from 1.[53]
This needs a tweaked NoiseSocket draft, with modifications from 2[54] (renaming a couple things, and changing the prologue calculation to differentiate the "retry" case, and to add an application prologue):
The NLS draft also defines some "basic profiles", which are intended as high-level protocols usable by application developers:
The idea is that NoiseLingo and NLS give you a menu of negotiation fields that are easy to choose from to create profiles. Also, these profiles will have a lot of similarity and thus potential for interop (e.g. a NoiseZeroLink client can talk to a NoiseLink server, by falling back to 1-RTT). And if you start with something simple like NoiseLink, it's easy to add new NLS fields and negotiation options as you discover new needs.
An application built on Noise must consider several issues:[57]
This section collects various security considerations:[58]
Noise_NK_25519
Some other uses of noise in the general cryptographic sense:
noisecat
Presentations: