Presentation is loading. Please wait.

Presentation is loading. Please wait.

Protocols are Programs Too: Using GAs to Evolve Secure Protocols John A Clark Dept. of Computer Science University of York, UK

Similar presentations


Presentation on theme: "Protocols are Programs Too: Using GAs to Evolve Secure Protocols John A Clark Dept. of Computer Science University of York, UK"— Presentation transcript:

1 Protocols are Programs Too: Using GAs to Evolve Secure Protocols John A Clark Dept. of Computer Science University of York, UK jac@cs.york.ac.uk jac@cs.york.ac.uk Seminal Presentation 2.03.00

2 Overview Motivation Introduction to heuristic optimisation techniques Creating security protocols

3 Motivation Search techniques such as simulated annealing and genetic algorithms have proved hugely successful across many domains major success story of computer science They have seen little application to cryptology most work has been concerned with breaking classical permutation and substitution ciphers (easy) very little application to modern day cryptology (hard) I want to attack systematically this lack of interest. Aim to show possibilities at a very high level of abstraction

4 Based on evolution: survival of the fittest. Encode solution to optimisation problem as a gene string. Carry out the following (simple GA approach): take a group of solutions assess their fitness. choose a new population with fitter individuals having more chance of selection. ‘mate’ pairs to produce offspring. allow individuals to mutate. return to first step with offspring as new group. Eventually the strings will converge to a solution. Genetic Algorithms

5 Heuristic Optimisation (Local search via simulated annealing as an example)

6 Local Optimisation - Hill Climbing x0x0 x1x1 x2x2 z(x) Neighbourhood of a point x might be N(x)={x+1,x-1} Hill-climb goes x 0  x 1  x 2 since f(x 0 ) f(x 3 ) and gets stuck at x 2 (local optimum) x opt Really want to obtain x opt x3x3

7 Simulated Annealing x0x0 x1x1 x2x2 z(x) Allows non-improving moves so that it is possible to go down x 11 x4x4 x5x5 x6x6 x7x7 x8x8 x9x9 x 10 x 12 x 13 x in order to rise again to reach global optimum In practice neighbourhood may be very large and trial neighbour is chosen randomly. Possible to accept worsening move when improving ones exist.

8 Simulated Annealing Improving moves always accepted Non-improving moves may be accepted probabilistically and in a manner depending on the temperature parameter T. Loosely the worse the move the less likely it is to be accepted a worsening move is less likely to be accepted the cooler the temperature The temperature T starts high and is gradually cooled as the search progresses. Initially virtually anything is accepted, at the end only improving moves are allowed (and the search effectively reduces to hill-climbing)

9 Simulated Annealing Current candidate x. Minimisation formulation. At each temperature consider 400 moves Always accept improving moves Accept worsening moves probabilistically. Gets harder to do this the worse the move. Gets harder as Temp decreases. Temperature cycle

10 Simulated Annealing Do 400 trial moves

11 The problem is: maximise the function g(x)=x over the integers 0..15 We shall now show how genetic algorithms might find this solution. Let’s choose the obvious binary encoding of the integer solution space: x=0 has encoding 0000 x=5 has encoding 0101 x=15 has encoding 1111 Choose the obvious fitness function, fitness(x)=g(x)=x Genetic Algorithms: Simple Example

12 0100 0011 0011 0010 4 3 3 2 12 a b c d Randomly generate initial population 0011 0100 0100 0011 3 4 4 3 14 a b c d Randomly select 4 of these solutions according to fitness, e.g. b, a, a, c 0011 0100 0100 0011 3 4 4 3 14 a b c d Randomly choose pairs to mate, e.g. (a,b) and (c,d) with random cross-over points and swap right parts of genes 0000 0111 0101 1010 0 7 5 10 22 a b c d Now have radically fitter population, so continue to cycle. 0000 0111 0101 0010 0 7 5 2 14 a b c d Also allow bits to ‘flip’ occasionally, e.g. first bit of d. This allows a 1 to appear in the first column

13 General Iteration We now have our new generation, which is subject to selection, mating and mutation again......until some convergence criterion is met. In practice it’s a bit more sophisticated but the preceding slide gives the gist. Genetic algorithms have been found to be very versatile. One of the most important heuristic techniques of the past 30 years.

14 Making Protocols with Heuristic Optimisation

15 Examples: Secure session key exchange “I am alive” protocols. Various electronic transaction protocols. Probably the highest profile area of academic security research. Problems Rather hard to get right “We cannot even get three-line programs right” Major impetus given to the area by Burrows Abadi and Needham’s belief logic “BAN logic”. Security Protocols

