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

Slides:



Advertisements
Similar presentations
Tuesday, May 14 Genetic Algorithms Handouts: Lecture Notes Question: when should there be an additional review session?
Advertisements

CPSC 322, Lecture 16Slide 1 Stochastic Local Search Variants Computer Science cpsc322, Lecture 16 (Textbook Chpt 4.8) February, 9, 2009.
Modelling and Analysing of Security Protocol: Lecture 3 Protocol Goals Tom Chothia CWI.
Genetic Algorithms1 COMP305. Part II. Genetic Algorithms.
1 Lecture 8: Genetic Algorithms Contents : Miming nature The steps of the algorithm –Coosing parents –Reproduction –Mutation Deeper in GA –Stochastic Universal.
Estimation of Distribution Algorithms Ata Kaban School of Computer Science The University of Birmingham.
COMP305. Part II. Genetic Algorithms. Genetic Algorithms.
Two-Stage Optimisation in the Design of Boolean Functions John A Clark and Jeremy L Jacob Dept. of Computer Science University of York, UK
Optimization via Search CPSC 315 – Programming Studio Spring 2009 Project 2, Lecture 4 Adapted from slides of Yoonsuck Choe.
A new crossover technique in Genetic Programming Janet Clegg Intelligent Systems Group Electronics Department.
Exploiting the Search Process John A Clark Dept. of Computer Science University of York, UK
Heuristic Optimisation in Design and Analysis John A Clark University of York, UK
MAE 552 – Heuristic Optimization
1 Protocols are programs too The meta-heuristic search for security protocols By John A. Clark.
Intro to AI Genetic Algorithm Ruth Bergman Fall 2002.
Fault Injection and a Timing Channel on an Analysis Technique John A Clark and Jeremy L Jacob Dept. of Computer Science University of York, UK
The Evolution of Protocol Security and Insecurity John A Clark Dept. of Computer Science University of York, UK Canterbury.
7/2/2015Intelligent Systems and Soft Computing1 Lecture 9 Evolutionary Computation: Genetic algorithms Introduction, or can evolution be intelligent? Introduction,
Intro to AI Genetic Algorithm Ruth Bergman Fall 2004.
Information Security of Embedded Systems : BAN-Logic Prof. Dr. Holger Schlingloff Institut für Informatik und Fraunhofer FIRST.
Making and Breaking Security Protocols with Heuristic Optimisation John A Clark Dept. of Computer Science University of York, UK
Problem Warping and Computational Dynamics in the Solution of NP-hard Problems John A Clark Dept. of Computer Science University of York, UK
Introduction to Simulated Annealing 22c:145 Simulated Annealing  Motivated by the physical annealing process  Material is heated and slowly cooled.
Optimization via Search CPSC 315 – Programming Studio Spring 2008 Project 2, Lecture 4 Adapted from slides of Yoonsuck Choe.
Elements of the Heuristic Approach
Optimization of thermal processes2007/2008 Optimization of thermal processes Maciej Marek Czestochowa University of Technology Institute of Thermal Machinery.
Genetic Algorithm.
Genetic Algorithms and Ant Colony Optimisation
Evolutionary Intelligence
© Negnevitsky, Pearson Education, CSC 4510 – Machine Learning Dr. Mary-Angela Papalaskari Department of Computing Sciences Villanova University.
Genetic Algorithms CS121 Spring 2009 Richard Frankel Stanford University 1.
Slides are based on Negnevitsky, Pearson Education, Lecture 12 Hybrid intelligent systems: Evolutionary neural networks and fuzzy evolutionary systems.
SOFT COMPUTING (Optimization Techniques using GA) Dr. N.Uma Maheswari Professor/CSE PSNA CET.
Optimization in Engineering Design Georgia Institute of Technology Systems Realization Laboratory Mixed Integer Problems Most optimization algorithms deal.
Formal Analysis of Security Protocols Dr. Changyu Dong
BAN LOGIC Amit Chetal Monica Desai November 14, 2001
Genetic algorithms Charles Darwin "A man who dares to waste an hour of life has not discovered the value of life"
Dr.Abeer Mahmoud ARTIFICIAL INTELLIGENCE (CS 461D) Dr. Abeer Mahmoud Computer science Department Princess Nora University Faculty of Computer & Information.
1 Simulated Annealing Contents 1. Basic Concepts 2. Algorithm 3. Practical considerations.
PSO and ASO Variants/Hybrids/Example Applications & Results Lecture 12 of Biologically Inspired Computing Purpose: Not just to show variants/etc … for.
Applying Genetic Algorithm to the Knapsack Problem Qi Su ECE 539 Spring 2001 Course Project.
Week 10Complexity of Algorithms1 Hard Computational Problems Some computational problems are hard Despite a numerous attempts we do not know any efficient.
Computational Complexity Jang, HaYoung BioIntelligence Lab.
Chapter 4.1 Beyond “Classic” Search. What were the pieces necessary for “classic” search.
EE459 I ntroduction to Artificial I ntelligence Genetic Algorithms Kasin Prakobwaitayakit Department of Electrical Engineering Chiangmai University.
© Negnevitsky, Pearson Education, Lecture 9 Evolutionary Computation: Genetic algorithms Introduction, or can evolution be intelligent? Introduction,
2005MEE Software Engineering Lecture 11 – Optimisation Techniques.
 Negnevitsky, Pearson Education, Lecture 9 Evolutionary Computation: Genetic algorithms n Introduction, or can evolution be intelligent? n Simulation.
