3.2.8 • Published 2 years ago

rlwe v3.2.8

Weekly downloads
35
License
MIT
Repository
github
Last release
2 years 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

2 years ago

3.2.7

2 years ago

3.2.6

2 years ago

3.2.5

3 years ago

3.2.4

3 years ago

3.2.3

3 years ago

3.2.2

5 years ago

3.2.1

6 years ago

3.2.0

6 years ago

3.2.0-next

6 years ago

3.1.7

7 years ago

3.1.6

7 years ago

3.1.5

7 years ago

3.1.4

7 years ago

3.1.3

7 years ago

3.1.2

7 years ago

3.1.1

8 years ago

3.1.0

8 years ago

3.0.2

8 years ago

3.0.1

8 years ago

3.0.0

8 years ago

2.0.0

8 years ago

1.1.1

8 years ago

1.1.0

8 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago