tearsofphoenix / ntrumls

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ntrumls.js

Overview

The NTRUMLS post-quantum asymmetric cipher compiled to WebAssembly using Emscripten. A simple JavaScript wrapper is provided to make NTRU easy to use in web applications.

Example Usage

    const message = new Uint8Array([11, 12, 13, 14, 15, 16, 17, 18, 11, 12, 13, 14, 15, 16, 17, 18,
            11, 12, 13, 14, 15, 16, 17, 18, 11, 12, 13, 14, 15, 16, 17, 18, 11, 12, 13, 14, 15, 16, 17, 18,
            11, 12, 13, 14, 15, 16, 17, 18, 11, 12, 13, 14, 15, 16, 17, 18, 11, 12, 13, 14, 15, 16, 17, 18])
    const keyPair = NTRUMLS.createKey()
    const sign = NTRUMLS.sign(message, keyPair.public, keyPair.private)
    const result = NTRUMLS.verify(sign, message, keyPair.public)

About

License:Other


Languages

Language:C++ 42.4%Language:JavaScript 41.1%Language:CMake 9.2%Language:Python 7.3%