3.2.8 • Published 10 months ago

rlwe v3.2.8

Weekly downloads
35
License
MIT
Repository
github
Last release
10 months ago

rlwe

Note

This package is no longer recommended. The underlying implementation is unmaintained, meanwhile more robust alternatives have been developed. Instead prefer Kyber, a NIST PQC winner that has been selected for standardization. An implementation of Kyber is provided by kyber-crystals.


Overview

The RLWE post-quantum asymmetric cypher compiled to WebAssembly using Emscripten. The specific implementation in use is from Microsoft Research. A simple JavaScript wrapper is provided to make RLWE easy to use in web applications.

The parameters are configured to 128-bit strength. (More specifically, the security level is 128 quantum bits and 128 classical bits.)

Example Usage

import {rlwe} from 'rlwe';

const aliceKeyPair /*: {privateKey: Uint8Array; publicKey: Uint8Array} */ =
	await rlwe.aliceKeyPair()
;

const bob /*: {publicKey: Uint8Array; secret: Uint8Array} */ =
	await rlwe.bobSecret(aliceKeyPair.publicKey)
;

const aliceSecret /*: Uint8Array */ =
	await rlwe.aliceSecret(bob.publicKey, aliceKeyPair.privateKey) // equal to bob.secret
;

console.log(aliceKeyPair);
console.log(bob);
console.log(aliceSecret);

Note: This library only handles generating shared secrets; you'll need to handle key derivation and symmetric encryption from there.

Changelog

Breaking changes in major versions:

3.0.0:

  • As part of upgrading from asm.js to WebAssembly (with asm.js included as a fallback), the API is fully asynchronous.

2.0.0:

  • Removed some undocumented functions as part of minor API cleanup.
3.2.8

10 months ago

3.2.7

12 months ago

3.2.6

1 year ago

3.2.5

2 years ago

3.2.4

2 years ago

3.2.3

2 years ago

3.2.2

4 years ago

3.2.1

4 years ago

3.2.0

5 years ago

3.2.0-next

5 years ago

3.1.7

6 years ago

3.1.6

6 years ago

3.1.5

6 years ago

3.1.4

6 years ago

3.1.3

6 years ago

3.1.2

6 years ago

3.1.1

6 years ago

3.1.0

7 years ago

3.0.2

7 years ago

3.0.1

7 years ago

3.0.0

7 years ago

2.0.0

7 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago