CS5232 Formal Specification and Design Techniques. Using PAT to verify the Needham-Schroeder Public Key Protocol

Size: px
Start display at page:

Download "CS5232 Formal Specification and Design Techniques. Using PAT to verify the Needham-Schroeder Public Key Protocol"

Transcription

1 CS5232 Formal Specification and Design Techniques Using PAT to verify the Needham-Schroeder Public Key Protocol Semester 2, AY 2008/2009 1/37

2 Table of Contents 1. Project Introduction 3 2. Building the PAT model Variables and Channels Initiator Responder Intruder The System Analysis of the System The Corrected Protocol Building the Corrected Protocol Model Analyzing the Corrected Protocol Model 28 5 Bugs Found in PAT Crash # Crash # UI Bug 35 6 PAT Suggestions User Interface Suggestions Functionality Suggestions 36 Annex A Original Version of Needham-Schroeder Public Key Protocol Annex B Fixed Version of Needham-Schroeder Public Key Protocol 2/37

3 1. Project Introduction In this project, we used PAT to model the Needham-Schroeder Public Key Protocol. The aim of the protocol is to make that the two parties can be assured of each other s identity they should become sure that they really are talking to each other, rather than an intruder impersonating the another party. The protocol, by itself, is simple as it requires only 3 messages in order to establish a session between 2 authenticated parties as seen below: However, the situation becomes more complicated when there is an intruder who is able to listen to the communication between 2 parties and try to impersonate the initiator. Thus, by modeling the protocol, we hope to check the states of all possible situations that can arise and expose any possible weaknesses that can be exploited should an intruder be able to interpret and make use of the messages sent between the initiator and the receiver. 2. Building the PAT model We assume that the details of the Needham-Schroeder protocol are known. If not, the description of the protocol and its details can be found in (Paolo & Riccardo, 2002), (Lowe, 1996), (Needham & Schroeder, 1978). In order to model the Needham-Schroeder protocol, we follow the modeling approach of the Promela model as described in (Paolo & Riccardo, 2002). Thus, we will describe how we translate the Promela model to the PAT model and yet preserve the same logic and modeling details of the protocol. We will also touch on the limitations of PAT compared to Promela and how we work around such limitations, and the advantages of PAT over Promela. 3/37

4 Our protocol involves 2 agents and an Intruder. A plays the role of the initiator, B plays the role of the responder (ie. the party which A is wants to establish authentication with), and, I, the intruder, plays the role of the intruder. We model each agent taking part in the protocol as CSP processes. We also model the most general intruder who can interact with the protocol: the intruder can observe and intercept all messages, and so learn information such as the values of nonces and then use this information to introduce fake messages into the system. We use PAT to test whether the protocol correctly achieves authentication, and discover an attack upon the protocol which allows the intruder to imitate an agent A in the run of the protocol with another agent, B. This attack was previously reported by Lowe in (Lowe, 1996). Following which, we also implemented the fixed version of the protocol that has the identity of the responder within the encrypted message. With the new protocol, we were able to obtain an execution trace where the responder correctly commits to a session with the initiator. With the new protocol, we were also to show that it is secure and the intruder was unable to imitate another party. Thus, we will show that our system is secure for the case of a single initiator and a single responder. Lowe [3] proved that if this protocol is secure for a small system, then it implies that it would be secure for a system of arbitrary size. All messages sent by party A to either B or another any party (I) will be stored in a channel from which the intruder, I, is able to intercept, get useful information from it, and try to impersonate A. 4/37

5 2.1 Variables and Channels PAT: PROMELA: 5/37

6 Promela is a strongly typed language. Thus, we need to define the data types for the parties and its nonce as a type, mtype. However, PAT is weakly-typed. Thus, there is actually no need to define the types of A, B, I, Na, Nb and gd. They will be dynamically typed on their first use of the variables. However, to properly identify them, and use them for channel blocking later, we have to define them as constants. As such, we define them as integer constants from 1 to 6 respectively. A, B, and I play the role of the initiator, responder and Intruder respectively. Na and Nb represent the nonce used by role A and B respectively. In the real world, the nonce will always be different for each session. However, the purpose of the model is to detect possible security flaws in the protocol and not the flaws in the cryptosystem used by the protocol. Thus, since we are only interested in establishing authentication for one session, we assume that the nonce used by A and B to be a constant (in the session). gd is simply the symbolic representation of a generic data used by the intruder. Note also that due an advantage in PAT features, there is no need to for a service constant, R, as used in the Promela model. For channel initialization, as Promela is strongly typed, it requires the data types to be declared in the definition of the channels and only the defined types is able to be passed through the channels. However, for PAT, we simply define the channel and make sure that the input and output have exactly the same number of items. The variables used to store the input of the channel will be automatically typed based on the messages stored in the channel. There is no need to define the type as the type will be dynamically typed based on what is in the channel itself. For both PAT and Promela, there is support for synchronous channels, that is, channels without buffer. Thus, for the channels, we initialize them with buffer of size 0. The global variables are essentially the same. Promela uses bit to type it, while PAT uses var to define a generic variable and dynamically type using the value false. 6/37

7 2.2 Initiator PAT: PROMELA: 7/37

8 The PIni process represents the role of the Initiator, A. The process is simple. A sends a message {Na, A} using the public key of the intended party, starting the run of the protocol with the party. This is step 1 in the diagram above and represented by ca!a.na.a.party. It then waits for a reply that is encrypted using his own (A s) public key. A is then able to decrypt the message using his secret key and if B is really B as he claims, then he should be able to encrypt A s nonce in the message. This is step 2 in the diagram above and is represented by ca?a.na.g1.a. Finally, A decrypts the message {Na, g1} and sends the message {g1} (supposedly the nonce of B) back to the intended party using the intended party s public key. If A is able to decrypt B s nonce using A s own secret key, this means that agent who sent the message is indeed agent A. In the original Promela code, the process has 3 parameters in order to represent the sequence of message exchanges prescribed by the protocol. This is needed in Promela because the parameters are needed to make sure that the channel s message is the same as the parameters. However, we simplify this in PAT as we felt that two of the parameters are actually constants and are redundant. Moreover, this simplification is required as PAT is only able to block parameters if they are constant value, unlike that of Promela, which blocks based on the variable s content. Thus, the only parameter that PAT requires is the party since the initiator, A, can choose to initiate sessions with different parties. The parameter self and nonce is redundant as they basically constants. That is, they always represent the same item and the only parameter that will be passed in for PIni s self is A and PIni s nonce is the nonce of the A. Thus, we only retain parameter of party as this is the only parameter that changes. 8/37

9 As PAT is weakly-typed, we also do not need to initialize the type of the variable (g1) passed in by the channel. Instead, in PAT, the data type of the variable in g1 will be dynamically typed based on what is in the channel itself. In Promela, the IniRunning macro and the channel sending are casted as an atomic operation. This is to reduce the amount of allowed interleaving and thus reduce the complexity of the model from the verification point of view. However, in the current PAT, each channel sending/receiving is one atomic operation and there is no way to perform another operation together with channel sending/receiving in one atomic operation. In our communication with Sun Jun, he mentioned that this could lead to data corruption. In the context of this protocol, since the variables sent into the channels are not changed, the results will be the same even if they are allowed to interleave as separate events or operations. It will only lead to an increase in the amount of interleaving. Since PAT does not allow macros, we use events and statement blocks to represent the operations to be performed. In the Promela model, the eval operator was used to block the channel from being read until the requirements of the message in the channel are met. For example, in the Promela model, the channel ca will only accept messages where the first message on the channel is equivalent to the variable parameter self, otherwise, the channel receiving will be blocked until the evaluation becomes true. However, PAT does not support channel blocking based on variables. Fortunately, PAT does support channel blocking based on constants. Thus, we exploit the fact that PIni s self and nonce are always the constant A and Na respectively. Thus, using PAT, we are also able to block the channel receiving. We only allow the channel to receive using the constants A and Na, if the message of the channel is of the following form: A.Na.g1.A, where g1 can be any message. Lastly, we note that the process stops once it is able to decrypt the party s nonce and send the party s nonce back to the party. This indicates that the session has been established and the parties have been authenticated. That is, A is able to communicate with its intended party knowing that he really is communicating with his intended party. Thus, the process does not repeat itself, terminates and stops. This is represented by the PAT command Skip. 9/37

10 2.3 Responder PAT: PROMELA: 10/37

11 The PRes process represents the role of the Responder, B. The process is simple. As seen in the diagram above, B receives the message sent by A.. This is represented by the statement in PAT, ca?b.g2.g3.b. Since the message is encrypted using B s public key, B is able to decrypt it to find A s nonce. It then decrypts the message using its own secret key and send the message back to A with its own nonce encrypted using A s public key. By sending A s nonce back to A, A is able to authenticate that B is really B since only B knows his own secret key. This is represented by the statement ca!b.g2.nb.g3. For B to make sure that A is indeed A, he would have to wait for A to decrypt the message it sent out and send it back its own encrypted nonce. Thus, B waits for its own nonce encrypted with its own public key to be sent back to the channel. This is represented by the statement cb?b.nb.b. Similar to the Initiator process in the previous section, we do not need any parameters. This is because, in the Promela model, the parameters that it accepts are basically constants. In order to call the process PRes, the parameters are self and the nonce of B, which are always B and Nb respectively. Thus, we omit the parameters. Also, similar to the Initiator process in the previous section, we do not need to type g2 and g3. We also block the channel from receiving specific messages by exploiting the use of constants. Using events and statement blocks, we are able to perform the operations needed. Atomic operations are not needed as the end verification results will be the same. Finally, if B receives its nonce, Nb, that was encrypted in the message sent out previously, then it is able to confirm the identity of A and session has been established and parties identities authenticated. B is able to communicate with A knowing that he really is communicating with his A, and vice versa. Thus, the process does not repeat itself and stops. This is represented by the PAT command Skip. 11/37

12 2.4 Intruder PAT: 12/37

13 PROMELA: 13/37

14 Here, we want to model the intruder as a process that can perform any attack that we would expect a real-world intruder to be able to perform. Thus, the intruder should be able to : Overhear and intercept any messages being passed in the system Decrypt messages that are encrypted with its public key, so as to learn new nonces. Introduce new messages into the system using the nonces that he knows. Reply to any messages that he has seen (possibly changing plain-text parts), even if he does not understand the content of the encrypted part. We assume that the intruder is a user of the computer network and so can take part in normal runs of the protocol, and other agents may initiate runs of the protocol with him. We will define the most general intruder who can act as above. Thus, we model the Intruder based on what messages it is able to intercept and what it can learn from the messages that it intercepts to avoid the representation of redundant knowledge that the intruder will never use. For example, the intruder can only decrypt messages that are encrypted with his own public key and store the nonce, otherwise, it stores the message as a whole without decrypting. Also, only sending the message {Nb}PK(B)will be useful as that is the only message that B will accept in order to establish the authenticated session. Other messages such as {Na}PK(B) does not have any effect as it is not accepted by B. All messages sent by party A to either B or another any party (I) will be stored in a channel from which the intruder, I, is able to intercept, get useful information from it, and try to impersonate A. Thus, the role of I is both to act as a middleman between A 14/37

15 and B and as a normal user of the computer network that any A may initiate runs of the protocol with. In both cases, its main aim is to impersonate A if possible. To model the intruder, we have to understand that the intruder behaves as a never ending process that spends all its time sending messages to and receiving messages from the protocol channels (ca and cb). In Promela, this was modeled as an infinite do-while loop. However, this is not possible in PAT as channel sending and receiving can only be modeled as an event and not as an operation. Thus, we are unable to put channel sending and receiving in loops. As such, we model the intruder as a process that always goes back to itself and never stops. To do this, we use a choice operator to signify that the process can choose any operations it wishes to perform as long as the guarded condition is satisfied and always goes back to itself to signify that it is a never ending process. Similar to the Promela model, each branch of the main repetition construct represents an input or output operation on the global channels (ca and cb) In the Promela model, the command :: ca! (kna -> A : R), Na, Na, A is used to represent the intruder sending the message {Na, Na} PK(A) to A on the condition that the intruder knows Na (ie. The value of the variable kna is 1). If the intruder does not know kna, then the message is sent to a non-existing identity R. However, the sending of message to R is actually a redundant step, and this might be due to a Promela restriction. We model a more correct model that does not send the message at all if the intruder does not know Na. To do this, we use the guard condition to block the sending of messages until the guard condition is satisfied. That is, if kna is not known to the intruder, the messages will not be sent at all. This results in a cleaner code that is easier to understand and models the system in a more accurate way. In Promela, while intercepting the channel s data, x1, x2 and x3 are service variables that are reused to record the channel input and always set to 0 before the next operation. However, this is not required in PAT as the variables used to record the channel input are always new variables that are freshly initialized. Macros are also used in Promela to simply the code and result in a cleaner program. However, in PAT, macros are not yet available. Thus, we have to code the logic for the 15/37

16 macros directly into the intruder process (PI) and name in order to identify them in the trace, we named the events as InterceptChanA and InterceptChanB. PAT 2.3 does not support local variables. As such, we move the local variables in the Promela model into global variables. This is able to work since the PI process is the only process that modifies those variables. There are not other processes that modify those variables. Thus, even though the structure of the PAT s intruder process and Promela s model looks rather different, the logic of the 2 processes is the same. They are never-ending processes that spend their time receiving messages to increase its knowledge and sending messages based on its current knowledge. 16/37

17 2.5 The System PAT: PROMELA: The PAT model depicts that the process that the Initiator, A, initiates a protocol run with any other agents (some other party, I, or the intended party B). This is interleaved with the Responder process and the intruder process. This depicts exactly the same logic as in the Promela model, where the 4 processes run together and interleave with one another. 17/37

18 3. Analysis of the System We can use PAT to test whether the protocol correctly authenticates the two agents. This is done using LTL properties. We can also test the reachability of a state or if the system is deadlock-free. We will explore the use of some of these tests to verify the protocol. LTL PROPERTY #1: Formally, this LTL property basically states that ResRunningAB must come true before IniCommitAB. Informally, we use this property to test whether the protocol correctly authenticates the responder. To do so, we ensure that the initiator A commits to a session with B only if B has indeed taken part in a run of the protocol with A. The result of the assertion is that the formula is VALID. That is to say, this LTL formula is true in every execution path of the system. In other words, there are no execution paths in the system in which ResRunningAB does NOT come before IniCommitAB. Thus, in all execution traces, the identity of agent B is always properly authenticated. Verification Result: ***The Assertion (Protocol() = [](([]! inicommitab) (! inicommitab U resrunningab))) is VALID.*** Verification Setting: Method: SCC-based Model Checking Verification Statistics Visited States:3155 Total Transitions:8380 Search Depth:15 Time Used: s Estimated Memory Used: KB 18/37

19 LTL PROPERTY #2: Formally, this property states that IniRunningAB must be true before rescommitab. Informally, we use this property to test whether the protocol correctly authenticates the initiator. To do so, we ensure that the responder B commits to a session with initiator A only if A took part in the protocol run. The result of the assertion is that the formula is NOT VALID. That is to say, there exists an execution path where this LTL formula is not satisfied. As expected, PAT discovers that the Protocol does not satisfy the above property. It finds that after the trace: 19/37

20 Or in the trace state: ***init -> IniRunning_AB -> ca > InterceptChanA -> ca > ResRunning_AB -> ca > InterceptChanA -> ca > IniCommit_AB -> cb > InterceptChanB -> cb > ResCommit_AB -> deadlock! This is better shown in the diagram below: PIni PI PRes ca!a.{na.a} PK (I) ca?a.{na.a} PK (I) ca!b.{na.a} PK (B) ca?b.{na.a} PK (B) ca?b.{na.nb} PK (A) ca!b.{na.nb} PK (A) ca?a{na.nb} PK (A) ca!a.{na.nb} PK (A) cb!a.{nb} PK (I) cb?a.{nb} PK (I) cb!b.{nb} PK (B) cb?b.{nb} PK (B) Basically, this means the responder B commits to a session with A even though A is not trying to establish a session with B. A is trying to establish a session with I. In other words, A tries to establish a session with I, while the intruder impersonates A to establish a false session with B. This is the same attack that was discovered by Lowe in (Lowe, 1996). In more details, A tries to establish a session with I, sending the nonce Na encrypted with I s key. The intruder then imitates A to start a run of the protocol with B, sending the same nonce, Na. B responds by choosing a new nonce, Nb, and returns the message to A. The intruder cannot decrypt this message to obtain Nb, but instead uses A as an oracle, by replaying this message. A decrypts the message to obtain Nb, and returns this to I. I can then decrypt the message to obtain Nb, which he returns to B, thus completing the protocol. Hence, B believes that he has correctly established an authenticated session with A. Thus, in this execution trace, the identity of agent A is not properly authenticated. 20/37

21 REACHABILITY TEST #1: This reachability test states that when the A initiates a session with I, then a session between A and B will be established. Thus, this is not supposed to be true. However, due to the weakness demonstrated by Lowe and explained in LTL Property #2, a session is still established between A and B although A tries to initiate a session with I. Thus, the witness is the same as the previous one and is illustrated as follows: PIni PI PRes ca!a.{na.a} PK (I) ca?a.{na.a} PK (I) ca!b.{na.a} PK (B) ca?b.{na.a} PK (B) ca?b.{na.nb} PK (A) ca!b.{na.nb} PK (A) ca?a{na.nb} PK (A) ca!a.{na.nb} PK (A) cb!a.{nb} PK (I) cb?a.{nb} PK (I) cb!b.{nb} PK (B) cb?b.{nb} PK (B) Verification Result: ***The Assertion (Protocol_AB() reaches goal) is VALID.*** Execution: ***init -> IniRunning_AB -> ca > InterceptChanA -> ca > ResRunning_AB -> ca > InterceptChanA -> ca > IniCommit_AB -> cb > InterceptChanB -> cb > ResCommit_AB Verification Setting: Method: DFS Reachability Analysis Verification Statistics Visited States:79 Total Transitions:87 Search Depth:13 Time Used: s Estimated Memory Used: KB 21/37

22 REACHABILITY TEST #2: This reachability test states that when the A initiates a session with B, then a session between A and B will be established. Thus, this has to be true for the protocol to work. Fortunately, this reachability test is reachable. The witness is as follows: PIni PI PRes ca!a.{na.a} PK (B) ca?a.{na.a} PK (B) ca!b.{na.a} PK (B) ca?b.{na.a} PK (B) ca?b.{na.nb} PK (A) ca!b.{na.nb} PK (A) ca?a{na.nb} PK (A) ca!a.{na.nb} PK (A) cb!a.{nb} PK (B) cb?a.{nb} PK (B) cb!b.{nb} PK (B) cb?b.{nb} PK (B) In this execution flow, PI just acts as a true middleman and communicates the message from A to B and vice versa. Thus, when A initiates a session with B, the session is able to be established correctly. Verification Result: ***The Assertion (Protocol_AB() reaches goal) is VALID.*** Execution: ***init -> IniRunning_AB -> ca > InterceptChanA -> ca > ResRunning_AB -> ca > InterceptChanA -> ca > IniCommit_AB -> cb > InterceptChanB -> cb > ResCommit_AB Verification Statistics Visited States:79 Total Transitions:87 Search Depth:13 Time Used: s Estimated Memory Used: KB 22/37

23 DEADLOCK-FREE Since PI() is a never-ending process, the System can never be deadlock free. If the System is deadlock-free, that means that the connection from A to B will ALWAYS be established no matter what. Obviously, this is not true. Moreover, PI() is a neverending process, and will always be deadlocked after connection has been established. After process PIni() and PRes() has terminated with Skip, PI() will be deadlocked, trying to send messages with no one to receive it. Moreover, there are also other simpler cases which lead to a deadlock: PIni PI PRes ca!a.{na.a} PK (B) ca?a.{na.a} PK (B) ca!b.{gd.a} PK (B) ca?b.{gd.a} PK (B) ca?b.{gd.nb} PK (A) ca!b.{gd.nb} PK (A) ca?a.{na.g1} PK (A) Deadlocked! In this example, instead of forwarding A s message to B, I sends generic data to B, leading to B packaging the generic data using A s public key. However, since I is unable to decrypt the message, I can only forward the message back to A. However, A only accepts messages that is packaged with its nonce and not generic data. Thus, I is unable to send any message that A is able to accept. Thus, a deadlock occurs. 23/37

24 Using a Search Depth of 7, we get the following trace that is same as the one presented above. Verification Result: ***The Assertion is NOT valid.*** Counterexample: ***init -> IniRunning_AB -> ca > InterceptChanA -> ca > ResRunning_AB -> ca > InterceptChanA Verification Statistics Visited States:631 Total Transitions:1484 Search Depth:7 Time Used: s Estimated Memory Used: KB However, using an infinite search depth, we get a longer Witness trace but with less visited states. This is due to the Depth-first search that was used. The depth-first search shows the witness for the first dead-lock found but does not guarantee that it has the shallowest depth. To do so, we need a Breadth-first search. Verification Result: ***The Assertion is NOT valid.*** Counterexample: ***init -> IniRunning_AB -> ca > InterceptChanA -> ca > ResRunning_AB -> ca > InterceptChanA -> ca > IniCommit_AB -> cb > InterceptChanB Verification Statistics Visited States:70 Total Transitions:69 Search Depth:11 Time Used: s Estimated Memory Used: KB 24/37

25 4. The Corrected Protocol PAT showed us a trace in which I was able to impersonate A to establish connection with B even though A did not establish any connection with B. To fix the protocol, we follow the idea by (Lowe, 1996) to include the identity of the responder within the encrypted part of the message. Thus, we change the protocol from: to the following: A {Na, A} PK (B) B {Na, Nb, B} PK (A) {Nb} PK (B) This prevents the previous weakness because the intruder cannot successfully replay the message {Na, Nb, B} PK (A) as A is expecting a message containing I s identity. We adapt out PAT representation of this protocol and the intruder. PAT then fails to find any attacks on the protocol. 25/37

26 4.1 Building the Corrected Protocol Model We will highlight the difference between original protocol and the fixed version in terms of modeling. We will NOT highlight the difference in logic as this is a straight-forward transition from the Promela model. PAT: PROMELA: 26/37

27 The only difference in terms of modeling is the Initiator Process, PIni. In the original protocol, we were able to parameterize PIni() in order to take in the party to whom we want to establish a connection with. However, this is not possible in the fixed protocol because we need to block the channel based on the parameter party. This is because, unlike Promela, PAT does not allow blocking channels backed on variables, and only allow channel blocking backed on Constants. Thus, to work around this, we have to code 2 separate processes to handle the channel that deals with party B and party I separately. For the process that deals with party B, we can safely set IniCommit to true since it would have to be true as the channel waits for a message encrypted with party B. 27/37

28 4.2 Analyzing the Corrected Protocol Model LTL PROPERTY #1: Formally, this LTL property basically states that ResRunningAB must come true before IniCommitAB. Informally, we use this property to test whether the protocol correctly authenticates the responder. To do so, we ensure that the initiator A commits to a session with B only if B has indeed taken part in a run of the protocol with A. Similar to the original protocol, the result of the assertion is that the formula is VALID. That is to say, this LTL formula is true in every execution path of the system. In other words, there are no execution paths in the system in which ResRunningAB does NOT come before IniCommitAB. Thus, in all execution traces, the identity of agent B is always properly authenticated. Verification Result: ***The Assertion (Protocol() = [](([]! inicommitab) (! inicommitab U resrunningab))) is VALID.*** Verification Statistics Visited States:2091 Total Transitions:5528 Search Depth:14 Time Used: s Estimated Memory Used: KB 28/37

