This package is part of NDNts, Named Data Networking libraries for the modern web.
This package provides signing algorithms, encryption algorithms, and certificate management features.
The implementation uses Web Crypto API.
This package implements signature types defined in NDN Packet Format 0.3:
Both Interest and Data are signable.
Several functions accept an
algoList argument that contains the crypto algorithms it can recognize.
Typically, the default value of this argument is
These slim lists include only ECDSA algorithm, which is the most commonly used in NDN applications.
If you need to use other algorithms or communicate with applications that use other algorithms, you should pass
CryptoAlgorithmListFull to these functions.
These full lists include all algorithms implemented in NDNts.
If you know which algorithms are needed, you can import individual algorithms and pass an array of desired algorithms.
This design is a trade-off for reducing browser bundle size.
Certificate class provides basic operations with NDN Certificate Format 2.0.
PublicKeyfor RSASSA-PKCS1-v1_5, ECDSA, Ed25519
KeyChain class provides storage of
It could be ephemeral or persistent.
KeyChain.createTemp() creates an in-memory ephemeral keychain.
KeyChain.open(locator) opens a persistent keychain.
Persistent keychain in Node.js uses JSON files as underlying storage.
The locator argument should be a filesystem directory where these files are stored.
Private keys are saved as JSON Web Key (JWK) format, so that it's important to protect the storage directory.
It is unsafe to simultaneously construct multiple
KeyChain instances on the same storage directory or access the same keychain from multiple Node.js processes.
Persistent keychain in browser uses IndexedDB API.
The locator argument determines the database name(s).
Private keys are saved as non-extractable
CryptoKey, due to Mozilla Bug 1545813.
Generated using TypeDoc