Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

miscreant

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

miscreant - npm Package Compare versions

Comparing version 0.0.0 to 0.1.0

js.iml

38

LICENSE.txt

@@ -1,23 +0,27 @@

This software is licensed under the MIT license:
Copyright (c) 2017 The Miscreant Developers. The canonical list of project
contributors who hold copyright over the project can be found at:
Copyright (C) 2016-2017 Dmitry Chestnykh, The Miscreant Developers
https://github.com/miscreant/miscreant/blob/master/AUTHORS.md
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
MIT License
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
---

@@ -24,0 +28,0 @@

{
"name": "miscreant",
"version": "0.0.0",
"description": "Misuse resistant symmetric encryption using the AES-SIV (RFC 5297) and CHAIN constructions",
"version": "0.1.0",
"description": "Misuse resistant symmetric encryption using the AES-SIV (RFC 5297) and CHAIN/STREAM constructions",
"homepage": "https://github.com/miscreant/miscreant/tree/master/js/",

@@ -6,0 +6,0 @@ "main": "index.js",

@@ -1,2 +0,2 @@

# miscreant.js [![Latest Version][npm-shield]][npm-link] [![Build Status][build-image]][build-link] [![Known Vulnerabilities][snyk-image]][snyk-link] [![MIT licensed][license-image]][license-link]
# miscreant.js [![Latest Version][npm-shield]][npm-link] [![Build Status][build-image]][build-link] [![Known Vulnerabilities][snyk-image]][snyk-link] [![MIT licensed][license-image]][license-link] [![Gitter Chat][gitter-image]][gitter-link]

@@ -11,2 +11,4 @@ [npm-shield]: https://img.shields.io/npm/v/miscreant.svg

[license-link]: https://github.com/miscreant/miscreant/blob/master/LICENSE.txt
[gitter-image]: https://badges.gitter.im/badge.svg
[gitter-link]: https://gitter.im/miscreant/Lobby

@@ -16,3 +18,3 @@ > The best crypto you've never heard of, brought to you by [Phil Rogaway]

JavaScript-compatible TypeScript implementation of **Miscreant**:
Advanced symmetric encryption using the [AES-SIV] ([RFC 5297]) and [CHAIN]
Advanced symmetric encryption using the [AES-SIV] ([RFC 5297]) and [CHAIN/STREAM]
constructions, providing easy-to-use (or rather, hard-to-misuse) encryption of

@@ -34,3 +36,3 @@ individual messages or message streams.

[RFC 5297]: https://tools.ietf.org/html/rfc5297
[CHAIN]: http://web.cs.ucdavis.edu/~rogaway/papers/oae.pdf
[CHAIN/STREAM]: http://web.cs.ucdavis.edu/~rogaway/papers/oae.pdf
[nonce-reuse misuse-resistance]: https://www.lvh.io/posts/nonce-misuse-resistance-101.html

@@ -46,7 +48,7 @@ [AES-GCM]: https://en.wikipedia.org/wiki/Galois/Counter_Mode

* [Gitter]: web-based chat about miscreant projects including **miscreant.js**
* [Google Group]: join via web or email ([miscreant+subscribe@googlegroups.com])
* [Google Group]: join via web or email ([miscreant-crypto+subscribe@googlegroups.com])
[Gitter]: https://gitter.im/miscreant/Lobby
[Google Group]: https://groups.google.com/forum/#!forum/miscreant
[miscreant+subscribe@googlegroups.com]: mailto:miscreant+subscribe@googlegroups.com
[Google Group]: https://groups.google.com/forum/#!forum/miscreant-crypto
[miscreant-crypto+subscribe@googlegroups.com]: mailto:miscreant-crypto+subscribe@googlegroups.com?subject=subscribe

@@ -295,3 +297,7 @@ ## Security Notice

Copyright (c) 2016-2017 Dmitry Chestnykh, [The Miscreant Developers][AUTHORS].
Copyright (c) 2017 [The Miscreant Developers][AUTHORS].
AES polyfill implementation derived from the Go standard library:
Copyright (c) 2012 The Go Authors. All rights reserved.
See [LICENSE.txt] for further details.

@@ -298,0 +304,0 @@

@@ -77,3 +77,3 @@ // Copyright (C) 2016 Dmitry Chestnykh

for (let i = counter.length - 1; i >= 0; i--) {
carry = carry + (counter[i] & 0xff) | 0;
carry += (counter[i] & 0xff) | 0;
counter[i] = carry & 0xff;

@@ -80,0 +80,0 @@ carry >>>= 8;

@@ -1,2 +0,2 @@

/** miscreant.ts: The AES-SIV encryption mode and CHAIN chaining mode */
/** miscreant.ts: Main entry point to the Miscreant library */

@@ -9,3 +9,3 @@ import { ISivLike } from "./internal/interfaces";

/** Common interface to AES-SIV algorithms */
/** Miscreant: A misuse-resistant symmetric encryption library */
export default class Miscreant {

@@ -12,0 +12,0 @@ /** Import a key for the given algorithm. Valid algorithms: "AES-SIV" */

@@ -24,4 +24,4 @@ // Copyright (C) 2016 Dmitry Chestnykh

const mac = new PolyfillAesCmac(new PolyfillAes(v.key));
await mac.update(v.input);
expect(await mac.finish()).to.eql(v.result);
await mac.update(v.message);
expect(await mac.finish()).to.eql(v.tag);
}

@@ -41,6 +41,6 @@ }

const mac = await WebCryptoAesCmac.importKey(v.key, new WebCrypto());
await mac.update(v.input);
expect(await mac.finish()).to.eql(v.result);
await mac.update(v.message);
expect(await mac.finish()).to.eql(v.tag);
}
}
}

@@ -24,4 +24,4 @@ // Copyright (C) 2016 Dmitry Chestnykh

const ctrPolyfill = new PolyfillAesCtr(new PolyfillAes(v.key));
let ciphertext = await ctrPolyfill.encrypt(v.iv, v.src);
expect(ciphertext).to.eql(v.dst);
let ciphertext = await ctrPolyfill.encrypt(v.iv, v.plaintext);
expect(ciphertext).to.eql(v.ciphertext);
}

@@ -41,6 +41,6 @@ }

const ctrNative = await WebCryptoAesCtr.importKey(v.key, new WebCrypto());
let ciphertext = await ctrNative.encrypt(v.iv, v.src);
expect(ciphertext).to.eql(v.dst);
let ciphertext = await ctrNative.encrypt(v.iv, v.plaintext);
expect(ciphertext).to.eql(v.ciphertext);
}
}
}

@@ -54,4 +54,4 @@ import * as fs from "async-file";

public readonly iv: Uint8Array;
public readonly src: Uint8Array;
public readonly dst: Uint8Array;
public readonly plaintext: Uint8Array;
public readonly ciphertext: Uint8Array;

@@ -76,4 +76,4 @@ static async loadAll(): Promise<AesCtrExample[]> {

public readonly key: Uint8Array;
public readonly input: Uint8Array;
public readonly result: Uint8Array;
public readonly message: Uint8Array;
public readonly tag: Uint8Array;

@@ -80,0 +80,0 @@ static async loadAll(): Promise<AesCmacExample[]> {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc