New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

pockenacci

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pockenacci

a quick PoC JS implementation of Justin Troutman's [Pockenacci](https://github.com/justintroutman/pocketblock/blob/master/pockenacci.md) block cipher

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

pockenacci

a quick PoC JS implementation of Justin Troutman's Pockenacci block cipher

const Pockenacci = require('.')

const pockenacci = new Pockenacci()

pockenacci.setKey('SECRET')

const { ciphertext, mac } = pockenacci.encrypt(
  'THIS IS A SECRET MESSAGE THAT WE NEED TO HIDE we really need to hide it'
)
/*
ciphertext:
  1EMOIM MS1KM0 LEIU1K 1HVYQI OSPNZ1 0D4SQM
  5TV355 5L43PM 5DT35M 1E5OIM QY53M5 LX5UZ5

mac:
  084189 676048 088240 286468 648248 666060
  868047 468089 608000 888040 648664 680664
*/

try {
  const { plaintext } = pockenacci.decrypt(ciphertext, mac, 'SECRET')
} catch (e) {
  // throws on invalid mac
}

/*
plaintext:
  THIS IS A SECRET MESSAGE THAT WE NEED TO HIDE we really need to hide it
*/

todo

  • key expansion
  • encryption
  • mac checking
  • decryption

License

MIT

FAQs

Package last updated on 15 Jan 2020

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