Code Monkey home page Code Monkey logo

compact25519's Introduction

compact25519: A compact portable X25519 + Ed25519 implementation

This library is a compact and portable (c99) implementation of two popular operations on the Curve25519:

  • X25519: Diffie-Hellman Key Exchange
  • Ed25519: EdDSA signature system

There are quite some advantages over older RSA based algorithms:

  • compact key size (32 bytes for X25519 and 64bytes for Ed25519)
  • Less opportunities to introduce side-channels
  • Faster than other popular alternatives at the same 128bit security level

compact25519 targets smaller embedded devices, binary size is modest and all operations are on a byte level, no assumption of fast int32/int64 operations.

Since there is no single C package management system, compact25519 is released as a single pair of c & h file. Deployment options:

  • Download release from Github and copy into your project directory
  • TODO: Use PlatformIO and take a dependency on compact25519

License and origins

The implementation of the X25519 and Ed25519 is extracted from Daniel Beer's c25519 version 2017-10-05. Daniel Beer released it under the Public Domain license. To remain in the same spirit, this library is also licensed as Public Domain using the CC0 license.

Smaller binaries

By default the library contains both X25519 and Ed25519. They share quite some code. compact25519 has several defines so that you can disable either one of the operations to reduce binary size.

Define Flag Description
COMPACT_DISABLE_ED25519 Disable Ed25519 feature and the related code, shaves of 32%
COMPACT_DISABLE_X25519 Disable X25519 feature and the related code, shaves of 25%
COMPACT_DISABLE_X25519_DERIVE Disable custom derive secret feature, extra useful combined with COMPACT_DISABLE_ED25519, in itself only saves 3%, combined with disabling Ed25519: 45%

compact25519's People

Contributors

davylandman avatar iotanbo 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.