29 LTL PROPERTY #2: Formally, this property states that IniRunningAB must be true before rescommitab. Informally, we use this property to test whether the protocol correctly authenticates the initiator. To do so, we ensure that the responder B commits to a session with initiator A only if A took part in the protocol run. The result of the assertion is that the formula is VALID. That is to say, this LTL formula is true in every execution path of the system. In other words, there are no execution paths in the system in which IniRunningAB does not come before rescommitab. This is different from the original protocol where a weakness of the protocol is found. In this fixed protocol, even when A tried to establish a session with I, the intruder is unable to impersonate A to establish a false session with B. Thus, in all execution traces, the identity of agent A is always properly authenticated. Verification Result: ***The Assertion (Protocol() = [](([]! rescommitab) (! rescommitab U inirunningab))) is VALID.*** Verification Statistics Visited States:2143 Total Transitions:5872 Search Depth:14 Time Used: s Estimated Memory Used: KB 29/37

30 REACHABILITY TEST #1: This reachability test states that when the A initiates a session with I, then a session between A and B will be established. Obviously, this is not supposed to be true. In the original protocol, this is true due to the weakness in the protocol. However, in the fixed version, the assertion is not true, which verifies that the protocol is correct. Verification Result: ***The Assertion is NOT valid.*** Verification Statistics Visited States:627 Total Transitions:1204 Search Depth:11 Time Used: s Estimated Memory Used: KB 30/37

31 REACHABILITY TEST #2: This reachability test states that when the A initiates a session with B, then a session between A and B will be established. Thus, this has to be true for the protocol to work. Fortunately, this reachability test is reachable. In the original protocol, this also holds true. The witness is as follows: PIni PI PRes ca!a.{na.a} PK (B) ca?a.{na.a} PK (B) ca!b.{na.a} PK (B) ca?b.{na.a} PK (B) ca?b.{na.nb, B} PK (A) ca!b.{na.nb,b} PK (A) ca?a{na.nb, B} PK (A) ca!a.{na.nb, B} PK (A) cb!a.{nb} PK (B) cb?a.{nb} PK (B) cb!b.{nb} PK (B) cb?b.{nb} PK (B) In this execution flow, PI just acts as a true middleman and communicates the message from A to B and vice versa. Thus, when A initiates a session with B, the session is able to be established correctly. Verification Result: ***The Assertion (Protocol_AB() reaches goal) is VALID.*** Execution: ***init -> IniRunning_AB -> ca > InterceptChanA -> ca > ResRunning_AB -> cc > InterceptChanC -> cc > IniCommit_AB -> cb > InterceptChanB -> cb > ResCommit_AB 31/37

32 DEADLOCK-FREE Since PI() is a never-ending process, the System can never be deadlock free. If the System is deadlock-free, that means that the connection from A to B will ALWAYS be established no matter what. Obviously, this is not true. Moreover, PI() is a neverending process, and will always be deadlocked after connection has been established. Similar to the original protocol, a deadlock-free situation can never occur. Thus, this also verifies the model. Verification Result: ***The Assertion is NOT valid.*** Counterexample: ***init -> ca > InterceptChanA -> ca > ResRunning_AB -> cc > InterceptChanC -> cc > cb > InterceptChanB Verification Setting: Method: DFS Reachability Analysis Partial order reduction: True Fairness: Not Applicable System abstraction: False Verification Statistics Visited States:56 Total Transitions:55 Search Depth:9 Time Used: s Estimated Memory Used: KB 32/37

33 5. Bugs Found in PAT While playing with PAT, we also found some bugs in PAT. 5.1 Crash #1 We found a crash while using Process Level Weak Fairness during Verification on the Original Protocol. With the normal code shown above, the verification went fine as seen below: However, as soon as we add another choice [] Skip; - to the PI() process, a crash occurred. This is shown in the screen capture below: 33/37

34 34/37

35 5.2 Crash #2 When closing multiple tables quickly, we obtained the following Crash! 5.3 UI Bug DOES NOT WORK When having multiple tabs open, the scroll bar on top does not work. 35/37

36 6. PAT Suggestions 6.1 User-Interface Suggestions 1. Support for Ctrl Tab to switch between Tabs in a LRU (last recently used) order. This should be similar to the order used by Windows Task Manager when pressing Ctrl-Tab 2. Support for Dragging a File into PAT (like dragging a file into Notepad) 3. Ability to adjust Tool-Tip timing in the Graph generated. This is because sometimes the process is very long and much time is needed to read the Tool-tip when doing a Mouseover over one of the graph nodes. 4. Ability to double-click or something on a Node in the Graph and goto that state so that the Data Store Pane can be updated. Now, in order to update the Data Store Pane, we have to find the Node Number under the Event Trace in order to goto that State and update the Data Pane. However, updating the Data Pane instantly while double clicking on a node would be more user-friendly. 6.2 Functionality Suggestions 1. Ability to generate other counter-examples if an Assertion fail. This allows someone verifying the protocol to see if there are other counter-examples and may help to better find the weaknesses in the system. Currently, PAT only shows the first witness trace. 2. Support for Functions or Macros like that of Promela. This would help to write shorter and cleaner code. 3. Support for Channel Blocking based on variables, similar to Promela. 36/37

37 4. Currently, PAT only supports this Syntax: D = a -> b -> if (.. ) {c -> abc -> abc -> D } else { d-> abc -> abc -> D} However, this leads to redundant code as abc -> abc -> D is being repeated twice. We may refactor abc -> abc -> D into another process, but this might not be natural. Thus, perharps PAT can support a syntax in which it might not end with a process but ultimately will end with a process as like below: D = a -> b -> { if (.. ) {c} else {d} } -> abc -> abc -> D This will lead to cleaner code that allows for better refactoring. 37/37

SPIN. Carla Ferreira.

SPIN. Carla Ferreira. SPIN Carla Ferreira http://www.spinroot.com/spin/man/intro.html Introduction PROMELA (PROcess MEta LAnguage) is the input language of SPIN (Simple Promela Interpreter) Inspired by: C and CSP Describes

More information

Outline More Security Protocols CS 239 Computer Security February 6, 2006

Outline More Security Protocols CS 239 Computer Security February 6, 2006 Outline More Security Protocols CS 239 Computer Security February 6, 2006 Combining key distribution and authentication Verifying security protocols Page 1 Page 2 Combined Key Distribution and Authentication

More information

Outline. More Security Protocols CS 239 Security for System Software April 22, Needham-Schroeder Key Exchange

Outline. More Security Protocols CS 239 Security for System Software April 22, Needham-Schroeder Key Exchange Outline More Security Protocols CS 239 Security for System Software April 22, 2002 Combining key distribution and authentication Verifying security protocols Page 1 Page 2 Combined Key Distribution and

More information

Combined CPV-TLV Security Protocol Verifier

Combined CPV-TLV Security Protocol Verifier Combined CPV-TLV Security Protocol Verifier by Ariel Cohen Thesis submitted in partial fulfillment of the requirements for the degree of Master of Science Department of Computer Science Courant Institute

More information

Outline More Security Protocols CS 239 Computer Security February 4, 2004

Outline More Security Protocols CS 239 Computer Security February 4, 2004 Outline More Security Protocols CS 239 Computer Security February 4, 2004 Combining key distribution and authentication Verifying security protocols Page 1 Page 2 Combined Key Distribution and Authentication

More information

Protocols II. Computer Security Lecture 12. David Aspinall. 17th February School of Informatics University of Edinburgh

Protocols II. Computer Security Lecture 12. David Aspinall. 17th February School of Informatics University of Edinburgh Protocols II Computer Security Lecture 12 David Aspinall School of Informatics University of Edinburgh 17th February 2011 Outline Introduction Shared-key Authentication Asymmetric authentication protocols

More information

Computer Networks & Security 2016/2017

Computer Networks & Security 2016/2017 Computer Networks & Security 2016/2017 Network Security Protocols (10) Dr. Tanir Ozcelebi Courtesy: Jerry den Hartog Courtesy: Kurose and Ross TU/e Computer Science Security and Embedded Networked Systems

More information

Cryptography & Key Exchange Protocols. Faculty of Computer Science & Engineering HCMC University of Technology

Cryptography & Key Exchange Protocols. Faculty of Computer Science & Engineering HCMC University of Technology Cryptography & Key Exchange Protocols Faculty of Computer Science & Engineering HCMC University of Technology Outline 1 Cryptography-related concepts 2 3 4 5 6 7 Key channel for symmetric cryptosystems

More information

Authentication Handshakes

Authentication Handshakes AIT 682: Network and Systems Security Topic 6.2 Authentication Protocols Instructor: Dr. Kun Sun Authentication Handshakes Secure communication almost always includes an initial authentication handshake.

More information

Cryptography and Network Security. Prof. D. Mukhopadhyay. Department of Computer Science and Engineering. Indian Institute of Technology, Kharagpur

Cryptography and Network Security. Prof. D. Mukhopadhyay. Department of Computer Science and Engineering. Indian Institute of Technology, Kharagpur Cryptography and Network Security Prof. D. Mukhopadhyay Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur Module No. # 01 Lecture No. # 38 A Tutorial on Network Protocols

More information

BAN Logic. Logic of Authentication 1. BAN Logic. Source. The language of BAN. The language of BAN. Protocol 1 (Needham-Schroeder Shared-Key) [NS78]

BAN Logic. Logic of Authentication 1. BAN Logic. Source. The language of BAN. The language of BAN. Protocol 1 (Needham-Schroeder Shared-Key) [NS78] Logic of Authentication 1. BAN Logic Ravi Sandhu BAN Logic BAN is a logic of belief. In an analysis, the protocol is first idealized into messages containing assertions, then assumptions are stated, and

More information

SEMINAR REPORT ON BAN LOGIC

SEMINAR REPORT ON BAN LOGIC SEMINAR REPORT ON BAN LOGIC Submitted by Name : Abhijeet Chatarjee Roll No.: 14IT60R11 SCHOOL OF INFORMATION TECHNOLOGY INDIAN INSTITUTE OF TECHNOLOGY, KHARAGPUR-721302 (INDIA) Abstract: Authentication

More information

Patrick Trentin Formal Methods Lab Class, March 03, 2017

Patrick Trentin  Formal Methods Lab Class, March 03, 2017 Spin: Introduction Patrick Trentin patrick.trentin@unitn.it http://disi.unitn.it/trentin Formal Methods Lab Class, March 03, 2017 These slides are derived from those by Stefano Tonetta, Alberto Griggio,

More information

The SPIN Model Checker

The SPIN Model Checker The SPIN Model Checker Metodi di Verifica del Software Andrea Corradini Lezione 1 2013 Slides liberamente adattate da Logic Model Checking, per gentile concessione di Gerard J. Holzmann http://spinroot.com/spin/doc/course/

More information

CSC 474/574 Information Systems Security

CSC 474/574 Information Systems Security CSC 474/574 Information Systems Security Topic 3.3: Security Handshake Pitfalls CSC 474/574 Dr. Peng Ning 1 Authentication Handshakes Secure communication almost always includes an initial authentication

More information

Security Handshake Pitfalls

Security Handshake Pitfalls Security Handshake Pitfalls 1 Authentication Handshakes Secure communication almost always includes an initial authentication handshake: Authenticate each other Establish sessions keys This process may

More information

CS 395T. Symbolic Constraint Solving

CS 395T. Symbolic Constraint Solving CS 395T Symbolic Constraint Solving Overview Strand space model Protocol analysis with unbounded attacker Parametric strands Symbolic attack traces Protocol analysis via constraint solving SRI constraint

More information

Key Management. Digital signatures: classical and public key Classic and Public Key exchange. Handwritten Signature

Key Management. Digital signatures: classical and public key Classic and Public Key exchange. Handwritten Signature Key Management Digital signatures: classical and public key Classic and Public Key exchange 1 Handwritten Signature Used everyday in a letter, on a check, sign a contract A signature on a signed paper

More information

Session key establishment protocols

Session key establishment protocols our task is to program a computer which gives answers which are subtly and maliciously wrong at the most inconvenient possible moment. -- Ross Anderson and Roger Needham, Programming Satan s computer Session

More information

Session key establishment protocols

Session key establishment protocols our task is to program a computer which gives answers which are subtly and maliciously wrong at the most inconvenient possible moment. -- Ross Anderson and Roger Needham, Programming Satan s computer Session

More information

Chapter 9: Key Management

Chapter 9: Key Management Chapter 9: Key Management Session and Interchange Keys Key Exchange Cryptographic Key Infrastructure Storing and Revoking Keys Digital Signatures Slide #9-1 Overview Key exchange Session vs. interchange

More information

Patrick Trentin Formal Methods Lab Class, Feb 26, 2016

Patrick Trentin  Formal Methods Lab Class, Feb 26, 2016 Spin: Introduction Patrick Trentin patrick.trentin@unitn.it http://disi.unitn.it/~trentin Formal Methods Lab Class, Feb 26, 2016 These slides are derived from those by Stefano Tonetta, Alberto Griggio,

More information

Hello World in HLPSL. Turning ASCII protocol specifications into HLPSL

Hello World in HLPSL. Turning ASCII protocol specifications into HLPSL Hello World in HLPSL Turning ASCII protocol specifications into HLPSL Modeling with HLPSL HLPSL is a higher-level protocol specification language we can transform ASCII protocol specifications into HLPSL

More information

Lecture 1: Course Introduction

Lecture 1: Course Introduction Lecture 1: Course Introduction Thomas Johansson T. Johansson (Lund University) 1 / 37 Chapter 9: Symmetric Key Distribution To understand the problems associated with managing and distributing secret keys.

More information

A Short SPAN+AVISPA Tutorial

A Short SPAN+AVISPA Tutorial A Short SPAN+AVISPA Tutorial Thomas Genet IRISA/Université de Rennes 1 genet@irisa.fr November 6, 2015 Abstract The objective of this short tutorial is to show how to use SPAN to understand and debug HLPSL

More information

6. Security Handshake Pitfalls Contents

6. Security Handshake Pitfalls Contents Contents 1 / 45 6.1 Introduction 6.2 Log-in Only 6.3 Mutual Authentication 6.4 Integrity/Encryption of Data 6.5 Mediated Authentication (with KDC) 6.6 Bellovin-Merrit 6.7 Network Log-in and Password Guessing

More information

Cryptographic Checksums

Cryptographic Checksums Cryptographic Checksums Mathematical function to generate a set of k bits from a set of n bits (where k n). k is smaller then n except in unusual circumstances Example: ASCII parity bit ASCII has 7 bits;

More information

Overview. Symbolic Protocol Analysis. Protocol Analysis Techniques. Obtaining a Finite Model. Decidable Protocol Analysis. Strand Space Model

Overview. Symbolic Protocol Analysis. Protocol Analysis Techniques. Obtaining a Finite Model. Decidable Protocol Analysis. Strand Space Model CS 259 Overview Symbolic Protocol Analysis Vitaly Shmatikov Strand space model Protocol analysis with unbounded attacker Parametric strands Symbolic attack traces Protocol analysis via constraint solving

More information

Distributed Systems Programming (F21DS1) SPIN: Formal Analysis I

Distributed Systems Programming (F21DS1) SPIN: Formal Analysis I Distributed Systems Programming (F21DS1) SPIN: Formal Analysis I Andrew Ireland Department of Computer Science School of Mathematical and Computer Sciences Heriot-Watt University Edinburgh Overview Introduce

More information

Formal Methods for Assuring Security of Computer Networks

Formal Methods for Assuring Security of Computer Networks for Assuring of Computer Networks May 8, 2012 Outline Testing 1 Testing 2 Tools for formal methods Model based software development 3 Principals of security Key security properties Assessing security protocols

More information

Breaking and Fixing the Needham-Schroeder Public-Key Protocol Using FDR

Breaking and Fixing the Needham-Schroeder Public-Key Protocol Using FDR Breaking and Fixing the Needham-Schroeder Public-Key Protocol Using FDR Gavin Lowe* ABSTRACT In this paper we analyse the well known Needham-Schroeder Public-Key Protocol using FDR, a refinement checker

