Code Monkey home page Code Monkey logo

cleo's Introduction

㊙️ Cleo: Cryptographic Leakage Evaluation of Hardware

Cleo is a Test Vector Leakage Assessment (TVLA) project that evaluates hardware implementations of cryptographic instruction set extensions for physical side-channel leakage. The current framework supports evaluating ongoing RISC-V cryptography extension standardization work. This is a complete power side-channel evaluation framework parallel to the existing test-based functional validation suite and formal verification suite.

The RISC-V instruction set architecture is known for its open-source and customizable design. One of the notable features of RISC-V is its modular and extensible nature, allowing developers to add custom instructions and extensions tailored to specific applications. There are several ongoing works on developing cryptographic instruction set extensions of RISC-V architecture.

  • riscv-crypto: RISC-V cryptography extensions standardisation work.
  • xcrypto: a cryptographic ISE for RISC-V

Test Vector Leakage Assessment (TVLA)

Test vector leakage assessment tries to quantify potential power side-channel leakage of a hardware implementation at an early stage design life cycle. The device's power consumption fluctuates as it executes computations, responding to changing logic states and data processing. These current variations generate distinct patterns that enable the analysis of the ongoing operations. By observing these power consumption fluctuations and correlating them with specific computations, an adversary can deduce sensitive data, such as cryptographic keys or plaintext, without needing direct access to the internal memory or processes of the target device.

Project Structure

Here is the project structure. All the extensions under testing (eut) are initialized as submodules. Currenlty, riscv-crypto, xcrypto and scarv-soc are elvaluated.

.
├── docker
│   └── dockerfile # Environement
├── eut # extensions under test
│   ├── riscv-crypto
│   ├── scarv-soc
│   └── xcrypto
├── evaluator # evaluator core
│   ├── generator 
│   ├── Makefile # make to run all
│   ├── power_libs # common utility files
│   ├── results.txt # Summary
│   ├── riscv_crypto_fu_saes32
│   ├── riscv_crypto_fu_saes64
│   ├── riscv_crypto_fu_ssha256
│   ├── riscv_crypto_fu_ssha512
│   ├── xc_sha256
│   ├── xc_sha512
│   ├── xc_aessub
│   ├── xc_aesmix
│   └── scarv_soc # SoC for the xcrypto
└── readme.md # You are looking at it

Running CLEO 🏃‍♀️

Following are the steps to run the framework. Docker is a pre-requisite for Cleo since the complete environment for building everything is provided in archfx/cleo container.

  1. Clone the project repository
git clone https://github.com/Archfx/Cleo  cleo
  1. Use the following commands to initiate submodules
cd cleo
git submodule update --init
git submodule update --init --recursive  eut/scarv-soc
  1. Pull the docker container and mount the project (You should be inside the project directory)
docker pull archfx/cleo
docker run -t -p 6080:6080 -v "${PWD}/:/cleo" -w /cleo --name cleo archfx/cleo
  1. Access the docker container
docker exec -it cleo /bin/bash
  1. Finally run Cleo
cd evaluator && make

Pre-Silicon Side Channel Evaluation of RISCV-CRYPTO ISE

Original implementations of the hardware functional units of RISCV-CRYPTO have a strong correlation with the input values. As an example following is the power side channel signature of the ssha512 functional unit and the visual relationship between the input values. Evaluation results of other components are available in evaluator folder.

riscv_crypto_fu_ssha512 power signature compared with the inputs

Pre-Silicon Side Channel Evaluation of XCRYPTO ISE

Functional Unit Evaluation

Original implementations of the hardware functional units of XCRYPTO have a strong correlation with the input values. As an example following is the power side channel signature of the xc_sha256 functional unit and the visual relationship between the input values. Evaluation results of other components are available in evaluator folder.

xc_sha256 power signature compared with the inputs

System Evaluation with SCARV_SOC

XCYPTO ISE is implemented in the SOC implementation of scarv-soc. Therefore all the supporting functional units that are implemented on the scarv-soc are evaluated with the Cleo. Note that system evaluation takes a considerable amount of run time. However, there is a clearly visible statistical significance in the correlation between the input and the observed power values of the system.

Power signature of xc_aesmix on the system evaluation compared with the inputs

LICENCE

Copyright (c) 2023 original authors

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

cleo's People

Contributors

archfx avatar rb-uf avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.