https://github.com/hamidzr/speckjs
Speck block cipher implementation in Javascript
https://github.com/hamidzr/speckjs
cipher javascript speck
Last synced: 3 months ago
JSON representation
Speck block cipher implementation in Javascript
- Host: GitHub
- URL: https://github.com/hamidzr/speckjs
- Owner: hamidzr
- Created: 2018-09-10T19:41:30.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-11-08T20:12:19.000Z (over 6 years ago)
- Last Synced: 2025-01-21T00:45:43.121Z (5 months ago)
- Topics: cipher, javascript, speck
- Language: JavaScript
- Homepage:
- Size: 63.5 KB
- Stars: 0
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# JS Speck Cipher Implementation
## Gotchas in JS
- `%` is the remainder operator and not modulo
### Bitwise operations in JavaScript
Ref: [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Bitwise_Operators)
- 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