More information

SPIN part 2. Verification with LTL. Jaime Ramos. Departamento de Matemática, Técnico, ULisboa

SPIN part 2. Verification with LTL. Jaime Ramos. Departamento de Matemática, Técnico, ULisboa SPIN part 2 Verification with LTL Jaime Ramos Departamento de Matemática, Técnico, ULisboa Borrowed from slides by David Henriques, Técnico, ULisboa LTL model checking How Spin works Checks non-empty intersection

More information

System Correctness. EEC 421/521: Software Engineering. System Correctness. The Problem at Hand. A system is correct when it meets its requirements

System Correctness. EEC 421/521: Software Engineering. System Correctness. The Problem at Hand. A system is correct when it meets its requirements System Correctness EEC 421/521: Software Engineering A Whirlwind Intro to Software Model Checking A system is correct when it meets its requirements a design without requirements cannot be right or wrong,

More information

L7: Key Distributions. Hui Chen, Ph.D. Dept. of Engineering & Computer Science Virginia State University Petersburg, VA 23806

L7: Key Distributions. Hui Chen, Ph.D. Dept. of Engineering & Computer Science Virginia State University Petersburg, VA 23806 L7: Key Distributions Hui Chen, Ph.D. Dept. of Engineering & Computer Science Virginia State University Petersburg, VA 23806 9/16/2015 CSCI 451 - Fall 2015 1 Acknowledgement Many slides are from or are

More information

Computer Lab 1: Model Checking and Logic Synthesis using Spin (lab)

Computer Lab 1: Model Checking and Logic Synthesis using Spin (lab) Computer Lab 1: Model Checking and Logic Synthesis using Spin (lab) Richard M. Murray Nok Wongpiromsarn Ufuk Topcu Calornia Institute of Technology AFRL, 25 April 2012 Outline Spin model checker: modeling

More information

Homework 2 CS161 Computer Security, Spring 2008 Assigned 2/13/08 Due 2/25/08

Homework 2 CS161 Computer Security, Spring 2008 Assigned 2/13/08 Due 2/25/08 Homework 2 CS161 Computer Security, Spring 2008 Assigned 2/13/08 Due 2/25/08 1. Signatures and Attacks Recall that to use the ElGamal signature scheme, Alice randomly selects her private signing key x

More information

1 Identification protocols

1 Identification protocols ISA 562: Information Security, Theory and Practice Lecture 4 1 Identification protocols Now that we know how to authenticate messages using MACs, a natural question is, how can we use MACs to prove that

More information

Spring 2010: CS419 Computer Security

Spring 2010: CS419 Computer Security Spring 2010: CS419 Computer Security Vinod Ganapathy Lecture 7 Topic: Key exchange protocols Material: Class handout (lecture7_handout.pdf) Chapter 2 in Anderson's book. Today s agenda Key exchange basics

More information

0/41. Alice Who? Authentication Protocols. Andreas Zeller/Stephan Neuhaus. Lehrstuhl Softwaretechnik Universität des Saarlandes, Saarbrücken

0/41. Alice Who? Authentication Protocols. Andreas Zeller/Stephan Neuhaus. Lehrstuhl Softwaretechnik Universität des Saarlandes, Saarbrücken 0/41 Alice Who? Authentication Protocols Andreas Zeller/Stephan Neuhaus Lehrstuhl Softwaretechnik Universität des Saarlandes, Saarbrücken The Menu 1/41 Simple Authentication Protocols The Menu 1/41 Simple

More information

Elements of Security

Elements of Security Elements of Security Dr. Bill Young Department of Computer Sciences University of Texas at Austin Last updated: April 8, 2015 at 12:47 Slideset 7: 1 Car Talk Puzzler You have a friend in a police state

More information

SPIN: Introduction and Examples

SPIN: Introduction and Examples SPIN: Introduction and Examples Alessandra Giordani agiordani@disi.unitn.it http://disi.unitn.it/~agiordani Formal Methods Lab Class, September 28, 2014 *These slides are derived from those by Stefano

More information

Formal Specification and Verification

Formal Specification and Verification Formal Specification and Verification Introduction to Promela Bernhard Beckert Based on a lecture by Wolfgang Ahrendt and Reiner Hähnle at Chalmers University, Göteborg Formal Specification and Verification:

More information

4/6/2011. Model Checking. Encoding test specifications. Model Checking. Encoding test specifications. Model Checking CS 4271

4/6/2011. Model Checking. Encoding test specifications. Model Checking. Encoding test specifications. Model Checking CS 4271 Mel Checking LTL Property System Mel Mel Checking CS 4271 Mel Checking OR Abhik Roychoudhury http://www.comp.nus.edu.sg/~abhik Yes No, with Counter-example trace 2 Recap: Mel Checking for mel-based testing

More information

Security Handshake Pitfalls

