3.0.4 • Published 9 months ago

sphincs v3.0.4

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

sphincs

Overview

The SPHINCS+ post-quantum cryptographic signing scheme compiled to WebAssembly using Emscripten. A simple JavaScript wrapper is provided to make SPHINCS+ easy to use in Web applications.

The default parameter set is SPHINCS+-SHAKE-256s-robust (roughly 256-bit strength).

N.B. Unless interoperability with other SPHINCS+ implementations is a hard requirement, it is recommended to use supersphincs instead.

Example Usage

import {sphincs} from 'sphincs';

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

const message /*: Uint8Array */ =
	new Uint8Array([104, 101, 108, 108, 111, 0]) // "hello"
;

/* Combined signatures */

const signed /*: Uint8Array */ =
	await sphincs.sign(message, keyPair.privateKey)
;

const verified /*: Uint8Array */ =
	await sphincs.open(signed, keyPair.publicKey) // same as message
;

/* Detached signatures */

const signature /*: Uint8Array */ =
	await sphincs.signDetached(message, keyPair.privateKey)
;

const isValid /*: boolean */ =
	await sphincs.verifyDetached(signature, message, keyPair.publicKey) // true
;

console.log(keyPair);
console.log(message);
console.log(signed);
console.log(verified);
console.log(signature);
console.log(isValid);

Changelog

Breaking changes in major versions:

3.0.0:

  • Upgraded from SPHINCS to SPHINCS+. For backwards compatibility with previous versions of this package, use sphincs-legacy.

2.0.0:

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

9 months ago

3.0.3

11 months ago

3.0.2

1 year ago

2.4.3

2 years ago

2.4.2

2 years ago

3.0.1

2 years ago

3.0.0

2 years ago

2.4.1

4 years ago

2.4.0

4 years ago

2.3.2

4 years ago

2.3.1

5 years ago

2.3.0

5 years ago

2.3.0-next

5 years ago

2.2.3

5 years ago

2.2.2

5 years ago

2.1.11-debug

6 years ago

2.1.10-debug

6 years ago

2.2.1

6 years ago

2.1.9-debug

6 years ago

2.2.0

6 years ago

2.1.8-debug

6 years ago

2.1.7-debug

6 years ago

2.1.6-debug

6 years ago

2.1.5

6 years ago

2.1.4

6 years ago

2.1.3

6 years ago

2.1.2

6 years ago

2.1.1

6 years ago

2.1.0

7 years ago

2.0.3

7 years ago

2.0.2

7 years ago

2.0.1

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