5.0.4 • Published 9 months ago

mceliece v5.0.4

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

mceliece

Overview

The Classic McEliece post-quantum asymmetric cypher compiled to WebAssembly using Emscripten. A simple JavaScript wrapper is provided to make McEliece easy to use in web applications.

The default parameter set is mceliece8192128 (roughly 256-bit strength).

Example Usage

import {mceliece} from 'mceliece';

const keyPair /*: {privateKey: Uint8Array; publicKey: Uint8Array} */ =
	await mceliece.keyPair()
;

const {cyphertext, secret} /*: {cyphertext: Uint8Array; secret: Uint8Array} */ =
	await mceliece.encrypt(keyPair.publicKey)
;

const decrypted /*: Uint8Array */ =
	await mceliece.decrypt(cyphertext, keyPair.privateKey) // same as secret
;

console.log(keyPair);
console.log(secret);
console.log(cyphertext);
console.log(decrypted);

Changelog

Breaking changes in major versions:

5.0.0:

  • Switched from McBits to Classic McEliece. For backwards compatibility with previous versions of this package, use mceliece-legacy.

4.0.0:

  • Cyphertext generated by mceliece 4.x is incompatible with that of mceliece 3.x, and vice versa:

    • Upgraded to McBits 2.0 and switched symmetric cypher from Salsa20 to ChaCha20.

    • Fixed a bug that sometimes caused invalid output.

    • Decreased maximum plaintext size from 403 to 106 (for consistency with ntru, as well as smaller output).

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:

  • Switched to McBits from HyMES.

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

Credits

Thanks to Shane Curran for donating the npm package name!

5.0.4

9 months ago

5.0.3

11 months ago

5.0.2

1 year ago

5.0.1

2 years ago

5.0.0

2 years ago

4.1.4

2 years ago

4.1.3

2 years ago

4.1.2

4 years ago

4.1.1

4 years ago

4.1.0

5 years ago

4.1.0-next

5 years ago

4.0.5

5 years ago

4.0.4

5 years ago

4.0.3

5 years ago

4.0.2

5 years ago

4.0.1

5 years ago

4.0.0

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.4

7 years ago

3.0.3

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.6

7 years ago

1.0.1

8 years ago

1.0.0

8 years ago