This document summarizes a formal analysis of the TESLA authentication protocol using the Timed OTS/CafeOBJ method. It provides an overview of the modeling and verification process, including:
1) Modeling the protocol, messages, and network as a timed observational transition system (TOTS) in the CafeOBJ algebraic specification language.
2) Formally specifying security properties to verify, such as an invariant that the receiver only accepts authentic messages from the actual sender.
3) Outlining the verification procedure using induction, lemmas, and proof scores executed with the CafeOBJ system.
Clojure is a Lisp dialect designed for the Java Virtual Machine that focuses on functional programming and concurrency. It allows easy interoperability with Java code and provides persistent data structures and software transactional memory for writing concurrent programs that avoid deadlocks. The document provides an overview of Clojure's syntax, data structures, higher-order functions, Java interoperability features, and approach to concurrency through immutable objects and managed references.
MODEL OF A PROGRAM AS MULTITHREADED STOCHASTIC AUTOMATON AND ITS EQUIVALENT T...Sergey Staroletov
?
The document discusses modeling a program as a multi-threaded stochastic automaton and its equivalent transformation to a PROMELA model. It describes representing the program states, transitions, and operations as a mathematical abstraction called a finite automaton. The model can be extended to include additional features like events, messaging, threading and resource blocking to more accurately model modern software systems at a low level of abstraction. The model and its object-oriented implementation in Java are presented, along with the ability to describe it as an XML file for graphical representation and code generation. Abstract state machines are also briefly discussed as another formal modeling technique.
Highly Scalable Java Programming for Multi-Core SystemJames Gan
?
This document discusses best practices for highly scalable Java programming on multi-core systems. It begins by outlining software challenges like parallelism, memory management, and storage management. It then introduces profiling tools like the Java Lock Monitor (JLM) and Multi-core SDK (MSDK) to analyze parallel applications. The document provides techniques like reducing lock scope and granularity, using lock stripping and striping, splitting hot points, and alternatives to exclusive locks. It also recommends reducing memory allocation and using immutable/thread local data. The document concludes by discussing lock-free programming and its advantages for scalability over locking.
This document discusses different approaches to implementing scope rules in programming languages. It begins by defining lexical/static scope and dynamic scope. It then discusses how block structure and nested procedures can be implemented using stacks and access links. Specifically, it describes how storage is allocated for local and non-local variables under lexical and dynamic scope models. The key implementation techniques discussed are stacks, access links, displays, deep access, and shallow access.
Improvement of Search Algorithm for Integral Distinguisher in Subblock-Based ...ijcisjournal
?
Integral distinguisher is the main factor of integral attack. Conventionally, higher order integral distinguisher is obtained as an extension of first order integral (conventional algorithm). The algorithm was applied to many subblock-based block ciphers, however, the conventional algorithm has some problems. We find other integral distinguisher of two sub block-based block ciphers, TWINE and LBlock, which are different from the conventional evaluations. As a solution, we propose a new algorithm to search for higher order integral distinguisher. The point of a proposal algorithm is exploitation of bijective and injective components of cipher functions. Applying the proposal algorithm to TWINE and LBlock, we confirm the results of the proposal algorithm are consistent with the results which are calculated from computer experiment. The results are the optimal distinguisher and the most advantageous one for the attackers. Our proposal algorithm contributes to development of stronger block ciphers by obtaining such integral distinguisher.
Recurrent neural networks (RNNs) and long short-term memory (LSTM) networks can be used for sequence modeling tasks like predicting the next word. RNNs apply the same function to each element of a sequence but struggle with long-term dependencies. LSTMs address this with a gated cell that can maintain information over many time steps by optionally adding, removing, or updating cell state. LSTMs are better for tasks like language modeling since they can remember inputs from much earlier in the sequence. RNNs and LSTMs have applications in areas like music generation, machine translation, and predictive modeling.
The document outlines different sorting algorithms including selection sort, bubble sort, insertion sort, shell sort, merge sort, and quicksort. It discusses how to use the standard sorting methods in Java's API and provides pseudocode and examples of implementing selection sort, bubble sort, insertion sort, and merge sort. It analyzes the time complexity of these algorithms and discusses which are best for small, medium, and large arrays.
Aaa ped-23-Artificial Neural Network: Keras and TensorfowAminaRepo
?
We will focus in this part on two important libraries for ANN: Tensorflow and Keras. Both of them propose two types of model creation. We will use the high level API of tenshorflow, and the sequential models of Keras.
We will introduce you to some basic important concept related to tensorflow, and we will present you tensorboard. The later one is used to visualize, among other things, quantitative values related to a training process.
[Notebook](https://colab.research.google.com/drive/13KlhoNvYmeRZTZ-TLKAtW3rOkFzQVGYC)
Aaa ped-22-Artificial Neural Network: Introduction to ANNAminaRepo
?
Finally we will talk about Artificial Neural Networks (ANN) . In this part we will focus on the building blocks of ANN's. We will describe the perceptron and its learning rules. We will talk in more details about the gradient descent algorithm.
We will also define an important concept in ANN which is : the back-propagation algorithm. For our examples we will use two libraries: neurolab and scikit-learn libraries.
[Notebook](https://colab.research.google.com/drive/1CqYwu9NzeXuUNeR8RmkDplUd71DHWNod)
RNN & LSTM: Neural Network for Sequential DataYao-Chieh Hu
?
Recurrent neural networks (RNNs) and long short-term memory (LSTM) networks can process sequential data like text and time series data. RNNs have memory and can perform the same task for every element in a sequence, but struggle with long-term dependencies. LSTMs address this issue using memory cells and gates that allow them to learn long-term dependencies. LSTMs have four interacting layers - a forget gate, input gate, cell state, and output gate that allow them to store and access information over long periods of time. RNNs and LSTMs are applied to tasks like language modeling, machine translation, speech recognition, and image caption generation.
The document discusses Java wrapper classes. Wrapper classes wrap primitive data types like int, double, boolean in objects. This allows primitive types to be used like objects. The main wrapper classes are Byte, Short, Integer, Long, Character, Boolean, Double, Float. They provide methods to convert between primitive types and their wrapper objects. Constructors take primitive values or strings to create wrapper objects. Methods like parseInt() convert strings to primitive types.
NS-2 is an open-source discrete event network simulator for networking research. It supports simulation of TCP, routing protocols and other network protocols. NS-2 includes both an OTcl interpreter for setting up simulations and C++ code for implementing network components and protocols. Simulations are run by executing OTcl scripts that create nodes, links, and traffic and schedule events over time.
The document discusses the implementation of various networking protocols and VLAN using the Network Simulator 2 (NS2). It summarizes TCP, UDP, ad-hoc routing protocols like AODV, DSR, DSDV and how they are simulated in NS2. It also discusses how to configure VLANs in NS2 by creating network bridges and attaching Ethernet interfaces to VLAN IDs. The document provides examples of simulating protocols and configuring VLANs to segment traffic between virtual LANs in NS2.
This document provides an introduction to OpenMP, a standard for parallel programming using shared memory. OpenMP uses compiler directives like #pragma omp parallel to create threads that can access shared data. It uses a fork-join model where the master thread creates worker threads to execute blocks of code in parallel. OpenMP supports work sharing constructs like parallel for loops and sections to distribute work among threads, and synchronization constructs like barriers to coordinate thread execution. Variables can be declared as private to each thread or shared among all threads.
The document discusses various topics related to processes and threads including thread usage in nondistributed systems, multithreaded server models, the X-Window system, client-side software for distribution transparency, object adapters, code migration in heterogeneous systems, and software agents in distributed systems. It provides details on thread implementation, reasons for migrating code, models for code migration, and agent communication languages. Key concepts covered include context switching, multithreaded servers, binding of clients to servers, object registration and activation policies, maintaining a migration stack, and FIPA ACL message types and examples.
The document discusses two main ways for a thread to know when another thread has finished:
1. Calling isAlive() on the thread, which returns true if the thread is still running and false if not.
2. Using join(), which waits for the specified thread to terminate before continuing. Additional forms of join() allow specifying a maximum wait time.
The example code starts three threads and uses join() in the main thread to wait for the child threads to finish before exiting, ensuring the main thread finishes last. Without join(), the main thread could exit before the child threads.
This document provides an overview of LINQ (Language Integrated Query) in 3 sentences or less:
LINQ allows querying over local collections and data sources by using language integrated query syntax or methods like Where, Select, and OrderBy. It relies on concepts like generics, delegates, lambda expressions, and extension methods to define query behaviors in a clean, readable way. Mastering LINQ requires understanding how these underlying concepts work and fit together to enable powerful querying capabilities.
This third part of Linux internals talks about Thread programming and using various synchronization mechanisms like mutex and semaphores. These constructs helps users to write efficient programs in Linux environment
The document discusses process synchronization and deadlocks. It introduces race conditions, critical sections, and solutions to synchronize processes like semaphores. Classical problems like the dining philosophers problem and bridge crossing example are presented. Deadlocks are characterized by conditions like mutual exclusion, hold and wait, no preemption and circular wait. Methods to handle deadlocks include prevention through ordering of resource requests and avoidance using resource allocation states.
Unit 5-hive data types ¨C primitive and complex datavishal choudhary
?
Hive supports primitive and complex data types. Primitive types include numeric (integral like INT and FLOAT), string, date/time, and boolean. Complex types include arrays, maps, structs, and unions. The document provides details on each data type, including size, range of values, and examples. It also covers NULL handling and built-in operators in Hive.
The document outlines an advanced Python course covering various Python concepts like object orientation, comprehensions, extended arguments, closures, decorators, generators, context managers, classmethods, inheritance, encapsulation, operator overloading, and Python packages. The course agenda includes how everything in Python is an object, comprehension syntax, *args and **kwargs, closures and decorators, generators and iterators, context managers, staticmethods and classmethods, inheritance and encapsulation, operator overloading, and Python package layout.
NS2 - the network simulator which is proved useful in studying the dynamic nature of communication networks. Simulation of wired as well as wireless network functions and protocols( e.g. routing algorithms, TCP, UDP ) can be done using NS2
This document summarizes an F# talk about information rich programming using F# type providers. The talk introduces F#, demonstrates how type providers allow programming against web-scale data sources with strong typing and IntelliSense, and shows a demo integrating multiple data sources. It concludes by discussing how F# is well-suited for cloud programming and how the language may develop computation expressions for cloud services.
Stream analysis with kafka native way and considerations about monitoring as ...Andrew Yongjoon Kong
?
The document discusses stream analysis with Kafka and considerations for monitoring as a service. It provides background on the speaker including their roles in government, academia, and industry related to big data. It then covers some key concepts in stream processing versus batch processing and examples of popular stream processors like Apache Flume, Storm, Spark, and Samza. The document also discusses real-time analytics and defines the term. It introduces the Kafka Streams library and provides sample code for simple pipelines and wordcount analytics. Finally, it briefly mentions the KSQL query language for Kafka.
The document discusses recurrent neural networks (RNNs) and long short-term memory (LSTM) networks. It provides details on the architecture of RNNs including forward and back propagation. LSTMs are described as a type of RNN that can learn long-term dependencies using forget, input and output gates to control the cell state. Examples of applications for RNNs and LSTMs include language modeling, machine translation, speech recognition, and generating image descriptions.
Dynamic time warping and PIC 16F676 for control of devicesRoger Gomes
?
A presentation done as a part of the final year project during Semester 8 in the under-graduate degree course in engineering.
This presentation explains one of the modules of the project "Speaker and Speech Recognition based Embedded System Design for User Authentication and remote Device Control" which is the Speech Recognition Module.
It effectively explains the Dynamic Time Warping Algorithm used for Speech Recognition and how that is further used along with PIC 16F676 Microcontroller to acquire control of remote devices connected to the system.
Aaa ped-22-Artificial Neural Network: Introduction to ANNAminaRepo
?
Finally we will talk about Artificial Neural Networks (ANN) . In this part we will focus on the building blocks of ANN's. We will describe the perceptron and its learning rules. We will talk in more details about the gradient descent algorithm.
We will also define an important concept in ANN which is : the back-propagation algorithm. For our examples we will use two libraries: neurolab and scikit-learn libraries.
[Notebook](https://colab.research.google.com/drive/1CqYwu9NzeXuUNeR8RmkDplUd71DHWNod)
RNN & LSTM: Neural Network for Sequential DataYao-Chieh Hu
?
Recurrent neural networks (RNNs) and long short-term memory (LSTM) networks can process sequential data like text and time series data. RNNs have memory and can perform the same task for every element in a sequence, but struggle with long-term dependencies. LSTMs address this issue using memory cells and gates that allow them to learn long-term dependencies. LSTMs have four interacting layers - a forget gate, input gate, cell state, and output gate that allow them to store and access information over long periods of time. RNNs and LSTMs are applied to tasks like language modeling, machine translation, speech recognition, and image caption generation.
The document discusses Java wrapper classes. Wrapper classes wrap primitive data types like int, double, boolean in objects. This allows primitive types to be used like objects. The main wrapper classes are Byte, Short, Integer, Long, Character, Boolean, Double, Float. They provide methods to convert between primitive types and their wrapper objects. Constructors take primitive values or strings to create wrapper objects. Methods like parseInt() convert strings to primitive types.
NS-2 is an open-source discrete event network simulator for networking research. It supports simulation of TCP, routing protocols and other network protocols. NS-2 includes both an OTcl interpreter for setting up simulations and C++ code for implementing network components and protocols. Simulations are run by executing OTcl scripts that create nodes, links, and traffic and schedule events over time.
The document discusses the implementation of various networking protocols and VLAN using the Network Simulator 2 (NS2). It summarizes TCP, UDP, ad-hoc routing protocols like AODV, DSR, DSDV and how they are simulated in NS2. It also discusses how to configure VLANs in NS2 by creating network bridges and attaching Ethernet interfaces to VLAN IDs. The document provides examples of simulating protocols and configuring VLANs to segment traffic between virtual LANs in NS2.
This document provides an introduction to OpenMP, a standard for parallel programming using shared memory. OpenMP uses compiler directives like #pragma omp parallel to create threads that can access shared data. It uses a fork-join model where the master thread creates worker threads to execute blocks of code in parallel. OpenMP supports work sharing constructs like parallel for loops and sections to distribute work among threads, and synchronization constructs like barriers to coordinate thread execution. Variables can be declared as private to each thread or shared among all threads.
The document discusses various topics related to processes and threads including thread usage in nondistributed systems, multithreaded server models, the X-Window system, client-side software for distribution transparency, object adapters, code migration in heterogeneous systems, and software agents in distributed systems. It provides details on thread implementation, reasons for migrating code, models for code migration, and agent communication languages. Key concepts covered include context switching, multithreaded servers, binding of clients to servers, object registration and activation policies, maintaining a migration stack, and FIPA ACL message types and examples.
The document discusses two main ways for a thread to know when another thread has finished:
1. Calling isAlive() on the thread, which returns true if the thread is still running and false if not.
2. Using join(), which waits for the specified thread to terminate before continuing. Additional forms of join() allow specifying a maximum wait time.
The example code starts three threads and uses join() in the main thread to wait for the child threads to finish before exiting, ensuring the main thread finishes last. Without join(), the main thread could exit before the child threads.
This document provides an overview of LINQ (Language Integrated Query) in 3 sentences or less:
LINQ allows querying over local collections and data sources by using language integrated query syntax or methods like Where, Select, and OrderBy. It relies on concepts like generics, delegates, lambda expressions, and extension methods to define query behaviors in a clean, readable way. Mastering LINQ requires understanding how these underlying concepts work and fit together to enable powerful querying capabilities.
This third part of Linux internals talks about Thread programming and using various synchronization mechanisms like mutex and semaphores. These constructs helps users to write efficient programs in Linux environment
The document discusses process synchronization and deadlocks. It introduces race conditions, critical sections, and solutions to synchronize processes like semaphores. Classical problems like the dining philosophers problem and bridge crossing example are presented. Deadlocks are characterized by conditions like mutual exclusion, hold and wait, no preemption and circular wait. Methods to handle deadlocks include prevention through ordering of resource requests and avoidance using resource allocation states.
Unit 5-hive data types ¨C primitive and complex datavishal choudhary
?
Hive supports primitive and complex data types. Primitive types include numeric (integral like INT and FLOAT), string, date/time, and boolean. Complex types include arrays, maps, structs, and unions. The document provides details on each data type, including size, range of values, and examples. It also covers NULL handling and built-in operators in Hive.
The document outlines an advanced Python course covering various Python concepts like object orientation, comprehensions, extended arguments, closures, decorators, generators, context managers, classmethods, inheritance, encapsulation, operator overloading, and Python packages. The course agenda includes how everything in Python is an object, comprehension syntax, *args and **kwargs, closures and decorators, generators and iterators, context managers, staticmethods and classmethods, inheritance and encapsulation, operator overloading, and Python package layout.
NS2 - the network simulator which is proved useful in studying the dynamic nature of communication networks. Simulation of wired as well as wireless network functions and protocols( e.g. routing algorithms, TCP, UDP ) can be done using NS2
This document summarizes an F# talk about information rich programming using F# type providers. The talk introduces F#, demonstrates how type providers allow programming against web-scale data sources with strong typing and IntelliSense, and shows a demo integrating multiple data sources. It concludes by discussing how F# is well-suited for cloud programming and how the language may develop computation expressions for cloud services.
Stream analysis with kafka native way and considerations about monitoring as ...Andrew Yongjoon Kong
?
The document discusses stream analysis with Kafka and considerations for monitoring as a service. It provides background on the speaker including their roles in government, academia, and industry related to big data. It then covers some key concepts in stream processing versus batch processing and examples of popular stream processors like Apache Flume, Storm, Spark, and Samza. The document also discusses real-time analytics and defines the term. It introduces the Kafka Streams library and provides sample code for simple pipelines and wordcount analytics. Finally, it briefly mentions the KSQL query language for Kafka.
The document discusses recurrent neural networks (RNNs) and long short-term memory (LSTM) networks. It provides details on the architecture of RNNs including forward and back propagation. LSTMs are described as a type of RNN that can learn long-term dependencies using forget, input and output gates to control the cell state. Examples of applications for RNNs and LSTMs include language modeling, machine translation, speech recognition, and generating image descriptions.
Dynamic time warping and PIC 16F676 for control of devicesRoger Gomes
?
A presentation done as a part of the final year project during Semester 8 in the under-graduate degree course in engineering.
This presentation explains one of the modules of the project "Speaker and Speech Recognition based Embedded System Design for User Authentication and remote Device Control" which is the Speech Recognition Module.
It effectively explains the Dynamic Time Warping Algorithm used for Speech Recognition and how that is further used along with PIC 16F676 Microcontroller to acquire control of remote devices connected to the system.
Queuing theory and traffic analysis in depthIdcIdk1
?
This document provides a summary of concepts in queuing theory and network traffic analysis. It discusses queuing theory concepts like Little's Law, M/M/1 queues, and Kendall's notation. It then covers an empirical study of router delay that models delays using a fluid queue and reports on busy period metrics. Finally, it discusses the concept of network traffic self-similarity found in measurements of Ethernet LAN traffic.
Towards an Integration of the Actor Model in an FRP Language for Small-Scale ...Takuo Watanabe
?
This paper presents an integration of the Actor model in Emfrp, a functional reactive programming language designed for resource constrained embedded systems. In this integration, actors not only express nodes that represent time-varying values, but also present communication mechanism. The integration provides a higher-level view of the internal representation of nodes, representations of time-varying values, as well as an actor-based inter-device communication mechanism.
Workshop inInformation Security: Building a Firewall within the Linux Kernel0368-3500-34, Spring 2015 Lecturer: Eran Tromer Teaching assistant: Roei Ben Harush Student: Lior Bomwurzel
This document describes ClockSystem, a logical time framework embedded in Smalltalk. It allows expressing concurrency semantics through automata-based interpretation of logical time primitives from the Clock Constraint Specification Language (CCSL). ClockSystem defines clocks and clock relations in Smalltalk through a meta-model. It demonstrates modeling synchronous data flow and supports trace interpretation, model checking, and testing/monitoring of concurrent Smalltalk applications.
1. The document discusses modeling and simulation of computer networks. It covers discrete-event simulation, tools for network simulation like ns-3, and modeling different layers and elements of the network.
2. It also discusses simulation frameworks, modeling approaches for hardware simulation using instruction set simulation, and tools for network simulation like openWNS which can simulate WiFi, WiMAX and other protocol stacks.
3. The core algorithms of discrete event simulation involve modeling the system state, clock, future event list, and using event routines to process events and update the state.
Smart Reply - Word-level Sequence to sequence.pptxSejalVetkar
?
This document discusses implementing a basic character-level recurrent sequence-to-sequence model to generate short English sentences for smart reply character-by-character. It describes loading a dataset, cleaning and preparing the data, building and training the model, and creating an inference model to generate predictions by sending in text. The conclusion notes that increasing the size of the dataset could attain more accurate results from the model.
data structures using C 2 sem BCA univeristy of mysoreambikavenkatesh2
?
The document discusses reallocating memory using the realloc() function in C. It provides code to allocate memory for an integer array, print the memory addresses, reallocate the array to a larger size, and print the new memory addresses. The memory addresses for the previously allocated blocks do not change after reallocating, but new contiguous blocks are added to increase the array size.
The document discusses applications and simulations of error correction coding (ECC) for multicast file transfer. It provides an overview of different ECC and feedback-based multicast protocols and evaluates their performance based on simulations. Reed-Solomon coding on blocks provided faster decoding times than on entire files, while tornado coding had the fastest decoding but required slightly more packets for reconstruction. Simulations of protocols like MFTP and MFTP/EC using network simulators showed that using ECC like Reed-Muller codes significantly improved performance over regular MFTP.
Enhanced ProvenanceModel (TAP): Time-awareProvenance for Distributed SystemsAthiq Ahamed
?
1) The document proposes TAP, a new provenance model that captures time-aware provenance in distributed systems. TAP addresses limitations in existing systems by explicitly representing tuple changes and dependencies between them.
2) TAP introduces four vertex types - INSERT, DELETE, DERIVE, UNDERIVE - and represents provenance as a graph with these vertices and edges showing data flow and causality. It maintains this graph representation with tables storing pointers between contributing vertices.
3) The document describes optimizations for maintaining provenance graphs in distributed systems and introduces a new query language called TapQL for querying TAP provenance graphs. TapQL extends an existing provenance query language to address queries involving tuple changes over
This document presents a family of gossiping algorithms whose members can be tuned by assigning different permutation classes to participants. This allows the amount of communication parallelism, or algorithmic parallelism, to be scaled dynamically. The document introduces a procedure called hybrid gossiping to match the algorithmic parallelism to the physical parallelism provided by the deployment platform. By optimally tuning the algorithmic parallelism, resource utilization can be maximized and problems like message collisions avoided. Examples of permutations producing different levels of parallelism, like identity and pipelined permutations, are provided to illustrate this tuning approach.
This document summarizes a research paper on improving regular expression matching using a look-ahead finite automata approach. It proposes LaFA, which optimizes regular expression detection by allowing out-of-order detection, systematically reordering the detection sequence, and sharing states among automata. LaFA uses three main modules - a timestamp lookup module to detect non-repeating patterns, a character lookup module to check individual characters, and a repetition detection module to handle repeating patterns. The system architecture involves capturing packets, extracting payloads, and using these modules in parallel to match regular expressions and improve detection speed for intrusion detection systems.
Proof of Transit: Securely Verifying a Path or Service ChainFrank Brockners
?
1) The document proposes methods for securely verifying that network traffic follows the intended service chain or path using "proof of transit" techniques.
2) It describes using Shamir's secret sharing scheme to distribute secret shares to each service function, which then cumulatively update a value to validate the correct path at a verifier.
3) Implementations in VPP and IOS are shown as proofs of concept, with the verification managed by an OpenDaylight controller application.
Proof of Transit: Securely Verifying a Path or Service ChainFrank Brockners
?
Isola 12 presentation
1. Formal Analysis of TESLA protocol in the Timed
OTS/CafeOBJ method
Petros Stefaneas
Lecturer
School of Applied Mathematics and Physical Sciences
National Technical University of Athens
Joint work with I. Ouranos (HCAA) and K. Ogata (JAIST)
2. Introduction
?Project: Explore the applications of Algebraic Specifications and
especially of behavioral specifications to modeling and verification of
different systems/protocols.
? This paper: How to model authentication protocols with timing
properties ¨C TESLA protocol (source authentication in multicast
settings).
? We have formally verified that basic TESLA protocol has desired
properties with CafeOBJ, an algebraic specification language/system.
4. Outline
? Modeling
1) Assumptions 2) Formalization of messages and network
3) Real time issues 4) Formalization of trustable principals
5)Formalization of the Intruder
? Verification
1) Formalization of Properties 2) Verification Outline
? Lessons Learned
5. Formal Methods and Algebraic Specifications
? Algebraic Specification Languages/Systems: Formal methods which
are based on mathematical logics/combination of logics.
? Algebraic Modeling/Verification: Describe a system and its desired
properties
1. Defining signature for a real problem
2. Expressing the problem in equations
3. Verify properties of the specification (design level)
6. Introducing CafeOBJ
? CafeOBJ is an algebraic formal specification language.
? CafeOBJ is a formal language for writing formal models and reasoning
about them with rewritings/reductions.
? CafeOBJ is a successor of OBJ and developed by an international
team in Japan.
? Related algebraic specification languages:
1. Maude (USA) ¨C Another successor of OBJ
2. CASL (Europe) ¨C Attempt of developing a common algebraic
specification language
7. Formal Models in CafeOBJ
1. Abstract data types (ADT) with tight semantics (e.g. integers)
? Initial algebra semantics
? Induction based reasoning
2. Abstract state machines (ASM) with loose semantics (e.g. objects)
? Coherent hidden algebra semantics
? Co ¨C induction based reasoning
¡° CafeOBJ can provide unified specification style both for
static and dynamic systems ¡±
8. CafeOBJ Syntax and Notation
Two kinds of sorts:
? Visible sorts representing ADTs.
? Hidden sorts representing set of states of an ASM.
Two kinds of operations to hidden sorts:
? Actions that can change a state of an ASM (or object). Takes a
state and zero or more data and returns another or the same
state.
? Observations that are used to observe the value of a data
component of an object. Takes a state and zero or more data and
returns the value of a data component in the object.
9. CafeOBJ Syntax and Notation
Operator declaration:
? (action)
bop action_name : v_sort1 v_sort2 ¡ v_sortn h_sort h_sort
? (observation)
op observation_name : v_sort1 ¡ v_sortn h_sort v_sort
Operator definition with equations:
eq term1 = term2 .
In case of conditional equation:
ceq term1 = term2 if cond1 .
10. Observational Transition Systems
OTS S: A kind of transition system specified in terms of behavioural
specification. It consists of < O, I, T > such that:
12. Timed Observational Transition Systems
Timed OTS S : OTS evolved by introducing special clock observers and
transition tickr to deal with timing.
Clock observers
1. now : Y R+. It serves as the master clock and returns the time
amount after starting the execution of S. Initially returns 0.
2. For each transition ¦Ó ¦³:
? l¦Ó : Y R+. Returns the lower bound of ¦Ó.
? u¦Ó : Y R+. Returns the upper bound of ¦Ó.
They are used to force ¦Ó to be executed between the lower and the upper
bound.
13. Timed Observational Transition Systems
Clock transition tickr
Time advancing transition where r R+.
Effective condition: now(u) + r u¦Ó (u), for a state u.
now(tickr(u)) = now + r if the effective condition holds in u.
Delays of ¦Ó
Functions d¦Ómin , d¦Ómax which give the minimum and maximum
delays of ¦Ó and have the same type as l¦Ó, u¦Ó. Their definition is as
following:
15. OTSs and CafeOBJ
OTSs are written in CafeOBJ to model distributed concurrent systems, as
following:
16. TOTSs and CafeOBJ
A TOTS is written in CafeOBJ as an OTS but we also need a module called TIMEVAL
that specifies non-negative real numbers and their properties.
Signature
18. Timed OTS /CafeOBJ
The method includes the following steps:
? A system is modeled as a TOTS.
? The TOTS is written in CafeOBJ.
? Properties to be proved are expressed as CafeOBJ terms.
? Proofs or proof scores showing that the TOTS has properties are written in
CafeOBJ.
? The proof scores are verified by executing them with the CafeOBJ system.
19. TESLA Protocol
? Source authentication protocol in multicast environments
? Although uses symmetric cryptography achieves asymmetric
properties
? Use of timing ¨C loose synchronization (real time
authentication)
? We are going to formally analyze basic TESLA using the
TOTS/CafeOBJ method
20. Basic TESLA
Init message: R S : nR
Reply message: S R : {f(k1), nR }SK(S)
Message 1: S R : d1, f(k2), MAC(k1,d1, f(k2))
Message n: S R : dn, f(kn+1), kn-1, MAC(kn,dn, f(kn+1), kn-1), n>1
? Node R sends a nonce to S (message init)
? On receipt of the init message, S obtains nR and sends it back encrypted with its
secret key along with a commitment to the key k1.
? After the initial authentication, S sends data packet d1, a commitment to the second
key f(k2) and a MAC which encrypts d1 and f(k2) with k1.
? Message n consists of the nth data packet, the commitment to the key that will be
used at the next encryption, the key that was used in the previous encryption and a
mac which encrypts dn, f(kn+1) and kn-1 with kn.
21. Basic TESLA
A receiver can authenticate the nth packet m when:
? the packet has been received
? either the packet is the digitally signed initial packet (Reply message),
or else the preceding packet m-1 and succeeding packet m+1 have been
received, and the following hold:
? applying the MAC function to the key revealed in m+1 and the
content (other than the MAC) of packet m yields a value equal to
the MAC component of m,
? the key revealed in m+1 is the committed to in m-1,
? m-1 can be authenticated and
22. Basic TESLA
Security Condition : ArrTm < Tm+1,
The receiver R will not accept packet m if it arrives after the sender might
have send message m+1, otherwise an intruder can capture message m+1 and
use the key kn from within it to fake message m.
Requirement: Loose Synchronization of agent¡¯s clocks (real time property)
23. Invariant Property
A safety property of TESLA which is an invariant is:
¡°The receiver does not accept as authentic any message mi unless mi was actually
sent by the sender¡±
We are going to prove this very critical property of the protocol
using the TOTS/CafeOBJ method.
24. Modeling TESLA (Datatypes)
Assumptions made for data types
? The cryptosystem used is perfect.
? There exist an arbitrary number of trustable nodes
? There exist malicious nodes; the combination and cooperation of them is modeled
as the most general intruder:
- Eavesdrop any message flowing in the network
- Glean any quantity from the message; however, the intruder can decrypt an
encrypted text only if he/she knows the key to decrypt.
- Fake and send messages based on the gleaned info; however, the intruder can
encrypt and/or sign something only if he/she knows the key to encrypt and/or sign,
and cannot guess unknown secret values.
25. Modeling TESLA (Datatypes)
Formalization of Messages
op im : Receiver Receiver Sender Nonce -> Msg
op rm : Sender Sender Receiver Nonce Prf Sign -> Msg
op m1 : Sender Sender Receiver Data Prf Mac1 -> Msg
op mn : Sender Sender Receiver Data Prf Key Mac2 Int -> Msg
Suppose that a message denoted by
mn (p1, p2, p3, d, p, k, mc2, i)
exists in the network.
? It is true that p1 has sent the message to p3.
? If p2 is different from p1, then p1 is the intruder and the message has been faked
by the intruder.
? If p3 receives the message, p3 just believes that the message seems to come from
p2 but cannot check who has really sent the message.
26. Modeling TESLA (Datatypes)
Formalization of Messages (cont.)
The rest is the packet content.
For modeling reasons we have added the id of the packet varying
over an integer number as part of the packet.
All sorts used such as Receiver, Sender, Nonce, Data, Prf, Sign, Key, Mac1 and Mac2
have been specified beforehand and are used by the MESSAGE
module.
27. Modeling TESLA (Datatypes)
Formalization of the Network
? The network is modeled as a bag (multiset) of messages.
? Given the network (a bag of messages), data values available to the intruder are
determined.
Suppose that the message mn(p1, p2, p3, d, p, k, mc2, i)
exists in the network. The data values available to the intruder from the
message:
- d (data of the packet), p (encrypted commitment for key ki), k (key ki-1),
mc2 (MAC of the second type), and index i.
28. Modeling TESLA (System¡¯s behaviour)
Assumptions made for modeling protocol¡¯s behaviour
? Time constraints for sending ¨C receiving messages m1 and mn.
? Ordering of packets using an integer packet id (im and rm have id=0,
m1 has id = 1 and mn has id = n.
? One sender ¨C one receiver (Basic Scheme)
? Boolean flag-s is set to true if the sender has received the message im.
? Boolean flag-r is set to true if the receiver has sent the message im.
? Boolean received? Is used to check the reception of a message by the receiver.
Since the message is not deleted from the network, when received the boolean
is set to true in order not to be received again by the same receiver.
? Observation next returns the id of the packet to be received by the client.
29. Modeling TESLA (System¡¯s behaviour)
Real time issues
? Security condition (see ºÝºÝߣ 22)
? Clock observers
? now(t) : returns the time at state t.
? l-sdm2 (t) (l-sdmn(t)): the lower bound of sending message m2 (mn) at
state t.
? u-rcvm1(t) (u-rcvmn(t)): the upper bound of receiving message m1
(mn) at state t.
? Constants
? init: initial state
? d1: the lower bound of sending a message mn
? d2: the upper bound of receiving message m1
? d3: the upper bound of receiving message mn.
with
d2 < d1, d3 < d1, d1 > 0, d2>0, d3 >0
? Transition
tick (t,r) advances the time by r time units at state t.
30. Modeling TESLA
Formalization of trustable nodes
? The network is modeled as a bag (multiset) of messages.
? Given the network (a bag of messages), data values available to the intruder are
determined.
? The behavior is modeled with 5 send and 4 receive transitions. Each transition
has effective condition with timing and non-timing part.
? Transitions with timing part are sdm1, sdm2 and sdmn.
Example
sdmn(t,m,J) corresponds to that: if a message m of type mn with id = J, J > 2 that
has been sent by server to client exists in the network, agent server makes
1. The data d(a, J+1) ,
2. The pseudorandom f(k(server, client, J+2))
3. The key k(server, client, J)
4. The MAC mac(k(server, client, J+1), d(server, J+1),f(k(server,client, J+2),
k(server, client,J))
and sends it in a message mn with the id J+1 of the message provided that
l-sdmn (t) <= now (t)
31. Modeling TESLA
Formalization of the intruder
? Tries to glean information from the messages flowing in the network,
? create and send messages based on it
? Gleaned quantities are nonces, data, commitments, keys, macs1, macs2,
signatures
? The intruder¡¯s fake messages follow the format of the messages of the protocol.
There are 18 transitions model the behavior of an intruder.
Example
fkmn7(t,k,k¡¯,k¡¯¡¯,i) corresponds to that the enemy fakes
mn(enemy,server,client,d(enemy,i),f(k),k¡¯,mac2(k¡¯¡¯,d(enemy,i),f(k),k¡¯),i) and puts
it into the network.
32. Verifying TESLA
Formalization of invariant property
The property that the original protocol satisfies and we want to prove for our model
(specification) is as follows:
¡°The receiver does not accept as authentic any message mi unless mi was actually
sent by the sender¡±
The above property is expressed based on our specification as three different
invariants:
?INV1: Whenever you receive the three messages rm, m1, m2 i.e.
then m1 originates from the claimed source S.
?INV2: Whenever you receive the three messages m1, m2, m3 i.e.
then m2 originates from the claimed source S.
33. Verifying TESLA
Formalization of invariant property
?INV3: Whenever you receive the three messages m_n-1, m_n, m_n+1, n >2 i.e.
then mn originates from the claimed source S.
34. Verifying TESLA
Verification Outline
? Proof by induction on the number of action operators applied (or transition
rules applied).
? Case analyses and lemmas also needed.
? In any case, proof scores are written in CafeOBJ and case analyses is done with
the aid of CafeOBJ system.
? Flexible human ¨C computer interaction in good balance, i.e humans make proof
plans and machines conduct detailed computations.
35. Verifying TESLA
Verification Procedure
?Write a CafeOBJ module called INV where is declared the invariants to prove
? Show that the predicate holds at any initial state
? Write a module ISTEP, where two constants t, t¡¯ denoting any state and the
successor state after applying an action in the state, and the invariant to prove in
each inductive case is expressed in CafeOBJ terms
? Write a proof score for each case.
? For our proof we used 29 lemmas that we had to prove for our specification.
? Two invariants that include timing information are:
?inv8: If an original message mn exists in the network in a state T with n >1
and l-sdmn(T) = now(T) then the message has been already received by the
client.
?inv12: If an original message mn exists in the network in a state T with n >1
and it has not yet been received by the client , then u-rcvmn(T) < l-sdmn(T).
36. Lessons Learned
Algebraic Specification and Verification with
CafeOBJ
P C
R O
O N
S S
Can be difficult and time
Simple underlying theory ¨C
consuming for
based on equations
inexperienced user
37. Lessons Learned
Algebraic Specification and Verification with
CafeOBJ
T T
A A
S S
K K
System Description Property Description
Deep understanding of
the protocol/system
38. Lessons Learned
?Incorrect system¡¯s specifications => unsuccessful verifications => specification
revisions => verification retries which can be time consuming
? In our case many verification retries and specification revisions were performed
due to misunderstanding of protocol¡¯s functions that lead to wrong descriptions
ERROR 1:
? Protocol model without timing constraints, only by packet indexing
ERROR 2
? Wrong expression of the invariant property to prove
ERROR 3
? Less important protocol mis - description
RESULTS
? Counterexamples found during verification for our model
39. Proposals
? Some level of automation for Timed OTS method can be possible (Cr¨¨me, Toolkit
proof score presenter for OTSs)
? Emacs and/or Eclipse make specification/proof score editing easier
? Library support for reusable similar modules can be useful.
? Combination of model checking and theorem proving can save time.