Cryptographically protected messages using the libp2p keychain
$ npm i @libp2p/cms
Loading this module through a script tag will make it's exports available as Libp2pCms
in the global namespace.
<script src="https://unpkg.com/@libp2p/cms/dist/index.min.js"></script>
- Uses PKCS 7: CMS (aka RFC 5652) to provide cryptographically protected messages
- Delays reporting errors to slow down brute force attacks
CMS, aka PKCS #7 and RFC 5652, describes an encapsulation syntax for data protection. It is used to digitally sign, digest, authenticate, or encrypt arbitrary message content. Basically, cms.encrypt
creates a DER message that can be only be read by someone holding the private key.
Licensed under either of
- Apache 2.0, (LICENSE-APACHE / http://www.apache.org/licenses/LICENSE-2.0)
- MIT (LICENSE-MIT / http://opensource.org/licenses/MIT)
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.