Giter Site home page Giter Site logo

selsta / mx25519 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tevador/mx25519

0.0 1.0 0.0 49 KB

Cross-platform high-performance library for Diffie-Hellman key exchange

License: GNU Lesser General Public License v3.0

C 41.98% Assembly 56.48% CMake 1.54%

mx25519's Introduction

This library provides four constant-time implementations of scalar multiplication on Curve25519:

  1. PORTABLE is a C-language implementation based on public domain "ref10" code by Daniel J. Bernstein. It uses 26-bit limbs.
  2. ARM64 is an optimized 100% assembly implementation for 64-bit ARM CPUs written by Emil Lenngren. It uses 26-bit limbs and can run 3 field operations in parallel by interleaving A64 and NEON instructions.
  3. AMD64 is an optimized 100% assembly implementation for 64-bit x86 CPUs. It uses 64-bit limbs.
  4. AMD64X is an optimized 100% assembly implementation targeting AMD Ryzen, Intel Broadwell and newer CPUs. It uses the mulx, adcx and adox instructions with 64-bit limbs.

A specific implementation can be selected at runtime using the API. Passing the MX25519_TYPE_AUTO flag automatically selects the fastest implementation supported by the current machine.

Build

git clone https://github.com/tevador/mx25519.git
cd mx25519
mkdir build
cd build
cmake ..
make
./mx25519-tests
./mx25519-bench

On Windows, building with Visual Studio is also supported.

Performance

mx25519's People

Contributors

tevador 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.