Giter Club home page Giter Club logo

cyclone_crypto_rsa_sha_signature's Introduction

Prerequisites

  • CMake (project built/tested using CMake 3.23.3)
  • Linux distro (project built/tested on Ubuntu 20.04 LTS on Windows Subsystem for Linux (WSL2))

Project architecture

  • main.c : main entrypoint
  • check_probable_prime.c : reference implmentation, please see the note below
  • lib/common : common files for CycloneCRYPTO (Open)
  • lib/core : core files for CycloneCRYPTO (Open)
  • lib/cyclone_crypto : complete source code for CycloneCRYPTO (Open)
  • lib/crypto_config.h : used to enable/disable different CRYPTO modules
  • lib/os_port_config.h : contains information about the target platform

Build

  • create a 'build' directory at the project root.
  • From within 'build' directory, execute the following commands:
    • cmake ..
    • cmake --build .
  • ./rsa_sha_demo will run the demo.

Using OpenSSL certificates

  • Activate with the macro definition USE_OPENSSL_KEYS 1 (and USE_CYCLONE_KEYS 0)
  • Generate keypair at the root folder (the program assumes execution from ./build folder)
  • Private key : openssl genrsa -out my_rsa_key.pem 2048
  • Public Key : openssl rsa -in my_rsa_key.pem -outform PEM -pubout -out my_rsa_public.key
  • Build the demo using the steps in the previous step.

Note:

About check_probable_prime.c

The file check_probable_prime.c is an example imlpementation of checkProbablePrime(), based on some mbedTLS routines (under Apache 2.0 permissive license). This is not a part of CycloneCRYPTO.

CycloneCRYPTO is mainly oriented towards smaller footprint embedded targets. On such devices the computing cost for calculating a RSA keypair with a software implementation is quite large (~2 minutes). The funciton checkProbablePrime() is provided as a placeholder, so code running on embedded targets (SAMExx, Renesas RA6, etc.) can use hardware acceleration usually provided by MCU vendors.

However, this is not a big issue for a project running on a x86 based target (ex.Intel).

About lib/ folder

This folder contains all the files/folders available for CycloneCRYPTO suite. Naturally, not all files/folders are used for this demo. lib/CMakeLists.txt contains a list of dependencies for the current project.

Using OpenSSL

CycloneCRYPTO is able to import keypairs generated by OpenSSL as long as they conform to the following criteria: - keys are in PEM format - No passphrases are used to protect the keys

cyclone_crypto_rsa_sha_signature's People

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

shaoboan

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.