Giter Site home page Giter Site logo

knut0815 / x25519-cortexm4 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dfaranha/x25519-cortexm4

0.0 0.0 0.0 776 KB

Constant time X25519 for ARM Cortex-M4 in assembler

License: The Unlicense

Assembly 1.62% C 70.65% Makefile 0.08% C++ 27.62% Python 0.03%

x25519-cortexm4's Introduction

Constant time X25519 implementation for ARM Cortex-M4

This project is a constant time implementation of the X25519 elliptic curve Diffie-Hellman function for the ARM Cortex-M4 architecture. It is hand-written in assembler to extract the most performance from the device, and completes a scalar multiplication in 1816351 cycles using 628 bytes of RAM and 4140 bytes of ROM. This function accepts arbitrary public points.

Contents

There are three directories:

  • X25519/ has the Cortex-M4 assembler functions, this is the scalar multiplier only.
  • prototype/ holds a C version of the X25519 function using the same implementation strategy.
  • launchpad/ contains the assembler version with a KEIL uVision project for the TI Tiva C series Launchpad development board.

The latter directory also houses a Python script. It tests the launchpad version by having the C scalar multiplier generate test vectors and sending them to the device. The device then performs scalar multiplication, measures the timing and sends its cycle count and resulting value back where they are compared against the known targets.

M3

This code uses the long multipliers available on M3 and higher. However, they are not constant time on M3, and consequently neither is this implementation of X25519. If constant time performance is important to you, do not use this implementation on an M3.

x25519-cortexm4's People

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.