16 Allows the assumptions and goals of a protocol to be stated abstractly in a belief logic. Messages contain beliefs actually held by the sender. Rules govern how receiver may legitimately update his belief state when he receives a message. Protocols are series of messages. At the end of the protocol the belief states of the principals should contain the goals. BAN Logic

17 Basic elements BAN Logic K is a good key for communicating between P and Q Np is a well-typed ‘nonce’, a number to be used only once in the current protocol run, e.g. a randomly generated number useds as a challenge. Np is ‘fresh’ #, meaning that it really is a valid ‘nonce’ P,Q stand for arbitrary protocol principals

18 BAN Logic P believes X. The general idea is that principals should only issue statements they actually believe. Thus, P might have believed that the number Na was fresh yesterday and said so, but it would be wrong to conclude that he believes it now. If the message is recent (see later) then we might conclude he believes it. P once said X, i.e. has issued a message containing X at some point P has jurisdiction over X. This captures the notion that P is an authority about the statement X. If you believe P believes X and you trust him on the matter, then you should believe X too (see later)

19 BAN Logic - Assumptions and Goals A and S share common belief in the goodness of the key Kas and so they can use it to communicate. S also believes that the key Kab is a good session key for A and B. A has a number Na that he also believes is fresh and believes that S is the authority on statements about the goodness of key Kab. The goal of the protocol is to get A to believe the key Kab is good for communication with B

20 BAN Logic –Message Meaning Rule then P should believe that Q once uttered or ‘once said’ X. If P sees X encrypted using key K and P believes that key K is shared securely only with principal Q

21 BAN Logic –Nonce Verification Rule then P should believe that Q currently believes X and P believes that X is ‘fresh’ This rule promotes ‘once saids’ to actual beliefs If P believes that Q once said X

22 BAN Logic – Jurisdiction Rule then P should believe X too If P believes that Q has jurisdiction over X and P believes Q believes X Jurisdiction captures the notion of being an authority. A typical use would be to give a key server authority over statements of belief about keys. If I believe that a key is good and you reckon I am an authority on such matters then you should believe the key is good too

23 Messages as Integer Sequences senderBelief_1 4 3 2 1 0 receiverBelief_2 2181912 0=21 mod 33=8 mod 51=19 mod 32=12 mod 5 PQ Say 3 principals P, Q and S P=0, Q=1,S=2 Message components are beliefs in the sender’s current belief state (and so if P has 5 beliefs integers are interpreted modulo 5)

24 Search Strategy We can now interpret sequences of integers as valid protocols. Interpret each message in turn updating belief states after each message This is the execution of the abstract protocol. Every protocol achieves something! The issue is whether it is something we want! We also have a move strategy for the search, e.g. just randomly change an integer element. This can change the sender,receiver or specific belief of a message (and indeed subsequent ones)

25 Fitness Function We need a fitness function to capture the attainment of goals. Could simply count the number of goals attained at the end of the protocol In practice this is awful. A protocol that achieves a goal after 6 messages would be ‘good as’ one that achieved a goal after 1 message. Much better to reward the early attainment of goals in some way Have investigated a variety of strategies.

26 Fitness Functions is given by One strategy (uniform credit) would be to make all the weights the same. Note that credit is cumulative. A goal achieved after the first message is also achieved after the second and third and so on.

27 Examples One of the assumptions made was that B would take S’s word on whether A |~Na

28 Examples

29 General Observations Able to generate protocols whose abstract executions are proofs of their own correctness Have done so for protocols requiring up to 9 messages to achieve the required goals. Other methods for protocol synthesis is search via model checking. Exhaustive but limited to short protocols. Limited by the power of the logic used. Can generalise notion of fitness function to include aspects other than correctness (e.g. amount of encryption).

30 General Observations In a sense there is a notion of progress implicit in the idea of a protocol. Gradually a protocol moves towards its eventual goals. Seems sensible to adopt a guided search rather than an enumerative type search Nothing to stop you using model checking as an analysis technique after generating examples using guided search. Generally capable of generating example protocols in under a minute (1.8 GHz PC) Real need to increase power of the logic. Believe that this is the most abstract application of heuristic search in cryptology.

31 Conclusions A highly novel application. Well received: Paper accepted to IEEE Symposium on Security and Privacy 2000. Journal paper in preparation. Extensible. Very easy to incorporate additional criteria. Shows that in a subject that is right at the heart of formal methods research heuristic search can make a real contribution.


Download ppt "Protocols are Programs Too: Using GAs to Evolve Secure Protocols John A Clark Dept. of Computer Science University of York, UK"

Similar presentations


Ads by Google