Countermeasure Synthesizer

,

USI – Countermeasure Synthesizer: automatic selection of security primitives

ID: R25 Licence:
GPL 3.0
Owner:
USI
Contacts:
francesco.regazzoni@usi.ch
subhadeep.banik@usi.ch
Short DescriptionThe Countermeasure Synthesizer takes care of the selection of the most appropriate (set of) countermeasures given specific requirements. Starting from the security properties of an application, it selects from a library of profiled security primitives the implementations that meet the required security level while best matching the throughput and energy requirements, and instantiates them in the application.
Key features– Four security functionalities: encryption, hashing, key encapsulation and digital signature
– Three security levels for each functionality, from lightweight to post-quantum
– Selection among different implementations of the same primitive, based on their measured throughput and energy
– Split into parser, profiler and synthesis engine, so that the synthesis engine can be used both at design time and at run time
– Support for both customised (native) and ready-made (transparent) Privacy and Security containers
Require– TOSCA model of the application, with the sensitivity and integrity of the data handled by each software component and the throughput and energy levels of the compute nodes
– Profiling information (execution time and energy) of the primitives on the target platform
– For the native container: source code of the primitives in C, with a Makefile and a configuration file
Provide– Primitive specification written back into the TOSCA model: the primitive to use for each functionality and the alternatives available for switching at run time
– Construction of the native Privacy and Security container, when source code is provided
InputLibrary of countermeasures, library characterization (profiling database), application security requirements, application constraints (throughput and energy).
OutputInstantiation of the needed countermeasures, as a TOSCA model updated with the selected primitives, used to configure the Privacy and Security container of each component.
UserDevelopers that need to include security in their systems; system designers and researchers working on security.
Benefits for the user– Easy handling of security requirements: the developer states how sensitive the data are, and the synthesizer chooses and configures the cryptographic primitives
– Simpler compliance of a system with its security requirements, with countermeasures selected automatically from the model of threats and defences
– A ready-made catalogue of primitives, so that no library of countermeasures has to be provided unless the developer wants to use their own
Downloadgithub.com/subhadeep-banik/autosyntheiszer
Role in MYRTUSStep 2 of the MYRTUS DPE (Model to implementation): synthesis of the countermeasures at design time. The same synthesis engine is used at run time inside the Privacy and Security containers (see Privacy and Security Manager).
TRL@M0New tool
TRL@M363

General description


The Countermeasure Synthesizer takes a generic security request for an application and selects, from a library, the specific countermeasures to be instantiated into the application to mitigate potential security threats. Security requirements are expressed through four functionalities (encryption, hashing, key encapsulation and digital signature), each at one of three security levels (low, medium, high), as defined by the Privacy and Security framework of the MYRTUS infrastructure.

The requirements can be set in two ways. In the more fine-grained one, the system architect models the threats of the application as an Attack-Defense Tree and assigns each countermeasure, for example encryption, to specific components. In the more automated one, the architect only states the sensitivity and integrity of the data handled by each component: the parser propagates these properties as data travel between components, and derives for each of them the security level required for every functionality, so that highly sensitive data are, for example, encrypted at the highest level.

TOSCA modelData sensitivity and integrity of each component, throughput and energy levels of each node, optional countermeasures from the Attack-Defense Tree.
ParserSecurity specification of each component: functionalities, security levels and non-functional requirements.
Synthesis engineSelects the primitives that meet the specification, using the profiling information on the target platform.
Updated TOSCA modelPrimitive specification for the Privacy and Security container of each component.

Countermeasure synthesis at design time. If no profiling information is available for the target platform, the parser writes only the security specification, and profiling and synthesis are carried out at run time inside the container.

The synthesizer works in three steps:

Profiling

A preparatory step that measures the average execution time and energy of each primitive on the target platform, by running it repeatedly on random inputs. Energy is read from the processor’s energy counters, without root access. The results are stored in a database read by the synthesis engine.

Registration

Only needed when the designer provides source code. The implementations are checked against standard test vectors, renamed to avoid name collisions and packed into a single shared library, which is placed in the native container.

