NetsBlox / speckjs

Speck block cipher implementation in Javascript

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

JS Speck Cipher Implementation

Gotchas in JS

  • % is the remainder operator and not modulo

Bitwise operations in JavaScript

Ref: MDN

  • Bitwise operators perform their operations on binary representations, but they return standard JavaScript numerical values.
  • JavaScript does not have an unsigned int
  • The operand of all bitwise operators are converted to singed 32-bit integers in two's complement format.
  • << and >> operate on signed int whereas >>> operates as if the number is unsigned

TODO

  • remove bitwise package dep
  • add more tests for circular shifts and remove the extras
  • refactor expand key

About

Speck block cipher implementation in Javascript


Languages

Language:JavaScript 100.0%