Security Handshake Pitfalls Hello Challenge R f(k, R f(k, R Problems: 1. Authentication is not mutual only authenticates Anyone can send the challenge R. f(k, R Problems: 1. Authentication is not mutual only authenticates Anyone

More information

Verifying Security Protocols with Brutus

Verifying Security Protocols with Brutus Verifying Security Protocols with Brutus E.M. CLARKE Carnegie Mellon University S. JHA University of Wisconsin and W. MARRERO DePaul University Due to the rapid growth of the Internet and the World Wide

More information

Logic Model Checking

Logic Model Checking Logic Model Checking Lecture Notes 17:18 Caltech 101b.2 January-March 2005 Course Text: The Spin Model Checker: Primer and Reference Manual Addison-Wesley 2003, ISBN 0-321-22862-6, 608 pgs. checking omega

More information

ECE596C: Handout #9. Authentication Using Shared Secrets. Electrical and Computer Engineering, University of Arizona, Loukas Lazos

ECE596C: Handout #9. Authentication Using Shared Secrets. Electrical and Computer Engineering, University of Arizona, Loukas Lazos ECE596C: Handout #9 Authentication Using Shared Secrets Electrical and Computer Engineering, University of Arizona, Loukas Lazos Abstract. In this lecture we introduce the concept of authentication and

More information

CSE BAN Logic Presentation

CSE BAN Logic Presentation (Mike Burrows Marin Abadi Roger Needham Published 1989 SRC Research Report 9 Presentation by Heather Goldsby Michelle Pirtle "! #! $ % Problem Solution BAN Logic Goals of BAN Terms Symbols Notation and

More information

Outline Key Management CS 239 Computer Security February 9, 2004

Outline Key Management CS 239 Computer Security February 9, 2004 Outline Key Management CS 239 Computer Security February 9, 2004 Properties of keys Key management Key servers Certificates Page 1 Page 2 Introduction Properties of Keys It doesn t matter how strong your

More information

INF672 Protocol Safety and Verification. Karthik Bhargavan Xavier Rival Thomas Clausen

INF672 Protocol Safety and Verification. Karthik Bhargavan Xavier Rival Thomas Clausen INF672 Protocol Safety and Verication Karthik Bhargavan Xavier Rival Thomas Clausen 1 Course Outline Lecture 1 [Today, Sep 15] Introduction, Motivating Examples Lectures 2-4 [Sep 22,29, Oct 6] Network

More information

Security protocols and their verification. Mark Ryan University of Birmingham

Security protocols and their verification. Mark Ryan University of Birmingham Security protocols and their verification Mark Ryan University of Birmingham Contents 1. Authentication protocols (this lecture) 2. Electronic voting protocols 3. Fair exchange protocols 4. Digital cash

More information

Data Communication Prof.A.Pal Dept of Computer Science & Engineering Indian Institute of Technology, Kharagpur Lecture - 40 Secured Communication - II

Data Communication Prof.A.Pal Dept of Computer Science & Engineering Indian Institute of Technology, Kharagpur Lecture - 40 Secured Communication - II Data Communication Prof.A.Pal Dept of Computer Science & Engineering Indian Institute of Technology, Kharagpur Lecture - 40 Secured Communication - II Hello and welcome to today's lecture on secured communication.

More information

Software Engineering using Formal Methods

Software Engineering using Formal Methods Software Engineering using Formal Methods Introduction to Promela Wolfgang Ahrendt 03 September 2015 SEFM: Promela /GU 150903 1 / 36 Towards Model Checking System Model Promela Program byte n = 0; active

More information

C311 Lab #3 Representation Independence: Representation Independent Interpreters

C311 Lab #3 Representation Independence: Representation Independent Interpreters C311 Lab #3 Representation Independence: Representation Independent Interpreters Will Byrd webyrd@indiana.edu February 5, 2005 (based on Professor Friedman s lecture on January 29, 2004) 1 Introduction

More information

CS2 Algorithms and Data Structures Note 10. Depth-First Search and Topological Sorting

CS2 Algorithms and Data Structures Note 10. Depth-First Search and Topological Sorting CS2 Algorithms and Data Structures Note 10 Depth-First Search and Topological Sorting In this lecture, we will analyse the running time of DFS and discuss a few applications. 10.1 A recursive implementation

More information

Applications of Formal Verification

Applications of Formal Verification Applications of Formal Verification Model Checking: Introduction to PROMELA Bernhard Beckert Mattias Ulbrich SS 2017 KIT INSTITUT FÜR THEORETISCHE INFORMATIK KIT University of the State of Baden-Württemberg

More information

MP 6 Modeling in Promela and SPIN

MP 6 Modeling in Promela and SPIN MP 6 Modeling in Promela and SPIN CS 477 Spring 2018 Revision 1.0 Assigned April 23, 2018 Due May 2, 2018, 9:00 PM Extension 48 hours (penalty 20% of total points possible) 1 Change Log 1.0 Initial Release.

More information

Event-B Course. 11. Formal Development of a Security Protocol (the Needham-Schroeder protocol)

Event-B Course. 11. Formal Development of a Security Protocol (the Needham-Schroeder protocol) Event-B Course 11. Formal Development of a Security Protocol (the Needham-Schroeder protocol) Jean-Raymond Abrial September-October-November 2011 Outline 1 - Requirement Document - Refinement Strategy

More information

Formal Methods in Software Engineering. Lecture 07

Formal Methods in Software Engineering. Lecture 07 Formal Methods in Software Engineering Lecture 07 What is Temporal Logic? Objective: We describe temporal aspects of formal methods to model and specify concurrent systems and verify their correctness

More information

A Hierarchy of Authentication Specifications

A Hierarchy of Authentication Specifications A Hierarchy of Autication Specifications Gavin Lowe Department of Mathematics and Computer Science University of Leicester, University Road Leicester, LE1 7RH, UK Email: gavin.lowe@mcs.le.ac.uk Abstract

More information

Software Engineering using Formal Methods

Software Engineering using Formal Methods Software Engineering using Formal Methods Introduction to Promela Wolfgang Ahrendt & Richard Bubel & Reiner Hähnle & Wojciech Mostowski 31 August 2011 SEFM: Promela /GU 110831 1 / 35 Towards Model Checking

More information

Applications of Formal Verification

Applications of Formal Verification Applications of Formal Verification Model Checking: Introduction to PROMELA Prof. Dr. Bernhard Beckert Dr. Vladimir Klebanov SS 2012 KIT INSTITUT FÜR THEORETISCHE INFORMATIK KIT University of the State

More information

Lecture Transcript While and Do While Statements in C++

Lecture Transcript While and Do While Statements in C++ Lecture Transcript While and Do While Statements in C++ Hello and welcome back. In this lecture we are going to look at the while and do...while iteration statements in C++. Here is a quick recap of some

More information

What did we talk about last time? Public key cryptography A little number theory

What did we talk about last time? Public key cryptography A little number theory Week 4 - Friday What did we talk about last time? Public key cryptography A little number theory If p is prime and a is a positive integer not divisible by p, then: a p 1 1 (mod p) Assume a is positive

More information

Automated Reasoning. Model Checking with SPIN (II)

Automated Reasoning. Model Checking with SPIN (II) Automated Reasoning Model Checking with SPIN (II) Alan Bundy page 1 Verifying Global Properties Assertions can be used to verify a property locally For example, place assert(memreturned) at the end of

More information

Lecture Notes on Contracts

Lecture Notes on Contracts Lecture Notes on Contracts 15-122: Principles of Imperative Computation Frank Pfenning Lecture 2 August 30, 2012 1 Introduction For an overview the course goals and the mechanics and schedule of the course,

More information

Verfying the SSH TLP with ProVerif

Verfying the SSH TLP with ProVerif A Demo Alfredo Pironti Riccardo Sisto Politecnico di Torino, Italy {alfredo.pironti,riccardo.sisto}@polito.it CryptoForma Bristol, 7-8 April, 2010 Outline Introduction 1 Introduction 2 3 4 Introduction

More information

Issues. Separation of. Distributed system security. Security services. Security policies. Security mechanism

Issues. Separation of. Distributed system security. Security services. Security policies. Security mechanism Module 9 - Security Issues Separation of Security policies Precise definition of which entities in the system can take what actions Security mechanism Means of enforcing that policy Distributed system

More information

Formal Verification by Model Checking

Formal Verification by Model Checking Formal Verication by Model Checking Jonathan Aldrich Carnegie Mellon University Based on slides developed by Natasha Sharygina 17-654/17-754: Analysis of Software Artacts Spring 2006 1 CTL Model Checking

More information

Module: Cryptographic Protocols. Professor Patrick McDaniel Spring CMPSC443 - Introduction to Computer and Network Security

Module: Cryptographic Protocols. Professor Patrick McDaniel Spring CMPSC443 - Introduction to Computer and Network Security CMPSC443 - Introduction to Computer and Network Security Module: Cryptographic Protocols Professor Patrick McDaniel Spring 2009 1 Key Distribution/Agreement Key Distribution is the process where we assign

More information

Secure Sockets Layer (SSL) / Transport Layer Security (TLS)

Secure Sockets Layer (SSL) / Transport Layer Security (TLS) Secure Sockets Layer (SSL) / Transport Layer Security (TLS) Brad Karp UCL Computer Science CS GZ03 / M030 20 th November 2017 What Problems Do SSL/TLS Solve? Two parties, client and server, not previously

More information

Distributed Systems Programming (F21DS1) SPIN: Formal Analysis II

Distributed Systems Programming (F21DS1) SPIN: Formal Analysis II Distributed Systems Programming (F21DS1) SPIN: Formal Analysis II Andrew Ireland Department of Computer Science School of Mathematical and Computer Sciences Heriot-Watt University Edinburgh Overview Introduce

More information

4.1 Review - the DPLL procedure

4.1 Review - the DPLL procedure Applied Logic Lecture 4: Efficient SAT solving CS 4860 Spring 2009 Thursday, January 29, 2009 The main purpose of these notes is to help me organize the material that I used to teach today s lecture. They

More information

Network Security CHAPTER 31. Solutions to Review Questions and Exercises. Review Questions

Network Security CHAPTER 31. Solutions to Review Questions and Exercises. Review Questions CHAPTER 3 Network Security Solutions to Review Questions and Exercises Review Questions. A nonce is a large random number that is used only once to help distinguish a fresh authentication request from

More information

Applications of Formal Verification

Applications of Formal Verification Applications of Formal Verification Model Checking: Introduction to PROMELA Prof. Dr. Bernhard Beckert Dr. Vladimir Klebanov SS 2010 KIT INSTITUT FÜR THEORETISCHE INFORMATIK KIT University of the State

More information

Promela and SPIN. Mads Dam Dept. Microelectronics and Information Technology Royal Institute of Technology, KTH. Promela and SPIN

Promela and SPIN. Mads Dam Dept. Microelectronics and Information Technology Royal Institute of Technology, KTH. Promela and SPIN Promela and SPIN Mads Dam Dept. Microelectronics and Information Technology Royal Institute of Technology, KTH Promela and SPIN Promela (Protocol Meta Language): Language for modelling discrete, event-driven

More information

Contents Digital Signatures Digital Signature Properties Direct Digital Signatures

Contents Digital Signatures Digital Signature Properties Direct Digital Signatures Contents Digital Signatures... 197 Digital Signature Properties... 198 Direct Digital Signatures... 198 199...قابلداوری Arbitrated Digital Signatures Arbitrated Digital Signature Technaiques... 200 Authentication

More information

CIS 6930/4930 Computer and Network Security. Topic 6.2 Authentication Protocols

CIS 6930/4930 Computer and Network Security. Topic 6.2 Authentication Protocols CIS 6930/4930 Computer and Network Security Topic 6.2 Authentication Protocols 1 Authentication Handshakes Secure communication almost always includes an initial authentication handshake. Authenticate

More information

Design and Analysis of Security Protocols

Design and Analysis of Security Protocols CS 395T Design and Analysis of Security Protocols Vitaly Shmatikov http://www.cs.utexas.edu/~shmat/courses/cs395t_fall04/ Course Logistics Lectures Monday, Wednesday 3:30-5pm Project presentations in the

More information

SPIN, PETERSON AND BAKERY LOCKS

SPIN, PETERSON AND BAKERY LOCKS Concurrent Programs reasoning about their execution proving correctness start by considering execution sequences CS4021/4521 2018 jones@scss.tcd.ie School of Computer Science and Statistics, Trinity College

More information

Working with recursion. From definition to template. Readings: HtDP, sections 11, 12, 13 (Intermezzo 2).

Working with recursion. From definition to template. Readings: HtDP, sections 11, 12, 13 (Intermezzo 2). Working with recursion Readings: HtDP, sections 11, 12, 13 (Intermezzo 2). We can extend the idea of a self-referential definition to defining the natural numbers, which leads to the use of recursion in

More information

Working with recursion

Working with recursion Working with recursion Readings: HtDP, sections 11, 12, 13 (Intermezzo 2). We can extend the idea of a self-referential definition to defining the natural numbers, which leads to the use of recursion in

More information

Multi-Threaded System int x, y, r; int *p, *q, *z; int **a; EEC 421/521: Software Engineering. Thread Interleaving SPIN. Model Checking using SPIN

Multi-Threaded System int x, y, r; int *p, *q, *z; int **a; EEC 421/521: Software Engineering. Thread Interleaving SPIN. Model Checking using SPIN EEC 421/521: Software Engineering Model Checking using SPIN 4/29/08 EEC 421/521: Software Engineering 1 Multi-Threaded System int x, y, r; int *p, *q, *z; int **a; thread_1(void) /* initialize p, q, and

More information

CSE 3461/5461: Introduction to Computer Networking and Internet Technologies. Network Security. Presentation L

CSE 3461/5461: Introduction to Computer Networking and Internet Technologies. Network Security. Presentation L CS 3461/5461: Introduction to Computer Networking and Internet Technologies Network Security Study: 21.1 21.5 Kannan Srinivasan 11-27-2012 Security Attacks, Services and Mechanisms Security Attack: Any

More information

Lecture 1 Contracts : Principles of Imperative Computation (Fall 2018) Frank Pfenning

Lecture 1 Contracts : Principles of Imperative Computation (Fall 2018) Frank Pfenning Lecture 1 Contracts 15-122: Principles of Imperative Computation (Fall 2018) Frank Pfenning In these notes we review contracts, which we use to collectively denote function contracts, loop invariants,

More information

1 Defining Message authentication

1 Defining Message authentication ISA 562: Information Security, Theory and Practice Lecture 3 1 Defining Message authentication 1.1 Defining MAC schemes In the last lecture we saw that, even if our data is encrypted, a clever adversary

More information

Verifying Cache Coherence in ACL2. Ben Selfridge Oracle / UT Austin

Verifying Cache Coherence in ACL2. Ben Selfridge Oracle / UT Austin erifying Cache Coherence in ACL Ben Selfridge Oracle / UT Austin Goals of this talk Define cache coherence Present a cache coherence protocol designed Present an ACL proof that the protocol is safe (whatever

More information

CS 161 Computer Security

CS 161 Computer Security Paxson Spring 2011 CS 161 Computer Security Discussion 9 March 30, 2011 Question 1 Another Use for Hash Functions (8 min) The traditional Unix system for password authentication works more or less like

More information

Using Spin to Help Teach Concurrent Programming

Using Spin to Help Teach Concurrent Programming Using Spin to Help Teach Concurrent Programming John Regehr May 1, 1998 1 Introduction and Motivation Writing correct concurrent programs is very difficult; race conditions, deadlocks, and livelocks can

More information

ICT 6541 Applied Cryptography. Hossen Asiful Mustafa

ICT 6541 Applied Cryptography. Hossen Asiful Mustafa ICT 6541 Applied Cryptography Hossen Asiful Mustafa Basic Communication Alice talking to Bob Alice Bob 2 Eavesdropping Eve listening the conversation Alice Bob 3 Secure Communication Eve listening the

More information

CS Paul Krzyzanowski

CS Paul Krzyzanowski Question 1 Explain why hypervisor rootkits are more difficult to detect than user-mode or kernel-mode rootkits. Computer Security 2018 Exam 2 Review Paul Krzyzanowski Rutgers University Spring 2018 The

More information

Computer Security Exam 2 Review. Paul Krzyzanowski. Rutgers University. Spring 2018

Computer Security Exam 2 Review. Paul Krzyzanowski. Rutgers University. Spring 2018 Computer Security 2018 Exam 2 Review Paul Krzyzanowski Rutgers University Spring 2018 April 16, 2018 CS 419 2018 Paul Krzyzanowski 1 Question 1 Explain why hypervisor rootkits are more difficult to detect

More information

(Refer Slide Time 6:48)

(Refer Slide Time 6:48) Digital Circuits and Systems Prof. S. Srinivasan Department of Electrical Engineering Indian Institute of Technology Madras Lecture - 8 Karnaugh Map Minimization using Maxterms We have been taking about

More information

Description on How to Use the

Description on How to Use the 124 Appendix A Description on How to Use the Athena System In this chapter, we describe how to use the APV, APG, and ACG system. The whole software package can be downloaded from http://www.ece.cmu.edu/

More information

ICT 6541 Applied Cryptography Lecture 8 Entity Authentication/Identification

ICT 6541 Applied Cryptography Lecture 8 Entity Authentication/Identification ICT 6541 Applied Cryptography Lecture 8 Entity Authentication/Identification Hossen Asiful Mustafa Introduction Entity Authentication is a technique designed to let one party prove the identity of another

More information

Overview. Cryptographic key infrastructure Certificates. May 13, 2004 ECS 235 Slide #1. Notation

Overview. Cryptographic key infrastructure Certificates. May 13, 2004 ECS 235 Slide #1. Notation Overview Key exchange Session vs. interchange keys Classical, public key methods Key generation Cryptographic key infrastructure Certificates Key storage Key escrow Key revocation Digital signatures May

More information

Mechanising BAN Kerberos by the Inductive Method

Mechanising BAN Kerberos by the Inductive Method Mechanising BAN Kerberos by the Inductive Method Giampaolo Bella Lawrence C Paulson Computer Laboratory University of Cambridge New Museums Site, Pembroke Street Cambridge CB2 3QG (UK) {gb221,lcp}@cl.cam.ac.uk

More information

Network Protocol Design and Evaluation

Network Protocol Design and Evaluation Network Protocol Design and Evaluation 05 - Validation, Part III Stefan Rührup Summer 2009 Overview In the first parts of this chapter: Validation models in Promela Defining and checking correctness claims

More information

Design and Analysis of Distributed Interacting Systems

Design and Analysis of Distributed Interacting Systems Design and Analysis of Distributed Interacting Systems Lecture 5 Linear Temporal Logic (cont.) Prof. Dr. Joel Greenyer May 2, 2013 (Last Time:) LTL Semantics (Informally) LTL Formulae are interpreted on

More information

CS 161 Computer Security

CS 161 Computer Security Wagner Spring 2014 CS 161 Computer Security 1/27 Reasoning About Code Often functions make certain assumptions about their arguments, and it is the caller s responsibility to make sure those assumptions

More information