Primitive selection

The core of the synthesizer. Among the implementations that provide the required functionality and security level, it chooses the one whose execution time and energy are closest to the requested levels. When the requirements conflict, throughput is given priority over power.

Role in the MYRTUS DPE


The synthesizer is part of Step 2 of the MYRTUS DPE, Model to implementation. It reads the TOSCA model exported by Modelio, where the security properties are set in the TOSCA Designer and the threats and countermeasures are modelled in the Attack-Defense Tree Designer, and writes the selected primitives back into the same model, which is then passed on to the following steps.

The output configures the Privacy and Security (P&S) container attached to each component. When the designer provides the source code of the primitives, the synthesizer builds a native P&S container around them; otherwise, the transparent P&S container is used, with its ready-made catalogue of open-source implementations. In both cases the container receives, besides the selected primitive, the alternatives that satisfy the same specification, so that the Privacy and Security Manager of MIRTO can switch primitive at run time without re-allocating the workload. The synthesis engine is used in the same way at run time inside the containers, for example when the security requirements change or when the target node had not been profiled at design time.

MYRTUS Extension/Contribution


The Countermeasure Synthesizer has been designed from scratch in MYRTUS. It has been split into separate tools (parser, profiler and synthesis engine), so that the same engine serves both design time and run time, and the whole flow works end to end, from a TOSCA model with the required properties to a TOSCA model with the specification of the security primitives to be executed at run time. The TOSCA types have been extended accordingly, with data sensitivity and integrity on software components and throughput and energy levels on compute nodes. The library of countermeasures now covers encryption, key exchange, hashing and digital signature, and the synthesis engine maintains the requested security level while optimising for the non-functional requirements provided.

Besides security, the synthesizer also supports the selection of privacy-preserving primitives: a model developed in MYRTUS predicts the execution time and energy of a homomorphic encryption program for different back-ends and configurations, so that the most suitable configuration can be chosen without running the program on each of them.

Technology Benefits and Innovations


Existing approaches to the automatic application of security countermeasures, such as the automatic protection against side-channel attacks, work at a lower level: they take an unprotected software routine or hardware description and produce a protected executable or netlist. The Countermeasure Synthesizer works at a higher level of abstraction: starting from the model of the application, it automatically instantiates the cryptographic functionalities needed to counteract the threats identified in the model.

Its role can be compared to that of a circuit compiler, which maps a hardware description onto a cell library under area or latency goals, or of a software compiler: it turns a request for a countermeasure into a concrete implementation chosen from a library, according to security level, throughput and energy. This relies on the benchmarking of implementation styles and on the trade-offs between power, energy and throughput. The selected countermeasures are packaged into a container, which makes them suitable for the computing continuum; the approach is generic enough to be adapted to other virtualised environments.

Because the countermeasures are inferred from the model of the attacks and defences, keeping a system compliant with its security requirements becomes part of the design flow instead of a separate manual step. The designer does not choose a specific implementation: the synthesizer returns the concrete instantiation of each countermeasure, together with the alternatives that can replace it at run time.

Users


Developers and system architects of distributed applications in the edge-fog-cloud continuum that need to include security from the design phase, without being cryptography experts: they describe how sensitive their data are, and the synthesizer selects and configures suitable primitives for each target node. The tool is also relevant for system designers and researchers working on security, whose work is to model the threats to a system and the defences against them and to characterise the countermeasures: the synthesizer turns this model into instantiated countermeasures, and lets them compare and choose among different implementations of the same cryptographic primitive on a given platform, or add their own implementations to the library. Finally, it is of interest to developers of model-driven design and orchestration tools that want to take security requirements into account.

References


  • S. Thakur, S. Banik, F. Regazzoni, “Energy Analysis of Cryptographic Algorithms in Server Environment”, in Proc. 2024 Cloud Computing Security Workshop (CCSW), 2024.
  • Code: github.com/subhadeep-banik/autosyntheiszer
Competenze

Postato il

29 Gennaio 2025