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

abes

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

abes

Arbitrary block length cipher and decipher class.

  • 0.1.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

In a Nutshell

This is a block cipher algorithm that implements arbitrary length block size that does not have to be byte aligned. The bit pushing is based on BitBuf package and cipher itself is a Feistel network cipher that uses a cryptographic hash function as a mixed (except for 1 bit block size, which uses just one bit from hash and XORs it to the input).

Reference

Abes(key, blockLenBits, options)

const Abes = require('abes');
const BitBuf = require('bitbuf');
const assert = require('assert');

var x = new Abes('verysecret', 11);
var p1 = BitBuf.from('10110111000');
var c = x.encrypt(p1);
var p2 = x.decrypt(c);
assert.equal(p1.toString(), p2.toString());

Just figure it out. Also key can be an arbitrary length BitBuf. Only one block is encrypted or decrypted at the time.

Author

Timo J. Rinne tri@iki.fi

License

GPL-2.0

Keywords

FAQs

Package last updated on 05 Jan 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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