Abstract
Most of the world’s power grids are controlled remotely. Their control messages are sent over potentially insecure channels, driving the need for an authentication mechanism. The main communication mechanism for power grids and other utilities is defined by an IEEE standard, referred to as DNP3; this includes the Secure Authentication v5 (SAv5) protocol, which aims to ensure that messages are authenticated.
We provide the first security analysis of the complete DNP3: SAv5 protocol. Previous work has considered the message-passing sub-protocol of SAv5 in isolation, and considered some aspects of the intended security properties. In contrast, we formally model and analyse the complex composition of the protocol’s sub-protocols. In doing so, we consider the full state machine, the protocol’s asymmetric mode, and the possibility of cross-protocol attacks. Furthermore, we model fine-grained security properties that closely match the standard’s intended security properties. For our analysis, we leverage the
Our analysis shows that the core DNP3: SAv5 design meets its intended security properties. Notably, we show that a previously reported attack does not apply to the standard. However, our analysis also leads to several concrete recommendations for improving future versions of the standard.
Introduction
Most of the world’s power grids are monitored and controlled remotely. In practice, power grids are controlled by transmitting control and monitoring messages, between authorised operators (‘users’) that send commands from control centers (‘master stations’), and substations or remote devices (‘outstations’). The messages may be passed over a range of different media, such as direct serial connections, ethernet, Wi-Fi, or un-encrypted radio links. As a consequence, we cannot assume that these channels guarantee confidentiality and authenticity.
The commands that are passed over these media are critical to the security of the power grid: they can make changes to operating parameters such as increases or decreases in voltage, opening or closing valves, or starting or stopping motors [14]. It is therefore desirable that an adversary in control of one of these media links should not be able to insert or modify messages. This has motivated the need for a way to authenticate received messages.
The DNP3 standard, more formally known as IEEE 1815-2012, the “Standard for Electric Power Systems Communications – Distributed Network Protocol” [20], is used by most of the world’s power grids for communication, and increasingly for other utilities such as water and gas.
Secure Authentication version 5 (SAv5) is a new protocol family within DNP3, and was standardised in 2012 (Chapter 7 of IEEE 1815-2012 [20], based on IEC/TS 62351-5 [18]). SAv5’s goal is to provide authenticated communication between parties within a utility grid. For example, this protocol allows a substation or remote device within a utility grid to verify that all received commands were genuinely sent by an authorised user, that messages have not been modified, and that messages are not being maliciously replayed from previous commands.
Given the security-critical nature of the power grid, one might expect that DNP3: SAv5 would have attracted substantial scrutiny. Instead, there has been very little analysis, except for a few limited works. One possible explanation is the inherent complexity of the DNP3: SAv5 protocol, as it consists of several interacting sub-protocols that maintain state to update various keys, which results in a very complex state machine for each of the participants. Such protocols are notoriously hard to analyse by hand, and the complex looping constructions pose a substantial challenge for protocol security analysis tools. Moreover, it is not sufficient to analyse each sub-protocol in isolation. While this has been known in theory for a long time [22], practical attacks that exploit cross-protocol interactions have only been discovered more recently, e.g., [9,24]. In general, security protocol standards are very hard to get right, e.g. [7,13,26].
Contributions
In this research, we provide the most comprehensive analysis of the full DNP3 Secure Authentication v5 protocol yet, leveraging automated tools for the symbolic analysis of security protocols. In particular:
We provide the first formal models of two of the SAv5 sub-protocols that had not been modelled previously. In contrast to [11], the analysis in this work also includes the asymmetric mode of the Update Key Change Protocol. We provide the first analysis of the complex combination of the sub-protocols and all their modes, thereby considering cross-protocol attacks as well as attacks on any of the sub-protocols. The security properties that we model capture the standard’s intended goals in much greater detail than any previous works. Despite the complexity of the security properties and the protocol, and in particular its complex state-machine and key updating mechanisms, and considering unbounded sessions and loop iterations, we manage to verify the protocol using the Notably, our findings contradict a claimed result by an earlier analysis; in particular, our findings show that an attack claimed by other work is not possible in the standard as defined. Our analysis naturally leads to a number of recommendations for improving future versions of the standard.
We start by describing the Secure Authentication v5 standard in Section 2. We describe the sub-protocols’ joint modelling in Section 3, and their analysis and results in Section 4. We present our recommendations in Section 5, survey previous analyses of DNP3 in Section 6, before concluding this work in Section 7.
A public archive with our protocol models can be found at [12].
The DNP3 standard
The DNP3 standard [20] gives both high level and semi-formal descriptions, to serve as an implementation guide, as well as providing an informal problem statement and conformance guidelines. The Secure Authentication v5 protocol is described in Chapter 7 of [20]. We give an overview of the system and its sub-protocols, before describing the threat model from SAv5.
System and sub-protocols
There are three types of actor in SAv5: the (single)
After
All sub-protocols use sequence numbers and freshly generated Challenge Data with the aim of preventing replay attacks.
After this sub-protocol’s first execution, the faster ‘Aggressive Mode’ may be performed: this cuts the non-aggressive mode’s three messages to just one by sending the

