Giter VIP home page Giter VIP logo

qrllib's Introduction

PyPI version npm version Build Status CircleCI Codacy Badge MIT licensed

QRL Core Library

WARNING: This is work in progress, changes might not be backward compatible.

This library currently exposes the following functionality:

  • XMSS, XMSS_fast
  • Shake128, Shake256, SHA2_256
  • Hashchain seeds, etc.
  • Helpers: seed generation, address generation, mnemonics

Platform support

Linux OSX
10.12
Windows
10
Python 3 โœ… โœ… ๐ŸŒฑ
Webassembly (JS) โœ… โœ… โœ…
Golang ๐ŸŒฑ - -
Java - - -

Installing

Ubuntu

sudo apt -y install swig3.0 python3-dev build-essential cmake ninja-build pkg-config
pip3 install pyqrllib

OSX

If you dont have brew yet, we think you should :) Install brew following the instructions here: https://brew.sh/

Now install some dependencies

brew install cmake python3 swig
pip3 install pyqrllib

Windows

TBD

Raspbian

sudo apt -y install swig3.0 python3-dev build-essential cmake ninja-build
sudo pip3 install -U setuptools
sudo pip3 install -U pyqrllib

Miscellaneous

Golang and Java wrappers are currently experimental (By default they are disabled in cmake)

brew install go --cross-compile-common

Development

Emscripten

In order to compile the webassembly and run node.js tests you first need to install CircleCI CLI:

https://circleci.com/docs/2.0/local-cli/#installing-the-circleci-local-cli-on-macos-and-linux-distros

Then run the following command

circleci build --job build_emscripten

This will compile and test the webassembly. Output files will be copied over to tests/js/tmp

You can then run node.js locally using npm.

License

This library is distributed under the MIT software license, see the accompanying file LICENSE or http://www.opensource.org/licenses/mit-license.php.

Some of the code is based on the xmss-reference implementation that has been released in the public domain by their respective authors.

Most of third party code has been included as git submodules for future reference.

qrllib's People

Contributors

ademcan avatar codacy-badger avatar cyyber avatar jleni avatar jplomas avatar kstuart avatar lgb1t avatar liam0215 avatar randomshinichi avatar scottdonaldau avatar som-dev avatar surg0r avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

qrllib's Issues

Unify address validation

Improve validation in the node and ensure other components have access to the same validation.
Ideally move down to QRL Helper
Opening the same issue in qrllib

QRL: theQRL/QRL#935

xmss-alt function names

Some function names in the xmss-alt code can be confusing. An example is core_hash_SHA2 where the implementation at the moment is using shake128/shake256 instead of SHA2

Windows native support

The library is currently not supported in Windows. The xmss reference code requires access to /dev/urandom plus there are some incompatibilities with Microsoft compiler.

For the moment, only the webassembly is supported. We are currently working on improving the code base to support a native Windows version.

Unnecessary parameters for Dilithium sign_open

Dilithium crypto_sign_open expected to return only message but consumes size equivalent to message length and signature length. Thus extract_signature is not possible. sign_open must only be used as a bool to verify the signature and the extract_message and extract_signature must be used on the signature_message returned by sign function, instead of sign_open.

cmake

There is an issue with cmake, which causes builds to fail where newer versions of cmake are installed.

   /usr/local/Cellar/cmake/3.12.4/bin/cmake -E copy_if_different /private/var/folders/qw/clgh44rs0sq31x0v5srt0h6c0000gn/T/pip-install-9yy1mrqo/pyqrllib/pyqrllib/dilithium.py
    CMake Error: cmake version 3.12.4

This causes specific issues on OSX (which can be fixed with https://gist.github.com/jplomas/dcda0958ae5c0249913e513b967e4299 after following our documented instructions).

Incorrect value by Dilithium extract_message & extract_signature

extract_message & extract_signature functions doesn't work as expected and returns incorrect value.

extract_message should be replaced to

std::vector<uint8_t> Dilithium::extract_message(std::vector<uint8_t> &message_output)
{
    return std::vector<uint8_t>(message_output.begin() + CRYPTO_BYTES, message_output.end());
}

extract_signature should be replaced to

std::vector<uint8_t> Dilithium::extract_signature(std::vector<uint8_t> &message_output)
{
    return std::vector<uint8_t>(message_output.begin(), message_output.begin() + CRYPTO_BYTES);
}

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.