miscreant.js !Latest Versionnpm-shieldnpm-link !Build Statusbuild-imagebuild-link !Known Vulnerabilitiessnyk-imagesnyk-link !MIT licensedlicense-imagelicense-link !Gitter Chatgitter-imagegitter-link
The best crypto you've never heard of, brought to you by Phil Rogaway
AES-SIV provides nonce-reuse misuse-resistance (NRMR): accidentally reusing a nonce with this construction is not a security catastrophe, unlike it is with more popular AES encryption modes like AES-GCM. With AES-SIV, the worst outcome of reusing a nonce is an attacker can see you've sent the same plaintext twice, as opposed to almost all other AES modes where it can facilitate chosen ciphertext attacks and/or full plaintext recovery.
For more information, see the toplevel README.md.
Help and DiscussionHave questions? Want to suggest a feature or change?
Security NoticeThough this library is written by cryptographic professionals, it has not undergone a thorough security audit, and cryptographic professionals are still humans that make mistakes. Use this library at your own risk.
By default only the Web Crypto versions will be used, and an exception raised if Web Crypto is not available. Users of this library may opt into using the polyfills in environments where Web Crypto is unavailable, but see the security notes below and understand the potential risks before doing so.
Web Crypto Security NotesThe Web Crypto API should provide access to high-quality implementations of the underlying cryptographic primitive functions used by this library in most modern browsers, implemented in optimized native code.
On Node.js, you will need a native WebCrypto provider such as node-webcrypto-ossl to utilize native code implementations of the underlying ciphers instead of the polyfills. However, please see the security warning on this package before using it.
Polyfill Security WarningThe AES polyfill implementation (off by default, see above) uses table lookups and is therefore not constant time. This means there's potential that co-tenant or even remote attackers may be able to measure minute timing variations and use them to recover AES keys.
If at all possible, use the Web Crypto implementation instead of the polyfills.
npm install miscreant
yarn install miscreant
Import Miscreant into your project with:
import * as miscreant from "miscreant";
DocumentationPlease see the Miscreant Wiki for API documentation.
Code of ConductWe abide by the Contributor Covenantcc and ask that you do as well.
For more information, please see CODEOFCONDUCT.md.
ContributingBug reports and pull requests are welcome on GitHub at https://github.com/miscreant/miscreant
CopyrightCopyright (c) 2017-2018 The Miscreant DevelopersAUTHORS.
AES polyfill implementation derived from the Go standard library: Copyright (c) 2012 The Go Authors. All rights reserved.
See LICENSE.txt for further details.