Relationships between sub-protocols, the flow of keys between them (continuous lines), and required pre-shared keys (dashed lines).

The Session Key Update Protocol. The labels S1–5 identify the protocol rules described in Section 2.2.1.

The Critical ASDU Authentication Protocol, Control Direction, Non-Aggressive and Aggressive Modes. The labels A1–4 identify the protocol rules described in Section 2.2.2.
We now give more detailed descriptions of the four sub-protocols in Secure Authentication v5. By way of notational preliminaries,
The Session Key Update Protocol
See Fig. 2. This is also the first sub-protocol run after a system restarts, to initialise the shared session keys.
The user sends a Session Key Status Request. The user moves from “Init” to the state “Wait for Key Status”. The outstation generates fresh challenge data The user generates two new session keys (one for each direction), CDSK and MDSK, and sends a Session Key Change Message to the outstation ( The outstation decrypts this with the shared update key, and checks that The user verifies that the received HMAC was generated from
The Critical ASDU Authentication Protocol
See Fig. 3. This is the main data authentication protocol, and is used to verify the authenticity of critical The user sends a critical On receipt of this The user sends an Authentication Reply message, which contains the CSQ, The outstation verifies that the HMAC was constructed with the AC message it sent, the critical
The outstation then checks (‘AgRcv’ in Fig. 3) that the HMAC was constructed with the last Authentication Challenge, and that the CSQ is incremented from the last message. If so, it accepts and acts upon the
The Update Key Change Protocol (symmetric mode)
See Fig. 4. This key-transport sub-protocol has two modes; symmetric (default) and asymmetric (optional; described in Section 2.2.4). Both allow users and outstations to change the symmetric update key used by the previous protocol. Both devices start in “Security Idle”; the outstation always remains here. The symmetric mode of this protocol proceeds as follows:
The user sends an Update Key Change Request message, containing the user’s ID,
Upon receipt of this message, the outstation increments its Key Change Sequence Number (the same variable as in the previous sub-protocol), and also generates fresh challenge data,
The Update Key Change Protocol, symmetric mode. The labels U1–7 identify the protocol rules described in Section 2.2.3. In U4 and U5, 
The user forwards this message on to the Authority.1
U3 and U4 are technically out of scope for DNP3: SAv5.
The Authority creates a new update key. It encrypts the key,
The user decrypts this, and forwards both this message (Update Key Change), and an Update Key Change Confirmation (UKCC) message to the outstation. This is an HMAC of the user’s full name, both challenge data (
The outstation decrypts the first part of the message to learn the new update key, and verifies that the UKCC HMAC was created with the correct challenge data and KSQ from step U2. If so, it sends back its own UKCC message (also keyed with the new update key), but with the order of the challenge data swapped, and with its name, rather than the user’s.
If the user can validate this HMAC (by checking that it was created with the challenge data and KSQ values from this same protocol run, keyed with the new update key), then it accepts the message, and both parties start to use the new update keys. If this fails, the parties retry the protocol. Regardless of outcome (except timeout), the user moves back to the state “Security Idle”.

The Update Key Change Protocol, asymmetric mode. The labels U1–7 identify the protocol rules described previously. In messages U4 and U5,
The asymmetric mode of the Update Key Change Protocol is very similar to the symmetric mode. See Fig. 5 for the message sequence chart of the Asymmetric mode of the Update Key Change Protocol. The overall message flows are similar to the symmetric mode, and messages are effectively identical for U1–3. In message U4, the message transmitted is encrypted asymmetrically, not symmetrically. In message U5, the UKC object within the message ( Outstation Name User Challenge Data ( Outstation Challenge Data ( Key Change Sequence Number (KSQ) User Number ( Encrypted Update Key Data (from UKC)
This object is signed by the User’s private key,
Threat model and security properties
In this section we describe how we arrived at the threat model and security properties that we formally analyse. This is not as straightforward as one might think, as security properties are often informally and minimally described in protocol standards. For transparency, we will quote the original standards where possible. We use colored boxes to denote verbatim quotations from other documents.
The standard has a “Problem description” section [20, p. 13] that describes “the security threats that this specification is intended to address”. We reproduce this section in its entirety below:
Additionally, the general principles section contains a subsection “Perfect forward secrecy” that suggests an implicit security requirement. We could not determine any other sections that would imply security requirements.
The wording of the above section suggests that all listed terms are defined in IEC/TS 62351-2 [19]. This is not the case: [19] defines only some of these concepts. In particular, “modification” and (perfect) “forward secrecy” are not defined. We address the listed concepts in turn, starting from the ones which are defined.
While this definition references RFC 2828 [27], there is a difference, in that [27] equates spoofing and masquerading, but does not reference unauthorized actions:
where masquerade is defined in the RFC as
Thus, the RFC equates spoofing and masquerading. Analogously, the DNP3 standard directly relies on [19], which defines masquerading as
Here, ATIS [1] is a glossary from which this particular definition is taken. Hence it seems that within the context of DNP3, spoofing and masquerading are interchangeable, similar to the statements in RFC 2828. However, the definitions in the DNP3 standard [18] are closer to [1] than to [27], since they additionally include the aspect of unauthorized access/action. Note that the DNP3 standard has no explicit concept of authorization; this seems out of the standard’s scope.
This is a verbatim copy of a similar section in the reference ISO/IEC 9798-1:1997 [21], and suggests that replay is a special case of masquerading/spoofing.
This is a verbatim copy from the definition in the reference RFC 2828 [27]. However, DNP3 adds the specific restriction to the confidentiality of keys, as the main purpose of the standard is to authenticate messages that are not confidential.
Surprisingly, IEC/TS 62351-2 [19] does not mention the concept of (perfect) forward secrecy. However, the informal explanation suggests that the loss of some session keys should not affect authentication of future sessions with, presumably, different session keys.
The standard additionally states that “if update keys are entered or stored on the device in an insecure fashion, the entire authentication mechanism is compromised” [20, p. 21]. This suggests that some forms of compromise might be considered (e.g., of session keys), but not the full compromise (in which all stored data is compromised) of a party involved of a session.
Formal model of SAv5 in Tamarin
Our modelling and analysis of Secure Authentication v5 used the
Symbolic modelling assumptions
Symbolic analysis does not consider computational attacks on a protocol, instead focusing on the logic of protocol interactions. This requires us to make assumptions about the primitives used in the protocol, which restricts the power of the analysis. We make the following assumptions:
Dolev–Yao Adversary: the adversary controls the network channels [15]. Symbolic Representation: information is contained in terms. Any party (including the adversary) can either know a term in its entirety, or not know it at all. A party cannot learn e.g. a single bit of a term, or half a term. Perfect Cryptography: we assume that the cryptographic primitives used are perfect. This means that e.g. an adversary can learn the term m from the symmetrically encrypted Hash Functions: we assume that hash functions are one-way and injective. Randomness: we assume all freshly generated random terms are unpredictable, and unique (no two fresh terms generated separately are equal).
Complexity of the protocol
Each of the protocols within Secure Authentication v5 are individually straight forward; however, much more complexity becomes apparent when they interact. To give an indication of the state machines, see Fig. 6 for a diagram showing the state transitions performed by the user. The system starts in state 0; each node is the state the user is in before it executes a rule along one of the outgoing edges. These edges are labelled with the name of the rule which the user executes during the transition into another state (these names are the same as in the Message Sequence Charts). This diagram demonstrates how multiple loops can occur in many different orders, with very little determined structure, and how little of the relevant state is represented by the standard’s state machines. Each protocol can loop many times (below certain large thresholds), making the possible routes through the state machines and state-space very large and complex indeed. As there is stored data associated with each of these states, we do not get injective correspondence with the named states from the SAv5 specification.
Much of the complexity within Secure Authentication v5 comes from the transitions between different stateful sub-protocols as well as the multiple directions of the Critical ASDU Authentication Protocol. Each of these sub-protocols updates some part of agent state, and each of them rely on parts of state updated by other sub-protocols.
For example, the ability for an outstation to receive an aggressive mode request depends on:
their pairing to a user, set at initialization and invariant across all sub-protocols; their current state machine state, which must be set to their current session keys, set by the previously completed Session Key Update Protocol, and invariant across the other sub-protocols; the status of those session keys, which is invariant across all sub-protocols but can be changed at any time through a key expiry state transition; the ‘current’ challenge from the user, modified when a non-aggressive mode request was successfully verified by the outstation, which is invariant in the aggressive mode protocol variant and all other sub-protocols; and the number of aggressive mode requests received by the outstation since the current challenge was set, which is invariant in all other sub-protocols.
Each of these parts of state can be updated independently of each other, and each is invariant over several sub-protocols.
The state machine described in the protocol specification [20] captures very little of the protocol logic; the current state machine state is only one of the six dependencies listed above, and in fact is invariant for the outstation through both the Update Key Change Protocol and Session Key Update Protocol sub-protocols. An accurate

A simplified version of the user’s state machine as defined in the standard, excluding error transitions and the monitoring direction of the Critical ASDU Authentication Protocol. Note that although many transitions occur from the same state, they are conditional on additional state that is not represented in the state machine as described by the standard.
In
The possible transitions in the transition system are specified by multiset rewrite
Each rule specifies three multisets of facts: the Premises, the Actions (or labels), and the Conclusions. The premises of a rule are facts that must exist in, and are removed from, the multiset prior to the rule’s execution; conclusions are facts that are added to the multiset by executing the rule. Facts within rules may contain variables. The Actions do not affect the possible transitions of the system – instead, they are logged into the action trace. Security properties are specified over these action traces, as we will see later.
By default, facts are linear, in the sense that if they appear only in the premise of a rule, they are consumed by performing the corresponding transition.
There are a few special facts used in
All four sub-protocols’ rules and interactions were modelled as multiset rewriting rules in
Tamarin example rule
We now give an example of a SAv5 rule modelled in
The following rule is an example of a multiset rewriting protocol rule in
The A3 rule defines the behaviour when a user (identified by
Because
The actions contain two labels to refer to later, one recording that the user
The conclusions of the rule output an updated user state, in which the term
The state machines described in [20] (corresponding to the transitions discussed in Section 2.2) capture very little of the protocol logic, as the allowed transitions depend more on values in memory than on the current state machine ‘state’. As an example, the outstation remains entirely in the named state “Security Idle” throughout the Update Key Change Protocol; however, the outstation can only respond to certain messages from the user dependent on data from previously sent or received terms. Our
The finer details of SAv5’s sub-protocols in [20] and [18] are very often unclear, under-specified, and open to interpretation. We now describe the larger issues we encountered, and how we chose to model them.
Instead of modelling precisely as described, we keep one CSQ per user, per direction (control and monitoring). If we do not do this, the universal CSQ values in a model must depend on all of the state machines running from the same station, which makes analysis infeasible.
Modelling CSQs in this manner is analagous to the specification: both keep a single value which allows the Challenger to check whether received messages contain the correct CSQ or not; the specification keeps a universal total and a difference on a per-user basis, we simply keep a per-user total; both interpretations require this incrementing value to be in Authentication Replies or Aggressive Mode Requests, to prevent replay attacks.
The specification has clear rules for when the sender of a CSQ should increment this value [20, p. 211], but nothing about when a recipient should accept the value; it is not clear whether a received CSQ (e.g. in an Authentication Challenge) can be any value, whether it must be strictly increasing, or whether it must be precisely one higher than its last seen value. In our model, recipients of CSQ values check that they are strictly increasing.
It is not clear when this should be stored, and when each party should erase its previous ‘last sent challenge’. As an illustration: after the outstation (here the Challenger) has sent an AC, the user might not receive this AC message; if the user gets bored of waiting for an AC (which might never appear), it might send an Aggressive Mode Request with a critical
How to construct HMACs from the user’s side is clear (both for the non-aggressive and aggressive modes of CAAP), but it is not so clear how to work out what construes a valid HMAC from the outstation’s point of view.
We modelled this as follows: after sending an Authentication Challenge message, the outstation saves the challenge it is currently expecting to receive in an Authentication Reply. Upon timeout, other error, or successful reply, this challenge gets saved as the last sent challenge. This means an outstation can receive an aggressive mode request between the Authentication Challenge and a timeout, and still prevent it from being over-written.
As the communications between Authority and User are considered ‘out of scope’ for the DNP3 SAv5 spec, it does not make any comment on which of these two situations is the case. Secondly, the specification makes various comments about keeping the required bandwidth to a minimum. As such, we model it as the latter case, i.e. the User decrypts the received message, and re-encrypts under the Outstation’s public key before forward transmission.
We address many of these issues by making recommendations for improvements to the specification in Section 5; this section addresses these and other issues encountered through our modelling, analysis, and understanding of best cryptographic practice.
Analysis and results
Modelling the threat model and security properties
In
Based on the general principle of perfect forward secrecy, we additionally provide the adversary with the ability to compromise some (but not all) keys. In particular, when considering authentication or confidentiality properties, we will allow the adversary to compromise all session keys except for the CDSK/MDSK used for this particular critical
One complication is that classical authentication properties link identities: if Alice receives a message, she associates the sender with an identity (say, Bob), and the authentication property then encodes that Bob sent the message. However, in the case of SAv5, there are not always clear identities for parties, e.g., outstations. Instead, pairs of users and outstations are effectively linked through their initial (pre-distributed) update keys. Thus, the best we can hope to prove is that upon receiving a message, apparently from someone that initially had update key k, then the message was indeed sent by someone whose initial update key was k.
We thus model the following (relatively weak) agreement property, which we refer to as
We consider the following adversary capabilities for this property: the adversary can compromise all session keys (CDSK or MDSK) except for the one used in the message m. This covers the “perfect forward secrecy” general principle. Additionally, we allow the adversary to compromise all update keys other than that used to assign the current session keys. Furthermore, if the current update key (used to assign the current session keys) was assigned in the symmetric mode of the Update Key Change Protocol, we allow the adversary to compromise all (asymmetric) private keys; if the current update key was assigned in the asymmetric mode, we allow the adversary to compromise the (symmetric) Authority Key. If neither of these is the case, the current update key must be the initial, pre-distributed update key, and the Update Key Change Protocol will not yet have successfully run.
Thus,
We note that the prevention of spoofing attacks (as per the first requirement) implies that all the relevant keys (Authority Key, Update Key, and MDSK or CDSK) are confidential with respect to eavesdroppers. If they are not, the active adversary can trivially use them to spoof a message. We can still model these confidentiality requirements separately. This is useful for protocols that do not satisfy the authentication guarantees directly.
If the user chooses, encrypts, and transmits a new Session Key (e.g.,
Properties in Tamarin
We now explore the full properties from our
As described, lemmas are modelled as temporal first-order logical formulae evaluated over action traces, i.e. action facts and timepoints. The syntax for specifying security properties is defined as follows:
See [6] for further information and detail on modelling properties within
First, we consider the confidentiality properties. This first property models the secrecy of the Update Keys:
This lemma is a conjunction of three properties: each of these three sections must be true for the overall lemma to be true. The lemma specifies:
If the initial update key itself isn’t explicitly revealed, this implies the adversary doesn’t know it ( If an update key encrypted using symmetric cryptography (under ‘ If an update key transported using asymmetric cryptography isn’t revealed directly, and the private key used (by the outstation) to decrypt it isn’t revealed, this implies the adversary doesn’t know it.
As described,
The second confidentiality property models the secrecy of the Session Keys.
This lemma is again a conjunction of three properties; each of these three sections must be true for the overall lemma to be true. We describe each of the three parts of the Session Key secrecy lemma in turn:
Firstly, for when the current Update Key was distributed via the ‘Initial’ distribution method (i.e. USB stick): if the outstation accepts the Session Keys stated a Secondly, for when the current update key was distributed via the Symmetric Update Key Change Protocol: if the outstation accepts the new session keys named in the Finally, for when the update key was distributed via the Asymmetric Update Key Change Protocol: if the outstation accepts the new session keys named in the
We then prove AUTH1 and AUTH2 for both of these protocols, before proving it for the Critical ASDU Authentication Protocol. First, the agreement lemma for the Update Key Change Protocol:
As the initial For all ‘ For all ‘
Note we have also proven (before this lemma, in the lemma
We then prove agreement on the Session Key Update Protocol:
This lemma models that for all traces where the update key used to transmit the session keys is not revealed, the session keys themselves are not revealed, and either the outstation’s private key or the authority key (depending on the method by which the update key was originally encrypted) weren’t revealed, then where there was a
This lemma only considers traces where there were no Authority Key Reveal actions, and no private keys revealed. Then, for all traces where an
Informally, this models that all authorised
In the
Then, finally, we prove injective agreement in the
In this lemma, we prove (again, in almost exactly the same way) that with the same above conditions, whenever there is a
Analysis in Tamarin
For example, to prove that a particular property holds in all traces (such as “In all traces, X is preceded by Y”),
This backwards reasoning makes
The consequence is that the SAv5 model contains many unbounded loops. Naïvely, an attempt by
More technically, the key to analysing a protocol like this is to identify invariants over particular transitions and prioritize solving for the origin point of these terms as necessary. For example, an outstation running the Critical ASDU Authentication Protocol is making use of session keys that were set during the last Session Key Update Protocol (rule S4, as labelled in Fig. 2) and are invariant in all other rules. We therefore add a premise to any rule making use of the session keys so that it directly relies on the current “session key invariant”, represented by a persistent fact that is output when the session keys are changed, along with a fresh identifier so that it cannot unify to any other session key invariant. In solving the premises, we can prioritize finding the origin point of the current invariants, as the properties of the current protocol often depend only on the circumstances around the relevant invariants.
In the Critical ASDU Authentication Protocol example, the authentication properties depend on the properties of the last Session Key Update and the original pairing of the user to outstation, and in the Aggressive Mode, on the last generated challenge data. Each of these is included as an invariant. When proving that all traces have the AUTH1 property, this allows
As described, the key to analysing a protocol like this successfully is to identify invariants over certain transitions, and to prioritize solving for the source of these. Invariants within the model include:
the authority key and relevant identifiers for both the user and outstation as assigned during the initial key distribution, update key invariants for both the user and outstation, session key invariants for both the user and outstation, and the last challenge sent or received in each direction for both the user and the outstation.
Additionally, there is a ‘last key status message’ which is stored by the outstation in both the S2 and S4 rules. Although this is invariant through all other rules, it is only used in rules where it is also modified, so we can efficiently represent it with a linear fact consumed and output by those two rules.
Finally, there are three ‘keys to reveal’ facts output whenever new keys are generated, which are used to model adversary compromise and represented with persistent facts. The combined invariant relations are shown in Fig. 7.

Protocol rules and the structure of loop invariants in the DNP3 model. Rules executed by the user and outstation are prefixed by ‘U:’ and ‘O:’ respectively, and invariants are represented by edges from the rules that set their value to the rules that use them. For example, the U:A3_send_C_Aggressive rule uses the
Adding the Asymmetric mode of the Update Key Change Protocol to the overall protocol models had significant impact on the proof burden and time required to prove the required properties of the models. As we detail in Section 4.3, adding one extra sub-protocol (the asymmetric variant of the Update Key Change Protocol) causes nearly a 4.5-fold increase in the total CPU time required to prove these same properties.
The main cause of the increased CPU time is that all proofs now need to consider many more case distinctions and possible sources for obtaining messages. Since there is no compositional reasoning that can be directly applied here, and the additional sub-protocol can possibly precede most of the rule instances, the additional rules for the fourth sub-protocol exponentially increase the proof search space. Concretely, this meant we had to construct more complex invariants before
Rather than simply having to prove new properties just about the new asymmetric sub-protocol, we have additionally had to modify and update almost every lemma to take account of the fact that the asymmetric sub-protocol is now modelled. Proving properties about the secrecy of the update key now requires considering three possible methods of distribution rather than the previous two (i.e. USB Stick, Symmetric, and Asymmetric). Then, as session keys set by the Session Key Update Protocol could be compromised indirectly by compromise of the update key, or even compromise of the keys used by the Update Key Change Protocol (i.e. either the authority key or the user and/or outstation’s private keys), properties about the Session Key Update Protocol must now also consider each possible method by which the update key could have been set or potentially compromised. This extra burden of proof on the origin of all keys used to encrypt or authenticate messages creates significantly more work and complexity for each lemma.
Results
Section 4.1 described how the specification requires the protocol be resilient to Spoofing, Modification, Replay, and Eavesdropping, and how these properties translated into more formal security properties AUTH1, AUTH2, and CONF. Our analysis in
It is worth noting the significant extra computational effort required to prove these properties when introducing even only one extra sub-protocol. The results from [11] proved the same properties on DNP3: SAv5 with only the symmetric mode of encryption available for the Update Key Change Protocol; introducing only one extra sub-protocol (the asymmetric variant of the Update Key Change Protocol) causes nearly a 4.5-fold increase in the total CPU time required to prove these same properties.
Table 1 details the time taken to achieve these results, and Table 2 details the results of each security property.
Times for proving lemmas within the symmetric-only and combined models
Times for proving lemmas within the symmetric-only and combined models
As stated in the introduction, our results seemingly contradict an attack claimed in previous analysis; we will return to this in detail in Section 6.
Results of verification of security properties
Our analysis, while succesful in showing that the main properties hold, also naturally leads to several recommendations. To aid clarity of implementation, to avoid possible misinterpretation, and to allow the protocol to meet stronger security guarantees, we propose the following changes to future versions of the specification.
Update Key Change messages ( In the Update Key Change Protocol, the Update Key Change object ( This has only minor impact, as the update keys are assumed to be secret, and the attack requires two outstations to be running the Update Key Change Protocol with the same user concurrently. Nonetheless, it implies achieving agreement on a new update key requires a weaker adversary than is strictly necessary. The specification must clarify the use of Challenge Sequence Numbers: It is not clear whether CSQ values (per direction) should be kept on a per Master-Outstation pair basis, or whether each device should keep one universal CSQ value (per direction). The specification must clarify whether recipients of CSQ values from the network (whether Responder or Challenger) should expect CSQ values to be strictly increasing. The sender’s behaviour (whether in an Authentication Challenge, Authentication Reply, or Aggressive Mode Request) is clear, but it is not clear under which conditions a device should accept a CSQ as valid from another party. If CSQ values are not required to be strictly increasing, then replay attacks of Aggressive Mode Requests become possible. Further discussion and reasoning about the use of CSQs may be found in Section 3.3.2.
The specification should strongly recommend (or even require) that devices support asymmetric authenticated key exchange, rather just than symmetric key-transport with an optional asymmetric key-transport mode for the Update Key Change Protocol. This should be recommended for
Deprecate HMAC-SHA-1. The SHA-1 algorithm is dangerously weak, and a collision has been found [28]. HMAC-SHA-256 should be required at minimum.
Within both the symmetric and asymmetric modes, the protocol should perform some form of key-exchange (incorporating randomness from all involved components), rather than (a)symmetric key-transport [10]. This would significantly reduce the protocol’s dependence on the raw output of any one CSPRNG [8].
The standard must clarify how recipients of messages should parse them, and the standard must clearly and precisely state how recipients should calculate HMACs (e.g. to compare to received Authentication Replies and Aggressive Mode Requests). This must clarify which Sequence Numbers (for both Challenges and Key Changes) should be valid under which conditions, and which Challenge Data should be valid in which situations. The standard must clearly state when various data should be kept until (e.g. Challenge Data), when it should be overwritten, and how many previous instances of this data should be kept per User-Outstation pair.
Related work
Previous work has considered the broader security of DNP3, or, in contrast, only analysed SAv5’s Critical ASDU Authentication Protocol in isolation.
According to [3, p. 353], the attack works as follows: after a non-aggressive critical
This attack does not work, as an outstation will not accept a non-aggressive mode message replayed into the Aggressive Mode. Our reasoning is as follows: HMACs within an Aggressive Mode Request must be calculated over “The entire Application Layer fragment that this object is included in, including the Application Layer header, all objects preceding this one, and the object header and object prefix for this object” [20, p. 742, Table A-9]. An Aggressive Mode HMAC must therefore include the “Object Header
We modelled this ‘attack’ in the file
We conclude that this claimed attack is an artefact of a model that is too coarse, and is not possible in faithful implementations of the standard.
After the conference version of this work was accepted for publication [11], we contacted the authors of [3] (Amoah, Çamtepe, and Foo) with our discovery, asking for comment or clarification. Amoah and Foo both replied to our email confirming that they did not model the HMAC correctly, and that therefore “the previously reported replay attack identified on the non-aggressive to the aggressive mode of operation will not be possible”.
Separately, Amoah et al. then make the novel contribution of a method for Critical ASDU Authentication within the Broadcast or Unicast setting, in [4]. Amoah’s 2016 thesis [2] supplements these papers by providing greater detail of the modelling and analysis of the Critical ASDU Authentication Protocol.
Conclusions
In this research we have performed the most comprehensive symbolic modelling and analysis yet of the DNP3 Secure Authentication v5 protocol; this analysis has considered all of the constituent sub-protocols (both symmetric and asymmetric), including cross-protocol and cross-mode attacks. We make use of novel modelling techniques in
Our findings notably contradict claimed results by earlier analyses; in particular, our findings show that the attack claimed in [3] is not possible in the standard as defined. While our analysis naturally leads to a number of recommendations for improving future versions of DNP3, we conclude that the core protocol of the standard meets its stated security goals if implemented correctly, increasing much-needed confidence in this security-critical building block of power grids.