Evolution Programs (insert catchy subtitle here).
Single-solution based metaheuristics. Outline Local Search Simulated annealing Tabu search …
1 Genetic Algorithms K.Ganesh Introduction GAs and Simulated Annealing The Biology of Genetics The Logic of Genetic Programmes Demo Summary.
Genetic Algorithms CSCI-2300 Introduction to Algorithms
Genetic Algorithms. 2 Overview Introduction To Genetic Algorithms (GAs) GA Operators and Parameters Genetic Algorithms To Solve The Traveling Salesman.
MAE 552 Heuristic Optimization Instructor: John Eddy Lecture #12 2/20/02 Evolutionary Algorithms.
D Nagesh Kumar, IIScOptimization Methods: M8L5 1 Advanced Topics in Optimization Evolutionary Algorithms for Optimization and Search.
Genetic Algorithm Dr. Md. Al-amin Bhuiyan Professor, Dept. of CSE Jahangirnagar University.
Agenda  INTRODUCTION  GENETIC ALGORITHMS  GENETIC ALGORITHMS FOR EXPLORING QUERY SPACE  SYSTEM ARCHITECTURE  THE EFFECT OF DIFFERENT MUTATION RATES.
Artificial Intelligence By Mr. Ejaz CIIT Sahiwal Evolutionary Computation.
1 Comparative Study of two Genetic Algorithms Based Task Allocation Models in Distributed Computing System Oğuzhan TAŞ 2005.
Genetic Algorithms An Evolutionary Approach to Problem Solving.
 Negnevitsky, Pearson Education, Lecture 12 Hybrid intelligent systems: Evolutionary neural networks and fuzzy evolutionary systems n Introduction.
Genetic Algorithms.
Artificial Intelligence (CS 370D)
Chapter 4 Beyond Classical Search
Subject Name: Operation Research Subject Code: 10CS661 Prepared By:Mrs
Example: Applying EC to the TSP Problem
School of Computer Science & Engineering
Searching for solutions: Genetic Algorithms
Population Methods.
Presentation transcript:

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

Overview Motivation Introduction to heuristic optimisation techniques Creating security protocols

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

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

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

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

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.

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)

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

Simulated Annealing Do 400 trial moves

The problem is: maximise the function g(x)=x over the integers 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

a b c d Randomly generate initial population a b c d Randomly select 4 of these solutions according to fitness, e.g. b, a, a, c 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 a b c d Now have radically fitter population, so continue to cycle 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

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.

Making Protocols with Heuristic Optimisation

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

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

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

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)

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

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

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

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

Messages as Integer Sequences senderBelief_ receiverBelief_ =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)

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)

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.

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.

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

Examples

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).

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.

Conclusions A highly novel application. Well received: Paper accepted to IEEE Symposium on Security and Privacy 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.