FIDO2 With Two Displaysunicodex2013Or How To Prote
FIDO2 With Two Displaysunicodex2013Or How To Prote
Abstract—With the rise of attacks on online accounts in the possibly remember that many different passwords (and the
past years, more and more services offer two-factor authenti- adoption of password managers is still very low) re-using
cation for their users. Having factors out of two of the three passwords on a multitude of different sites is a common prac-
categories something you know, something you have and something
you are should ensure that an attacker cannot compromise two tice [2]. This means that one stolen password from an account
of them at once. Thus, an adversary should not be able to on an unimportant website might also give an adversary access
maliciously interact with one’s account. However, this is only to more important ones, like an online banking account.
true if one considers a weak adversary. In particular, since most As more and more of our private and professional life started
current solutions only authenticate a session and not individual to happen on the Internet, compromising accounts through
transactions, they are noneffective if one’s device is infected
with malware. For online banking, the banking industry has simple and cheap attacks like credential stuffing and phishing
long since identified the need for authenticating transactions. became increasingly more attractive and lucrative for attackers.
However, specifications of such authentication schemes are not To mitigate these risks, security experts started to advertise
public and implementation details vary wildly from bank to the use of two-factor authentication instead of only a single
bank with most still being unable to protect against malware. password [3]. A mandatory second authenticating factor (like
In this work, we present a generic approach to tackle the
problem of malicious account takeovers, even in the presence a one-time password (OTP)) severely restricts the utility of
of malware. To this end, we define a new paradigm to improve stolen passwords for an attacker. Users and account providers
two-factor authentication that involves the concepts of one-out- alike took a very long time to adopt this recommendation,
of-two security and transaction authentication. Web authentication but nowadays many web applications offer at least one form
schemes following this paradigm can protect security-critical of two-factor authentication. Most implementations require the
transactions against manipulation, even if one of the factors
is completely compromised. Analyzing existing authentication user to present a second factor together with a password during
schemes, we find that they do not realize one-out-of-two security. login. If successful, the user then receives an authenticated
We give a blueprint of how to design secure web authentication session token (stored within a cookie), which she can use
schemes in general. Based on this blueprint we propose FIDO2 to interact with the site and her account without having to
With Two Displays (FIDO2D), a new web authentication scheme authenticate herself again for a while.
based on the FIDO2 standard and prove its security using
Tamarin. We hope that our work inspires a new wave of When using two-factor authentication, it is recommended
more secure web authentication schemes, which protect security- to use two of the three following factors: something you
critical transactions even against attacks with malware. know, something you have and something you are. Behind
Index Terms—web authentication, malware, two-factor au- this categorization lies the assumption that it is improbable
thentication, transaction authentication, one-out-of-two security, for the same adversary to compromise factors from different
Tamarin, 2DA, FIDO2D
categories (e.g., an adversary that gets a password from a
password leak cannot also steal a copy of the user’s finger-
I. I NTRODUCTION
print). However, this is only true in a very specific adversarial
In recent years, the World Wide Web and the multitude of model. An attacker who has compromised a victim’s computer
different services offered within changed almost everyone’s does not need to steal a copy of the fingerprint; he can
life. Whether we want to send an email, do online banking, simply manipulate all interactions with a website by using
buy a product, or update our social media profile, we use the the authenticated session token stored in the browser after the
Web. In general, each of these activities requires a separate victim performed a legitimate login.
account with which we authenticate ourselves. According to a Indeed, two-factor authentication as it is used today does
study by Google in partnership with The Harris Poll in 2019, not help against a number of attack techniques used by
the average American has 27 different online accounts [1]. real-life adversaries [4]–[6]. Most schemes are susceptible
Passwords always were and still are the main means of to malware attacks and some popular forms, like OTP, are
authentication on the Internet. However, since one cannot also vulnerable to real-time phishing, in which an adversary
relays authentication details from a fake website to a legitimate II. O UR C ONTRIBUTION
one [7], [8].
Bruce Schneier adequately summarized the applicability of In this work, we analyze the security of web authentication
two-factor authentication in as early as 2005: “Two-factor schemes in the presence of malware and real-time phishing
authentication isn’t our savior. It won’t defend against phish- attacks. We find that even strong authentication schemes for
ing. It’s not going to prevent identity theft. It’s not going to online banking that rely on transaction authentication as
secure online accounts from fraudulent transactions. It solves required by the revised Payment Services Directive (PSD2)
the security problems we had 10 years ago, not the security do not protect against these attacks.
problems we have today” [9]. As a remedy, we propose that web authentication schemes
In recent years, online banking has been moving into handling security-critical transactions should fulfill one-out-of-
the right direction security-wise by introducing transaction two security, a security notion that neither requires a primary
authentication, which is the verification of transaction details device nor an additional device trusted. We show how this
(often on an additional device, but not necessarily). Authen- security notion introduced for electronic payment can be
ticating transactions individually mitigates the risk of session adapted to web authentication. Furthermore, we provide a
hijacking by stealing a cookie. Furthermore, manipulation of blueprint to design web authentication schemes that fulfill this
transaction details can be detected if one is using an additional notion and thus protect security-critical transactions even if
device to check them. one device is fully compromised.
The chip authentication program (CAP) protocol used in Based on our blueprint, we design and implement FIDO2
online banking thus provides a high level of security. It relies With Two Displays (FIDO2D), a web authentication scheme
on a dedicated card reader with a display. The device offers based on the FIDO2 standard. We identify shortcomings of
a very small attack surface for infection by malware as it has FIDO2 for implementing malware-resistant web authentication
limited functionality and is specifically built for this use case. and show how they can be treated. Integration into the FIDO2
Carrying an additional device has been identified as un- standard would pave the way for broad adoption of our
pleasant for many users [10], [11]. In consequence, many approach. We examine multiple use cases that benefit from
banks abandoned dedicated hardware tokens and transitioned the security guarantees of FIDO2D.
to app-based authentication schemes such as photoTAN. How- Finally, we provide a formal model of FIDO2D and prove
ever, similar to regular computers, smartphones have large that it fulfills one-out-of-two security using Tamarin.
attack surfaces, are susceptible to, and have been attacked
by malware [12]. By compromising the smartphone, attackers III. ATTACKS ON W EB AUTHENTICATION
can bypass confirmation of transactions on the device [13].
Therefore, if an attacker gets access to the user’s password, In this section, we analyze attacks on current web authenti-
he can access the online banking system and execute arbitrary cation schemes and introduce our attack model that serves as
transactions (see Section III). Some banks even allow initiating the basis for all of the following.
transactions from the same device [13]. Thus, most current
online banking schemes, which are required by law to offer A. Password Attacks
strong security [14], do not adequately protect against malware
attacks, since the smartphone needs to be fully trusted. Besides Password authentication is by far the most prominent
online banking, many other use cases such as administration authentication scheme in the web. The main problems of
panels and electronic health records handle security-critical password authentication are that users choose weak pass-
transactions (see Section VII). However, most of them do not words and reuse them across multiple sites [16]. Brute-force
implement transaction authentication and thus do not protect and password spraying attacks exploit weak passwords while
against malware attacks. credential-stuffing attacks focus on reused passwords. For
The recent FIDO2 standard provides a widely implemented example, the video conferencing solution Zoom was hit by
browser API called WebAuthn that simplifies integration of a credential-stuffing attack and a large number of accounts
secure web authentication mechanisms relying on public- were compromised [17]. The success of these attacks is
key cryptography and supporting authentication of individual not surprising considering the amount of publicly available
transactions. However, authentication with FIDO2 is primarily credentials [18].
used for login today and thus suffers from susceptibility to Risk-based authentication (RBA) aims to strengthen pass-
malware attacks as described before. The support for trans- word authentication by monitoring features such as the IP
action authentication has even been removed from the latest address and the user agent of the browser and triggering
version of the WebAuthn standard [15]. additional authentication during login if they differ from those
We show how to design web authentication schemes using recorded before [19]. While this limits the impact of a stolen
two devices (one of which could be a smartphone) which password, most features are easy to detect and spoof during a
protect security-critical transactions, even if one device is fully phishing or malware attack. Criminal platforms evolved that
compromised. While this might seem like an impossible task, sell access to user profiles containing credentials and features
it can be done. In the following, we show how. that allow bypassing RBA [20].
1. initiate t 2. initiate t' an OTP (3). In this case, the malware prompts the user to
confirm the original transaction t (4). As the user cannot
4. confirm t 3. confirm t' detect the manipulation, she supplies the required OTP (5).
User
6. credential
The attacker can use the OTP to confirm the manipulated
5. credential PC Service
transaction t’ (6). This attack applies to other authentication
Fig. 1. Transaction manipulation attack: malware on the device manipulates schemes such as FIDO2 as well. Transaction manipulation has
the transaction data t and issues a transaction t’ instead. been used extensively in the wild by online banking malware
such as ZeuS and SpyEye [4]. Note that RBA does not prevent
2. confirm login
1. login this attack, as the transaction is initiated in a valid session of
the user.
3. ok
2) Transaction Initiation: Authentication schemes that in-
3. logged in 5. confirm t corporate an additional device for transaction verification are
often susceptible to a transaction initiation attack as depicted
Service
4. initiate t Smartphone in Figure 2. We assume that the attacker compromised the
6. ok
additional device and installed malware. In a next step, the
attacker needs to determine the user’s password using one of
Fig. 2. Transaction initiation attack: malware on a smartphone confirms
transaction initiated by the attacker. the methods from Sections III-A and III-B. Potentially, the
password is even stored on the additional device and thus
accessible to the attacker. With the password, the attacker
B. Real-Time Phishing logs in to the service from his own device using the victim’s
In 2018, Amnesty International reported targeted phishing account (1). The service might require confirmation of the
attacks on Google and Yahoo accounts that bypassed one- login attempt on the additional device, e.g., because the
time password (OTP)-based two-factor authentication [5]. By service implements RBA and detected a change in the user
automating the process of using the stolen password and OTP, profile. Usually, confirmation of the login attempt relies on text
the attackers were able to work around the short validity of messages, email or an app [26]. However, since the attacker
the token. Despite being more complex than classic phishing remotely controls the additional device, he can confirm the
attacks that only harvest passwords for later use, real-time login request (3) [13]. After logging in successfully, the
phishing attacks are not sophisticated. Several tools are pub- attacker can initiate an arbitrary transaction t (4). The service
licly available to automate this attack [21], [22]. In addition, might require confirmation of the transaction (5), however,
real-time phishing attacks can be used to identify features of again the attacker controlling the additional device can confirm
the user necessary to bypass RBA [20]. the request (6).
U U
confirm reg.? opt U; d U; d
ok! pubB confirm? opt
n ok! Sig(sB ; authch )
n; U; S
confirm reg. U,S? confirm d; U; S? opt0
ok! n ok! Sig(sA ; authch0 ;d )
opt0
pubA
Fig. 3. Sequence diagram for registration in our protocol FIDO2D. Here, a Fig. 4. Sequence diagram for transactions in our protocol FIDO2D. Here,
user U registers at a server S. The devices B and A are used to generate secret a user U authenticates a transaction with data d with a server S by using
and public keys sB , pubB and sA , pubA during the process. The nonce n is devices B and A. The devices B and A have a secret key sB and sA , and the
randomly generated by S. server S knows the corresponding public keys pubB and pubA . The variables
authch and authch0 ,d contain ch and ch0 , d respectively and are further
explained in the text.
B. Registration
First, the user registers B using the standard FIDO2 regis- detection. This follows the FIDO2 standard. In Figure 4 this
tration ceremony. During registration, S stores the public key is simply presented as Sig(sB , authch ) while authch contains
pubB from B. Then, S provides a nonce to B to link the second the aforementioned data. After receiving the signed challenge
device A to the account. The nonce is transferred from B to from B, the transaction is not yet fully authenticated. The
A using a QR code. Again, we use the FIDO2 registration server S requires a signature from A too. After transmitting
ceremony to store the public key pubA from A on S. d to A, the same FIDO2 protocol is performed between A
In more detail, the registration process is depicted in Fig- and S. Note that for this protocol a fresh challenge ch0 and
ure 3. The server responds to a user registration request with a the public key pubA is used. S links both challenges ch and
set of options opt, containing a random challenge, the identifier ch0 to the transaction data d. We use the Simple Transaction
of the server and the new user, as well as further parameters for Authorization Extension (txAuthSimple) of FIDO2 with data
the creation of credentials. First, the authenticator of B creates d for A. This extension ensures that A receives the transaction
a new credential and sends the public key pubB back to S. data d in combination with the challenge ch0 as part of options
During this process, the user is asked to confirm registration. opt0 , and presents it to the user. After U’s confirmation, A not
Next, the server S randomly generates a nonce n, links it to only signs ch0 , but also d. This allows to bind the challenge
the username, and sends it to B. Then, n is transferred from ch0 to the transaction data d, which is important when the
B to A (e.g., using a QR code). Again, the user is asked to data is transmitted over an insecure channel. As we propose
confirm the registration on the device A. Then, A can initiate a to use TLS, transferring d separately and not signing it would
similar FIDO2 registration ceremony, allowing S to link both suffice in our attack model. However, using txAuthSimple
ceremonies using n. allows adapting the protocol to devices that are not connected
As a result of the registration, S is aware of public keys to the Internet directly and thus require another device to relay
pubA , pubB linked to user U. The devices A and B know the the messages to them. Again, there is additional data that is
secret keys sA , sB for the public keys pubA , pubB , respectively. signed as in authch , and we denote this as authch0 ,d in our
C. Transactions diagram. S only accepts the transaction with data d when
both authentication ceremonies are successful and A signed
The message flow during a transaction is shown in Figure 4.
the correct transaction data d.
Recall that a user U wants to issue a transaction with data d at
a server S. First, U uses B to transfer the intended transaction D. Prototypical Implementation
data d in combination with the username to S. S sends a set of To verify the feasibility of our approach, we implemented
options opt, containing a random challenge ch, and expecting a prototype of FIDO2D consisting of a server component for
a signature of ch for the public key pubB as a result. Again, the S and an Android app running on A. On the server, we use a
user has to confirm before the challenge is signed by B and the Go library for FIDO2 by Duo-Labs1 . We had to add support
signature is sent to S. To be more precise, the signature is com- for the txAuthSimple extension. More specifically, the server
puted over the challenge, an identifier of S, extension data, and
the authenticator’s signature counter, which is used for clone 1 https://github.com/duo-labs/webauthn
Fig. 5. Screenshots of a user’s view in our app prototype during registration.
Left: Registration in the browser using FIDO2. Right: Registration in the app
by scanning a QR code. Fig. 6. Screenshot of our app prototype during transaction confirmation in a
fictitious micro-blogging scenario.
has to check that the authenticator signed the extension data Even though the Client to Authenticator Protocol (CTAP)
containing the transaction details and that they have not been protocol is designed to relay data to an authenticator, we
tampered with. For our app, we use an Android library by decided against using it for our App. CTAP requires the user
Duo-Labs2 to create credentials and sign supplied challenges. to connect the smartphone to the computer during authentica-
Again, we added support for the txAuthSimple extension, tion [30]. However, Bluetooth and NFC are not available on all
which mainly required signing the extension data. On device platforms and USB requires a wired connection. Furthermore,
B, we use the Web Authentication (WebAuthn) browser API current browsers do not forward unsupported extensions and
which is part of the FIDO2 standard and is supported by all thus txAuthSimple could not be used [31]. Thus, we suggest
modern browsers. using push messages and TLS for the communication of
Following the principle (2DA.4) we limit access to the A and S. In our implementation, we use the push service
devices by a local authentication mechanism such as a lock Firebase Cloud Messaging4 . However, we do not transmit any
screen. On A we force the use of a lock screen by enabling the data in the push message, but request the app to establish a
option setUnlockedDeviceRequired of the Android Keystore3 . TLS connection to the server and retrieve data from there.
This ensures that the private key can only be used if the Integration of a push-based transport into CTAP would be
device is unlocked. Access to the private key can be further desirable, as it would allow FIDO2D to rely on standard
restricted by requiring to push a physical button or displaying FIDO2 only. Recently, attempts to integrate such a mech-
transaction data on a protected screen [29]. However, these anism into CTAP [32] have been made, however, they are
mechanisms might affect usability negatively and are not not yet included in the standardized protocol. We hope that
necessary to fulfill one-out-of-two security. We assume that our work strengthens these developments. Furthermore, our
device B has a lock screen set up too. Furthermore, we enable prototypical app could be superseded by integrated support
the requireUserVerification parameter in the WebAuthn API for FIDO2 in mobile operating systems. This requires that
and require the User Verified flag to be set in the signed the smartphone can be used as a roaming authenticator on
authenticator data. This ensures that roaming authenticators another device and that it supports the txAuthSimple extension
that are prone to theft cannot be used without authentication such that transaction data can be verified. Sadly, the extension
e.g., using a PIN. txAuthSimple has been removed in the second level of the
Figure 5 shows the user interface of the registration process. WebAuthn API [15].
On B the browser shows a pop-up asking the user to confirm Although we do not consider recovery in our implementa-
registration with FIDO2. Afterwards, the user links the app on tion, promising methods for recovery of FIDO2 authenticators
A to the account by scanning a QR code from the browser. In have been proposed that do not sacrifice security by incorpo-
the background, the app establishes a connection to the server rating a backup authenticator [33].
and initiates a FIDO2 registration ceremony as well. Figure 6
shows the transaction confirmation screen of our app. In this VI. S ECURITY P ROOF
example, the user initiated a new post on a fictitious micro- We formally prove the security property one-out-of-two-
blogging service. The app displays all relevant information security (see Section IV-C) of our protocol FIDO2D with the
including the username and identifier of the service. help of Tamarin Prover (Tamarin) [34]. Our lemma definitions,
which from Tamarin’s point of view constitute the protocol’s
2 https://github.com/duo-labs/android-webauthn-authenticator security properties, are inspired by [8]. We also analyze the
3 https://developer.android.com/reference/android/security/keystore/KeyGen
ParameterSpec.Builder 4 https://firebase.google.com
rule f i r s t : specifically extended by writing data to the attacker-controlled
[ ] network. This mechanism can be used to leak any kind of data
−− [ ] −> such as key material, identities, nonces as well as a protocol’s
[ NowSecond ( ) ]
message flow.
rule second : A protocol declaration in Tamarin usually contains at least
[ NowSecond ( ) ] one rule with an empty set of in-facts. This rule can be
−− [ ] −> instantiated on the state that only contains facts that are
[ NowThird ( ) ] populated by Tamarin at the start of a program verification
session.
Fig. 7. Example of chaining two Tamarin rules.
B. Our Tamarin Model for FIDO2D
Our model consists of 13 rules and two lemma definitions.
effect of users not verifying transaction data on the security We refer to Appendix A for a complete definition of each
of FIDO2D. While our scheme does not fulfill one-out-of-two- rule, including an enumeration of facts that are produced and
security in this scenario, we prove that it still protects against consumed by it. Each rule’s purpose is briefly explained below:
most types of attacks including phishing and malware on the • new_server: registers a new honest server as a global fact.
additional device. Honest servers cannot be used in phishing attacks.
In the following, we give a brief introduction to Tamarin • register_first_device: Registers a new account at a server
and then describe how we modeled our protocol as well as and connects a user’s first device with it. The device is
the security property. identified by a public key generated for the particular
A. A Short Introduction to Tamarin account. Account and device identities are then leaked to
the attacker.
By modeling a protocol in its custom modeling language, • register_second_device: Finishes registration of a user’s
Tamarin performs unbounded verification of given security account by connecting a second device with it. This step
properties (called lemmas) for the protocol in the symbolic also leaks the public key registered by the second device
model. Within the custom modeling language, individual pro- to the attacker.
tocol steps are expressed as multi-set rewrite rules. These • init_transaction: A user commences a transaction at a
rules describe world state changes during execution flow of server for which there already exists a personal account
a protocol. This world state is tracked by Tamarin in the form with two registered devices. After sending the transaction
of a set of facts. A fact is an atom, optionally associated with with its accompanying data to the network, it waits for a
data such as key material, nonces, identities or constants. A nonce from the server.
rule can query facts as well as add new facts to the state. • receive_transaction: An honest server receives a trans-
Application of a rule can be subject to the existence of a fact action from a previously registered user. It generates a
within the state. Such a fact is called an in-fact. Similarly, facts nonce and sends this back to the user.
that a rule adds to the global state, as a result of its application, • phish_transaction: A user initiates a transaction on a
are called out-facts. Chaining of two rules first, and second phishing server.
is achieved by matching first’s out-facts with the in-facts of • receive_transaction_phisher: A phishing server receives
second (see Figure 7). Additionally, facts may contain data, a transaction of a previously phished user.
such as cryptographic key material, constants and nonces. • sign_nonce: A user signs a nonce on her first device for
Within Tamarin’s input language, interaction with the at- a transaction that has also been started by her.
tacker is modeled by special in- and out-facts, which we briefly • verify_signature: A server verifies the signature of a
explain in the following: previously issued nonce of a user’s first device. It then
• Fr(~var ) is an in-fact that instantiates a variable binding generates a second nonce, which is sent to the user’s
that represents a perfect randomly chosen value. These second device.
values can (among other) be used to model generation of • sign_second_nonce: A user’s second device receives a
nonces and cryptographic key material. transaction request. After the user verified that the dis-
• In( var ) is an in-fact that reads a value from the network. played transaction data corresponds to the transaction she
• Out(var) is an out-fact that writes the contents of its previously initiated, her second device signs the second
argument to the network. nonce. The signed nonce is sent back to the server.
These facts can be employed arbitrarily by the protocol’s • verify_second_signature: A user’s second signature is
rules, are not captured in the global state and as such do verified on the server. If verification succeeds the trans-
not need to have a corresponding counterpart embodied in action is completed, i.e., the server executes the user
the global state already. requested transaction internally.
Facts within the global state as well as facts that are written • compromise_first_device: A user’s primary device is
on the trace, including their respective data captures, are not compromised. We model this by leaking the device’s
known to the attacker. Instead, the attacker’s knowledge is private key to the adversary.
register first device compromise first device
Registration
register second device compromise second device
receive transaction
sign nonce
verify signature
Fig. 8. Structure of our Tamarin model. Pictured is the most straightforward order of instantiation of rules for normal and phishing transactions.
• compromise_second_device: A user’s additional device Security (TLS) sessions, our Tamarin model relies on uni-
is compromised. We model this by leaking the device’s lateral authentic channels only. Specifically, we require the
private key to the adversary. communication channels from the server to the user’s devices
An example trace containing a transaction accepted by a to be authentic. We use the rules suggested in the Tamarin
server can be obtained by instantiating the rules in the order manual to model the authentic channel [36]. As a result,
given in Figure 8, excluding rules that model phishing or the actual payload of a transaction is always assumed to be
compromise of devices. In our model, there are two rules transmitted in the clear over an attacker-controlled network.
that do not require custom facts to be present within the These simplifications allow us to present a more concise model
global state, namely new_server and register_first_device. in contrast to a model in which FIDO2 and TLS have also been
Consequently, these two rules can be instantiated regardless of realized. Furthermore, this highlights again that we assume
the current world state within Tamarin. In this example, pro- a strong attack model. In a real-world implementation of
tocol instantiation starts with registration of an honest server FIDO2D, confidentiality is guaranteed by performing trans-
(omitted for clarity in Figure 8), registration of a user’s devices actions within the context of a TLS session.
at this server, initialization of a transaction and verification
of a transaction by the server. These rules correspond to FIDO2D relies on FIDO2 and thus we also model a sim-
three distinct categories: registration, transaction initialization plified version of the FIDO2 protocol. We use the built-in
and transaction verification. In order to model phishing at- signing model of Tamarin that provides the necessary functions
tacks, which is a transaction that is started on a malicious of a signature scheme. To model drawing a fresh nonce as
server, transaction initialization contains two more rules, challenge, we use the built-in fact Fr(~nonce). We simplified
init_transaction_phisher and receive_transaction_phisher. the signed authenticator data to include the server identity
and nonce only. Thus in our model, the signature generation
C. How Our Model Captures Reality can be described as sign(<S, nonce>, privkey ). In our imple-
Tamarin builds on the Dolev-Yao [35] attack model. In mentation, the second device signs the transaction details by
this model, the attacker obtains knowledge of every message usage of the FIDO2 txAuthSimple extension. Therefore, our
sent over the network. He is also able to modify message model assumes that the authenticator data also contains the
contents, suppress and inject messages as well as re-send transaction data for the second device. This is expressed by
known messages at any time in protocol execution. However, the term sign(<S, d, nonce>, privkey ).
the model assumes that the attacker is not able to break
cryptographic schemes without knowing the key. During registration, the registered public keys are written
Although we expect typical implementations of FIDO2D to the attacker-controlled network. We thereby model that
to be embedded within already bootstrapped Transport Layer authentication information stored on a server can be leaked by
lemma o n l y _ u s e r _ i n i t i a t e d _ t r a n s a c t i o n s _ a c c e p t e d :
" A l l i n i t i a t o r t r a n s a c t i o n s e r v e r # i . T r a n s a c t i o n C o m p l e t e ( i n i t i a t o r , s e r v e r , t r a n s a c t i o n ) @i
==>
( ( Ex # j . T r a n s a c t i o n B e g i n ( i n i t i a t o r , s e r v e r , t r a n s a c t i o n ) @j ) |
( Ex # k # l . CompromiseDev1 ( i n i t i a t o r , s e r v e r ) @k & CompromiseDev2 ( i n i t i a t o r , s e r v e r ) @l ) ) "
Fig. 9. A FIDO2D security property which states that only honest (i.e., user initiated) transactions are accepted by a server, captured as a Tamarin lemma.
In conjunction with replay_attack_impossible, this lemma constitutes one-out-of-two-security.
a data breach. However, user devices must not be compromised which the start of a transaction is recorded should be before
during registration. the corresponding completion of said transaction.
Our model considers phishing and malware attacks as By using the Tamarin theorem prover, we verified
described in Section III. We model malware by ex- that our protocol satisfies both lemmas only-user-initiated-
plicitly allowing the attacker to compromise a device. transactions-accepted and replay-attacks-impossible and thus
This is depicted in the rules compromise_first_device and exhibits one-out-of-two security. We sketch why the scheme
compromise_second_device by leaking the stored private key. intuitively fulfills one-out-of-two security and adheres to these
Leaking the private key is a worst-case scenario, as the private lemmas. Assume a user’s first device is compromised and
key is sufficient to impersonate a device completely. her second device is benign. Then, the attacker is able to is-
To consider real-time phishing, we add the rules sue fraudulent transactions or manipulate benign transactions.
phish_transaction and receive_transaction_phisher. The rule During protocol execution the user is asked to confirm the
phish_transaction allows the attacker to force the user to visit transaction data dˆ on her second device although she did not
a potentially attacker-controlled website. In an actual attack, initiate a transaction at all or initiated a transaction with data
this could be accomplished by sending a phishing email with d 6= d. ˆ Clearly, the user will not confirm this transaction
a link to the user. We assume that the user does not notice the and thus the server will not execute the transaction. On the
phishing attempt and continues to follow the protocol by en- other hand, assume her second device compromised and her
tering transaction data. The rule receive_transaction_phisher first device benign. In this case, the attacker cannot initiate
allows the attacker to answer the user’s request with arbitrary a transaction himself. If the user initiates a transaction, the
transaction data and nonce. The whole protocol flow of a attacker is not able to manipulate the transaction data because
phishing attack can be found in Figure 8. After receiving trans- the server links the challenge sent to the user’s second device
action data from the user, the attacker initiates a manipulated to the transaction data entered on the corresponding first device
transaction at the original server. For example, this allows him beforehand. Thus, the attacker can only complete a fraudulent
to relay the nonce of a different transaction to the user. transaction by compromising both devices.
No Compare Compare
B compromised A compromised B compromised A compromised Security assumption
CAP reader [44] × × X × A
PhotoTAN [27] × × X × A
MP-Auth [45] × × X × A
Chow et al. [46] × × X × A
Secure Pay [8] × × X × TEE in A
FIDO2D × X X X A or B
smartphone [8]. Their scheme SecurePay uses OTPs and a (see Section VI), because transaction initiation is protected by
trusted user interface to verify transaction data. The authors FIDO2, which is resilient to password and phishing attacks.
formally model and verify the security of their scheme using If the user compares transaction data, all schemes protect
Tamarin [34]. By relying on a Trusted Execution Environment against malware on the primary device B. Again, FIDO2D is
(TEE), Secure Pay is resilient to malware attacks. However, the only scheme that is secure if A is compromised. Control
this is only true as long as attackers do not exploit vulnera- of device A allows an attacker to tamper with transaction veri-
bilities in the TEE implementation to escalate their privileges fication [13]. However, FIDO2D protects transaction initiation
to the secure world, which has been successfully achieved in with FIDO2 against phishing and password attacks. The other
the past [51]. Furthermore, TEE implementations have been schemes rely on password authentication (potentially including
shown to be susceptible to fault injection and side-channel RBA). As described in Section III, in this case the attacker can
attacks [52], [53]. mount a transaction initiation attack.
Similarly to our work, they identify the issue that the current Thus, FIDO2D is the only scheme that fulfills one-out-of-
way two-factor authentication is defined and used is insecure two security. For users that verify transaction data, it provides
and give guidelines on how to improve upon that. However, resistance to password, phishing, and malware attacks as long
they mainly focus on the fact that strict isolation of the two as one device is not compromised. Even if the user does not
factors is needed which, even though it works in their case, verify transaction data at all, FIDO2D is resilient to malware
in general is not sufficient to guard against malware attacks. on device A. Thus, it provides a higher level of security than
In contrast, our work gives a universally applicable guideline existing schemes regardless of whether transaction data is
for how to design secure authentication schemes, which are verified or not.
resilient against malware. In particular, our notion of one-out-
IX. C ONCLUSION AND F UTURE W ORK
of-two security does not require a special type of device and
is agnostic to how isolation is achieved. In this work, we showed how to protect security-critical
web transactions against attacks with malware. Current web
D. Security of Transaction Authentication Schemes authentication schemes do not offer this protection.
We summarize the security of web authentication schemes We identified requirements for such authentication schemes,
in Table I. We only consider schemes that support transac- namely one-out-of-two security and transaction authentication.
tion authentication, because other schemes are susceptible to Web authentication schemes that fulfill these requirements
malware attacks in any case (see Section IV). Because users protect security-critical transactions against malware attacks
might not verify transaction data properly, we differentiate as long as one device is not compromised.
two scenarios: compare and no compare (see Section VI-E). We introduced 2DA, a generic blueprint for designing web
Furthermore, we assume the attacker to either compromise B authentication schemes that fulfill one-out-of-two security.
or A. In addition, the attacker may carry out password and Based on this blueprint, we designed and implemented a
phishing attacks (see Section III). A scheme is considered new web authentication scheme called FIDO2D, which is
secure, if the attacker is not able to execute a malicious applicable to a wide range of use-cases. We proved the security
transaction. As expected, none of the considered schemes of FIDO2D using Tamarin.
provides security guarantees if both devices are compromised. By relying on protocols and APIs of the FIDO2 standard,
First, we analyze the security of the schemes when a user FIDO2D can be integrated into web applications easily. We
confirms transactions on an additional device without com- demonstrate this by creating a prototypical implementation.
paring transaction data. In this case, all considered schemes Lastly, we urge the FIDO Alliance to fully embrace one-
are vulnerable to malware on the primary device B because out-of-two security and transaction authentication as a design
the user does not detect transaction manipulation. In contrast paradigm for secure web authentication in future versions of
to other schemes, FIDO2D is secure if A is compromised their standard.
R EFERENCES [21] m0chan, Bypassing 2FA For Fun With Evilginx2, 2019. [Online].
Available: https://m0chan.github.io/2019/07/26/Bypassing-2FA-For-F
[1] J. Aten, “Google says 66% of americans still do this 1 thing that puts un-With-Evilginx2.html
their personal information at a huge risk,” 2019. [Online]. Available: [22] M. Orru and G. Trotta, Muraena: The Unexpected Phish, 2019.
https://www.inc.com/jason-aten/google-says-66-of-americans-still-do-t [Online]. Available: https://conference.hitb.org/hitbsecconf2019ams/mat
his-1-thing-that-puts-their-personal-information-at-a-huge-risk-heres-h erials/D2T1%20-%20Muraena%20-%20The%20Unexpected%20Phish
ow-google-wants-to-help.html %20-%20Michele%20Orru%20&%20Giuseppe%20Trotta.pdf
[2] A. Das, J. Bonneau, M. Caesar, N. Borisov, and X. Wang, “The tangled [23] C. Grier, L. Ballard, J. Caballero, N. Chachra, C. J. Dietrich,
web of password reuse.” in NDSS, vol. 14, no. 2014, 2014, pp. 23–26. K. Levchenko, P. Mavrommatis, D. McCoy, A. Nappa, A. Pitsillidis
[3] I. Ion, R. Reeder, and S. Consolvo, ““... no one can hack my mind”: et al., “Manufacturing compromise: the emergence of exploit-as-a-
Comparing expert and non-expert security practices,” in Eleventh Sym- service,” in Proceedings of the 2012 ACM conference on Computer and
posium On Usable Privacy and Security (SOUPS), 2015, pp. 327–346. communications security, 2012, pp. 821–832.
[4] RSA, Making Sense of Man-in-the-browser Attacks: Threat [24] T. Nelms, R. Perdisci, M. Antonakakis, and M. Ahamad, “Towards
Analysis and Mitigation for Financial Institutions, 2010. measuring and mitigating social engineering software download attacks,”
[Online]. Available: https://viewer.media.bitpipe.com/1039183786_34/ in 25th USENIX Security Symposium (USENIX Security), 2016, pp. 773–
1295277188_16/MITB_WP_0510-RSA.pdf 789.
[5] Amnesty International, When Best Practice Isn’t Good Enough: [25] M. Stone and C. Lecigne, How we protect users from 0-day attacks,
Large Campaigns of Phishing Attacks in Middle East and 2021. [Online]. Available: https://blog.google/threat-analysis-group/how
North Africa Target Privacy-Conscious Users, 2018. [Online]. -we-protect-users-0-day-attacks/
Available: https://www.amnesty.org/en/latest/research/2018/12/when-b [26] S. Wiefling, L. Lo Iacono, and M. Dürmuth, “Is this really you? an
est-practice-is-not-good-enough/ empirical study on risk-based authentication applied in the wild,” in
IFIP International Conference on ICT Systems Security and Privacy
[6] C. Cimpanu, Chinese hacker group caught bypassing 2FA, 2019.
Protection. Springer, 2019, pp. 134–148.
[Online]. Available: https://www.zdnet.com/article/chinese-hacker-gro
up-caught-bypassing-2fa/ [27] D. Achenbach, R. Gröll, T. Hackenjos, A. Koch, B. Löwe, J. Mechler,
J. Müller-Quade, and J. Rill, “Your money or your life—modeling and
[7] C. Jacomme and S. Kremer, “An extensive formal analysis of multi-
analyzing the security of electronic payment in the uc framework,” in
factor authentication protocols,” ACM Transactions on Privacy and
International Conference on Financial Cryptography and Data Security.
Security (TOPS), vol. 24, no. 2, pp. 1–34, 2021.
Springer, 2019, pp. 243–261.
[8] R. K. Konoth, B. Fischer, W. Fokkink, E. Athanasopoulos, K. Razavi,
[28] V. Haupert and S. Gabert, “Short paper: How to attack psd2 internet
and H. Bos, “Securepay: Strengthening two-factor authentication for
banking,” in International Conference on Financial Cryptography and
arbitrary transactions,” in 2020 IEEE European Symposium on Security
Data Security. Springer, 2019, pp. 234–242.
and Privacy (EuroS&P). IEEE, 2020, pp. 569–586.
[29] R. Mayrhofer, J. V. Stoep, C. Brubaker, and N. Kralevich, “The android
[9] B. Schneier, “Two-factor authentication: too little, too late,” Communi- platform security model,” ACM Transactions on Privacy and Security
cations of the ACM, vol. 48, no. 4, p. 136, 2005. (TOPS), vol. 24, no. 3, pp. 1–35, 2021.
[10] K. Krol, E. Philippou, E. De Cristofaro, and M. A. Sasse, “"they brought [30] FIDO Alliance, Client to Authenticator Protocol (CTAP), 2021. [Online].
in the horrible key ring thing!" analysing the usability of two-factor Available: https://fidoalliance.org/specs/fido-v2.1-ps-20210615/fido-cli
authentication in uk online banking,” in USEC Workshop on Usable ent-to-authenticator-protocol-v2.1-ps-20210615.pdf
Security at the Network and Distributed System Security Symposium, [31] E. Klieme, J. Wilke, N. van Dornick, and C. Meinel, “Fidonuous: A
2015. fido2/webauthn extension to support continuous web authentication,” in
[11] S. G. Lyastani, M. Schilling, M. Neumayr, M. Backes, and S. Bugiel, 2020 IEEE 19th International Conference on Trust, Security and Privacy
“Is fido2 the kingslayer of user authentication? a comparative usability in Computing and Communications (TrustCom). IEEE, 2020, pp. 1857–
study of fido2 passwordless authentication,” in 2020 IEEE Symposium 1867.
on Security and Privacy (SP). IEEE, 2020, pp. 268–285. [32] N. Mooney, N. Steele, and J. Erickson, Network Transport
[12] A. P. Felt, M. Finifter, E. Chin, S. Hanna, and D. Wagner, “A survey of Summary, 2020. [Online]. Available: https://github.com/w3c/webau
mobile malware in the wild,” in Proceedings of the 1st ACM workshop thn/files/4588654/The.Network.Transport.May.2020.pdf
on Security and privacy in smartphones and mobile devices, 2011, pp. [33] N. Frymann, D. Gardham, F. Kiefer, E. Lundberg, M. Manulis, and
3–14. D. Nilsson, “Asynchronous remote key generation: An analysis of
[13] V. Haupert and T. Müller, “On app-based matrix code authentication in yubico’s proposal for w3c webauthn,” in Proceedings of the 2020 ACM
online banking.” in ICISSP, 2018, pp. 149–160. SIGSAC Conference on Computer and Communications Security, 2020,
[14] European Commission, Commission Delegated Regulation (EU) pp. 939–954.
2018/389, 2017. [Online]. Available: https://eur-lex.europa.eu/eli/reg_d [34] S. Meier, B. Schmidt, C. Cremers, and D. Basin, “The tamarin prover
el/2018/389/oj for the symbolic analysis of security protocols,” in Computer Aided
[15] World Wide Web Consortium, Web Authentication: An API for Verification, N. Sharygina and H. Veith, Eds. Berlin, Heidelberg:
accessing Public Key Credentials Level 2, 2021. [Online]. Available: Springer Berlin Heidelberg, 2013, pp. 696–701.
https://www.w3.org/TR/webauthn-2/ [35] D. Dolev and A. Yao, “On the security of public key protocols,” IEEE
[16] K. Thomas, F. Li, A. Zand, J. Barrett, J. Ranieri, L. Invernizzi, Transactions on Information Theory, vol. 29, no. 2, pp. 198–208, 1983.
Y. Markov, O. Comanescu, V. Eranti, A. Moscicki et al., “Data breaches, [36] The Tamarin Team, Tamarin-Prover Manual, 2021. [Online]. Available:
phishing, or malware? understanding the risks of stolen credentials,” in https://tamarin-prover.github.io/manual/tex/tamarin-manual.pdf
Proceedings of the 2017 ACM SIGSAC conference on computer and [37] V. Haupert and S. Gabert, “Where to look for what you see is what you
communications security, 2017, pp. 1421–1434. sign? user confusion in transaction security,” in European Symposium
[17] S. Ikeda, Half a Million Zoom Accounts Compromised by on Research in Computer Security. Springer, 2019, pp. 429–449.
Credential Stuffing, Sold on Dark Web, 2020. [Online]. Avail- [38] D. Basin, S. Radomirovic, and L. Schmid, “Modeling human errors in
able: https://www.cpomagazine.com/cyber-security/half-a-million-zoo security protocols,” in 2016 IEEE 29th Computer Security Foundations
m-accounts-compromised-by-credential-stuffing-sold-on-dark-web/ Symposium (CSF). IEEE, 2016, pp. 325–340.
[18] T. Hunt, “Password reuse, credential stuffing and another billion records [39] P. Gjerstad, P. F. Meyn, P. Molnár, and T. D. Næss, “Do president trump’s
in have i been pwned,” troyhunt.com, 2017. tweets affect financial markets?” Decision Support Systems, p. 113577,
[19] S. Wiefling, M. Dürmuth, and L. L. Iacono, “What’s in score for web- 2021.
site users: A data-driven long-term study on risk-based authentication [40] M. Hirani, S. Jones, and B. Read, Global DNS Hijacking
characteristics,” in International Conference on Financial Cryptography Campaign: DNS Record Manipulation at Scale, 2019. [Online].
and Data Security. Springer, 2021, pp. 361–381. Available: https://www.mandiant.com/resources/global-dns-hijacking-c
[20] M. Campobasso and L. Allodi, “Impersonation-as-a-service: Charac- ampaign-dns-record-manipulation-at-scale
terizing the emerging criminal infrastructure for user impersonation [41] R. Canetti, “Universally composable security: a new paradigm for
at scale,” in Proceedings of the 2020 ACM SIGSAC Conference on cryptographic protocols,” in Proceedings 42nd IEEE Symposium on
Computer and Communications Security, 2020, pp. 1665–1680. Foundations of Computer Science, 2001, pp. 136–145.
[42] C. Cremers, M. Horvat, J. Hoyland, S. Scott, and T. van der Merwe, “A
comprehensive symbolic analysis of tls 1.3,” in Proceedings of the 2017
ACM SIGSAC Conference on Computer and Communications Security,
2017, pp. 1773–1788.
[43] J. Bonneau, C. Herley, P. C. Van Oorschot, and F. Stajano, “The quest
to replace passwords: A framework for comparative evaluation of web
authentication schemes,” in 2012 IEEE Symposium on Security and
Privacy. IEEE, 2012, pp. 553–567.
[44] S. Drimer, S. J. Murdoch, and R. Anderson, “Optimised to fail: Card
readers for online banking,” in International Conference on Financial
Cryptography and Data Security. Springer, 2009, pp. 184–200.
[45] M. Mannan and P. C. Van Oorschot, “Leveraging personal devices for
stronger password authentication from untrusted computers,” Journal of
Computer Security, vol. 19, no. 4, pp. 703–750, 2011.
[46] Y.-W. Chow, W. Susilo, G. Yang, M. H. Au, and C. Wang, “Authentica-
tion and transaction verification using qr codes with a mobile device,”
in International Conference on Security, Privacy and Anonymity in
Computation, Communication and Storage. Springer, 2016, pp. 437–
451.
[47] Google, Google’s strongest security helps keep your private information
safe., 2021. [Online]. Available: https://landing.google.com/advancedp
rotection/
[48] A. Grinman, The Future of Krypton Is Here and It’s Called Akamai
MFA, 2021. [Online]. Available: https://krypt.co/blog/announcements/kr
ypton-is-now-akamai-mfa.html
[49] Duo, One-Tap Authentication With Duo Push, 2021. [Online].
Available: https://duo.com/product/multi-factor-authentication-mfa/aut
hentication-methods/duo-push
[50] P. A. Grassi, J. L. Fenton, E. Newton, R. Perlner, A. Regenscheid,
W. Burr, J. Richer, N. Lefkovitz, J. Danker, Y.-Y. Choong et al., NIST
special publication 800-63b: digital identity guidelines (Authentication
and Lifecycle Management), 2017. [Online]. Available: https://nvlpubs.
nist.gov/nistpubs/SpecialPublications/NIST.SP.800-63b.pdf
[51] D. Cerdeira, N. Santos, P. Fonseca, and S. Pinto, “Sok: Understanding
the prevailing security vulnerabilities in trustzone-assisted tee systems,”
in 2020 IEEE Symposium on Security and Privacy (SP). IEEE, 2020,
pp. 1416–1432.
[52] K. Ryan, “Hardware-backed heist: extracting ecdsa keys from qual-
comm’s trustzone,” in Proceedings of the 2019 ACM SIGSAC Confer-
ence on Computer and Communications Security, 2019, pp. 181–194.
[53] P. Qui, D. Wang, Y. Lyu, and G. Qu, “Voltjockey: Abusing the processor
voltage to break arm trustzone,” GetMobile: Mobile Computing and
Communications, vol. 24, no. 2, pp. 30–33, 2020.
A PPENDIX
TAMARIN M ODEL FOR FIDO2D
Our Tamarin model including the security lemmas can be found below. For brevity, we omitted sanity lemmas, as well as
the variations of the model for users that do no compare transaction data. However, the full Tamarin model is available online8 .
1 theory fido2d
2 begin
3 builtins : signing
4
5 rule new_server :
6 [ ]
7 −− [ H o n e s t S e r v e r ( $S ) ] −>
8 [ ! H o n e s t ( $S ) ]
9
10 rule r e g i s t e r _ f i r s t _ d e v i c e :
11 [ Fr (~ p r i v k e y ) ]
12 −− [ ] −>
13 [
14 ! Ltk_Dev1 ( $I , $S , ~ p r i v k e y ) ,
15 ! Pk_Dev1 ( $I , $S , pk ( ~ p r i v k e y ) ) ,
16 R e g i s t e r e d P a r t i a l l y ( $I , $S ) ,
17 Out ( < $I , pk ( ~ p r i v k e y ) >)
18 ]
19
20 rule register_second_device :
21 [
22 Fr (~ p r i v k e y ) ,
23 RegisteredPartially ( I , S)
24 ]
25 −− [ A c c o u n t R e g i s t e r e d ( I , S ) ] −>
26 [
27 ! Ltk_Dev2 ( I , S , ~ p r i v k e y ) ,
28 ! Pk_Dev2 ( I , S , pk ( ~ p r i v k e y ) ) ,
29 ! Registered ( I , S) ,
30 Out ( < I , pk ( ~ p r i v k e y ) >)
31 ]
32
33
34 rule i n i t _ t r a n s a c t i o n :
35 [
36 ! Registered ( I , S) ,
37 ! Honest ( S )
38 ]
39 −− [ T r a n s a c t i o n B e g i n ( I , S , $d ) ] −>
40 [
41 U s e r W a i t F o r C o n f i r m a t i o n ( I , S , $d ) ,
42 Dev1WaitForNonce ( I , S , $d ) ,
43 Out ( < I , S , $d > )
44 ]
45
46 rule r e c e i v e _ t r a n s a c t i o n :
47 [
48 ! Registered ( I , S) ,
49 ! Honest ( S ) ,
50 In ( < I , S , d >) ,
51 Fr (~ nonce )
52 ]
53 −− [ T r a n s a c t i o n R e c e i v e d ( I , S , d ) ] −>
54 [
55 S e r v e r W a i t F o r S i g n a t u r e ( I , S , d , ~nonce ) ,
56 Out_A ( S , I , < I , d , ~ nonce > )
57 ]
58
59 rule phish_transaction :
8 https://tinyurl.com/2022-fido2d-tamarin
60 [
61 ! Registered ( I , S) ,
62 In (P)
63 ]
64 −− [ T r a n s a c t i o n B e g i n ( I , S , $d ) , P h i s h e r ( P ) ] −>
65 [
66 U s e r W a i t F o r C o n f i r m a t i o n ( I , S , $d ) ,
67 Dev1WaitForNonce ( I , P , $d ) ,
68 Phished ( I , S , P)
69 ]
70
71 rule r e c e i v e _ t r a n s a c t i o n _ p h i s h e r :
72 [
73 I n ( < d , nonce > ) ,
74 Phished ( I , S , P)
75 ]
76 −− [ ] −>
77 [
78 Out_A ( P , I , < I , d , nonce > )
79 ]
80
81 rule sign_nonce :
82 [
83 Dev1WaitForNonce ( I , S , d ) ,
84 In_A ( S , I , < I , d , nonce > ) ,
85 ! Ltk_Dev1 ( I , S , p r i v k e y )
86 ]
87 −− [ N o n c e S i g n e d ( I , S , n o n c e ) ] −>
88 [
89 Out ( s i g n ( <S , nonce > , p r i v k e y ) )
90 ]
91
92 rule v e r i f y _ s i g n a t u r e :
93 [
94 In ( s i g n a t u r e ) ,
95 S e r v e r W a i t F o r S i g n a t u r e ( I , S , d , nonce ) ,
96 ! Pk_Dev1 ( I , S , pubkey ) ,
97 Fr (~ nonce2 )
98 ]
99 −− [ Eq ( v e r i f y ( s i g n a t u r e , <S , nonce > , pubkey ) , t r u e ) , S i g n a t u r e V e r i f i e d D e v 1 ( I , S , d ) ] −>
100 [
101 S e r v e r W a i t F o r S e c o n d S i g n a t u r e ( I , S , d , ~nonce2 ) ,
102 Out_A ( S , I , <S , I , d , ~ nonce2 > )
103 ]
104
105 rule sign_second_nonce :
106 [
107 UserWaitForConfirmation ( I , S , d ) ,
108 In_A ( S , I , <S , I , d , nonce > ) ,
109 ! Ltk_Dev2 ( I , S , p r i v k e y )
110 ]
111 −− [ D i s p l a y D a t a ( I , S , d ) , N o n c e S i g n e d ( I , S , n o n c e ) ] −>
112 [
113 Out ( s i g n ( <S , d , nonce > , p r i v k e y ) )
114 ]
115
116 rule verify_second_signature :
117 [
118 In ( s i g n a t u r e ) ,
119 S e r v e r W a i t F o r S e c o n d S i g n a t u r e ( I , S , d , nonce ) ,
120 ! Pk_Dev2 ( I , S , pubkey )
121 ]
122 −− [ Eq ( v e r i f y ( s i g n a t u r e , <S , d , nonce > , pubkey ) , t r u e ) , T r a n s a c t i o n C o m p l e t e ( I , S , d ) ] −>
123 [
124 ]
125
126 rule compromise_first_device :
127 [
128 ! Ltk_Dev1 ( I , S , p r i v k e y )
129 ]
130 −− [ CompromiseDev1 ( I , S ) ] −>
131 [
132 Out ( p r i v k e y )
133 ]
134
135 rule compromise_second_device :
136 [
137 ! Ltk_Dev2 ( I , S , p r i v k e y )
138 ]
139 −− [ CompromiseDev2 ( I , S ) ] −>
140 [
141 Out ( p r i v k e y )
142 ]
143
144 / / A u t h e n t i c C h a n n e l R u l e s f r o m Tamarin Manual
145 r u l e ChanOut_A :
146 [
147 Out_A (A, B , x )
148 ]
149 −− [ ChanOut_A (A, B , x ) ] −>
150 [
151 ! Auth (A, x ) ,
152 Out ( <A, B , x > )
153 ]
154
155 r u l e ChanIn_A :
156 [
157 ! Auth (A, x ) ,
158 I n (B)
159 ]
160 −− [ ChanIn_A (A, B , x ) ] −>
161 [
162 In_A (A, B , x )
163 ]
164
165 restriction Equality :
166 " A l l x y # i . Eq ( x , y ) @i ==> x = y "
167
168 r e s t r i c t i o n HonestServersDontPhish :
169 " A l l s e r v e r # i # j . H o n e s t S e r v e r ( s e r v e r ) @i & P h i s h e r ( s e r v e r ) @j ==> F "
170
171 / / T h i s r e s t r i c t i o n i s n o t r e q u i r e d f o r s e c u r i t y b u t s i m p l i f i e s p r o o f s and c o u n t e r e x a m p l e s
172 r e s t r i c t i o n UniqueAccounts :
173 " A l l a c c s e r v e r # i # j . A c c o u n t R e g i s t e r e d ( acc , s e r v e r ) @i & A c c o u n t R e g i s t e r e d ( acc ,
s e r v e r ) @j ==> # i = # j "
174
175 lemma o n l y _ u s e r _ i n i t i a t e d _ t r a n s a c t i o n s _ a c c e p t e d :
176 " All i n i t i a t o r t r a n s a c t i o n server # i . TransactionComplete ( i n i t i a t o r , server ,
t r a n s a c t i o n ) @i ==> ( ( Ex # j .
177 T r a n s a c t i o n B e g i n ( i n i t i a t o r , s e r v e r , t r a n s a c t i o n ) @j ) | ( Ex #k # l .
CompromiseDev1 ( i n i t i a t o r , s e r v e r ) @k & CompromiseDev2 ( i n i t i a t o r , s e r v e r ) @l
))"
178
179 lemma r e p l a y _ a t t a c k _ i m p o s s i b l e :
180 " All i n i t i a t o r 1 t r a n s a c t i o n 1 i n i t i a t o r 2 t r a n s a c t i o n 2 server # i # j . TransactionComplete (
i n i t i a t o r 1 , s e r v e r , t r a n s a c t i o n 1 ) @i & T r a n s a c t i o n C o m p l e t e ( i n i t i a t o r 2 , s e r v e r ,
t r a n s a c t i o n 2 ) @j & n o t # i = # j ==> ( ( Ex #k # l . T r a n s a c t i o n B e g i n ( i n i t i a t o r 1 , s e r v e r ,
t r a n s a c t i o n 1 ) @k & T r a n s a c t i o n B e g i n ( i n i t i a t o r 2 , s e r v e r , t r a n s a c t i o n 2 ) @l & n o t # k
= # l ) | ( Ex #m #n . CompromiseDev1 ( i n i t i a t o r 1 , s e r v e r ) @m & CompromiseDev2 (
i n i t i a t o r 1 , s e r v e r ) @n) | ( Ex #m #n . CompromiseDev1 ( i n i t i a t o r 2 , s e r v e r ) @m &
CompromiseDev2 ( i n i t i a t o r 2 , s e r v e r ) @n) ) "
181
182 end