Presentation is loading. Please wait.

Presentation is loading. Please wait.

Genetics in EACirc DESCRIPTION OF THE COMPONENTS BASED ON EVOLUTION.

Similar presentations


Presentation on theme: "Genetics in EACirc DESCRIPTION OF THE COMPONENTS BASED ON EVOLUTION."— Presentation transcript:

1 Genetics in EACirc DESCRIPTION OF THE COMPONENTS BASED ON EVOLUTION

2 The overall picture o Circuit o The circuit is modified in an evolutionary way o Each circuit is evaluated how well it distinguishes true random data from tested data o The aim is to find such a circuit that is a good distinguisher EvaluateEvolve

3 Evaluation of a circuit (1) o Use the circuit to compute results for Test Vectors (TV) o TV = reference (true random) + test data (crypto output) o Number: 1 000x (frequently used) – 100 000x (optimal) TVs o Configurable in config file o Length (input): size of block of output (typically 16 bytes) o Configurable in config file o Length (output): 1 (typically used) – 4 bytes o Configurable in config file

4 Evaluation of a circuit (2) o Compute the results for all test vectors o Do it twice: true random data & tested data o You get a number (1 000x – 100 000x) of results (1-4 bytes) o Organize the results into categories o Make some resulting values equivalent o Calculate histogram o Evaluate whether the two histograms (random vs. tested) have the same distribution o Final result is a single P-value (float) which is our fitness

5 Circuit evaluation The result of the circuit evaluation if a single value in the form of a P-value or fitness (1 - P-value). 1000 TVs (True Random) 1000 results Histogram: 1000 TVs (Tested Data) 1000 results Histogram: Similar distribution? P-value

6 Circuit evolution (high level view) o The aim is to get such a circuit that is able to distinguish true random data from tested data o The smaller P-value the better o Circuit evolution o Set – perform a number of evolution steps o Typically 100 steps (configurable in config file) o For each set a new sequence of TVs is generated o After each set remember the P-value (tested with the new TVs) o After a number of generations analyze uniformity of p-values by a KS test o Generations: 30 000x – 300 000x (configurable in config file) o KS test – test if P-values are uniformly distributed o If KS < 0.01 then the distinguisher WORKS! (and we are happy)

7 Circuit evolution (high level view) 1 st Set 2 nd Set P-value 0 1 KS Total number of generations

8 Circuit description First layer Last layer Intermediate layers Input data (test vectors) Output data (results)

9 Circuit dimensions and arity of nodes o Width of a layer: typically 8 (configurable in config file) o Width of the last layer: typically 1 (must be between 1-4) o Total number of layers: typically 5 (configurable in config file) o Arity of nodes (we talk about node inputs here) o First layer: any number & any localization o Intermediate layers: maximum of 4 inputs (config file) & locality restriction o Last layer: any number & any localization

10 Nodes Inputs (each 1 byte long) Function + argument Output (1 byte long)

11 Node types o NOP o CONS: constant o AND o NAND: AND then NEGATION o OR o NOR: OR then NEGATION o NOT o SHIL: left shift o SHIR: right shift o ROTL: left rotation o ROTR: right rotation o EQ: equals o LT: less than o GT: greater then o LEQ: less or equal o GEQ: greater or equal o BSLC: bit selector o READ: read directly input (of circuit, not node) o JVM sim

12 Node mutation o Probability of mutation of a node o for each node do the following mutation with the probability of 0.05 (config file): 1.Add or remove a connection (within connection restrictions) 2.Change the node function (within restrictions in config file) 3.Change the node argument (no matter if function is using arg) o Result of the mutation is a valid individual

13 Crossover o Input: 2 circuits (chosen by a selection strategy) o Output: 1 or 2 circuits as a combination of the input circuits o Two types of crossover supported: o Horizontal (not used) o Vertical (typically used) o Nodes carry their connectors through the crossover

14 Circuit crossover - vertical

15 Circuit initialization o First layer o Connections: link each node with an input o Functions: XOR (+ random argument) o Intermediate layers o Connections: 0-4 (random, within the locality restrictions) o Functions and arguments: random o Last layer o Connections: 0-all (random) o Functions and arguments: random

16 Evolution o Currently used typical parameters o Population: 1 o Replacement size: 1 o Probability of crossover: 0 o Probability of mutation: 0.05 o The same for connections, functions and arguments

17 Genetics

18 Parent selection o Roulette selection strategy (typically used) o Take the candidates and spread them in the 0-1 interval o The better fitness of the candidate the larger section of the interval it occupies (not linear scale!) o Generate a random float from 0-1 interval o The candidate occupying the section with the random float wins

19 Replacement

20 EACirc


Download ppt "Genetics in EACirc DESCRIPTION OF THE COMPONENTS BASED ON EVOLUTION."

Similar presentations


Ads by Google