Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/WolframHempel/speaking-jpg
A nonsense way to hide encrypted text messages inside jpegs
https://github.com/WolframHempel/speaking-jpg
Last synced: 3 months ago
JSON representation
A nonsense way to hide encrypted text messages inside jpegs
- Host: GitHub
- URL: https://github.com/WolframHempel/speaking-jpg
- Owner: WolframHempel
- License: mit
- Created: 2017-07-22T08:11:50.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-07-27T14:48:42.000Z (over 7 years ago)
- Last Synced: 2024-07-18T04:33:50.025Z (4 months ago)
- Language: JavaScript
- Size: 98.6 KB
- Stars: 188
- Watchers: 10
- Forks: 7
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# speaking-jpg
A simple tool to hide encrypted text messages inside jpeg images.## Why?
I stumbled upon [a comment on Hackernews](https://news.ycombinator.com/item?id=14825675) the other day. A secure messaging app that used Tor just passed a security audit and the commenter argued that while this would be safe, once your phone is seized by authorities your use of Tor for messaging would stick out like a sore thumb.So why not use something way less conspicuous? Speaking-jpg allows you to embed messages in normal jpeg images that can be uploaded and shared via email or social media. Only if the counterparty knows that a message is contained AND has the same key they can retrieve and decrypt the message.
## Installation:
```
npm install speaking-jpg -g
```## Usage
Embed a message into a jpg```shell
speaking-jpg create
--in=path/to/img.jpg
--out=path/to/manipulatedimg.jpg
--msg="message you want to embed"
--key="encryptionpassword"
```Read a message from a jpg
```shell
speaking-jpg read
--in=path/to/img.jpg
--key="encryptionpassword"
```## Limitations
- Max message length is 65,000 bytes (Sixty-Five-Thousand)
- Image processing (e.g. resizing upon upload) might strip out the comment.## How does it work?
speaking jpg embeds a comment byte marker into the jpg's meta data section, followed by the total length and a random byte series to identify the comment as speaking-jpg one. Image viewers ignore this segment when parsing the file.The message itself is stored as aes-256-ctr encrypted utf8 bytes.
## Example
### Before:
![img](https://user-images.githubusercontent.com/5931248/28672046-7c10d624-72d6-11e7-8776-60c838c3d297.jpg)
### After:
![hello-world](https://user-images.githubusercontent.com/5931248/28672058-84ccac84-72d6-11e7-8a47-3e37fa1cbc4b.jpg)Note how the unedited image will look identical visually to the edited image.
![image](https://user-images.githubusercontent.com/5931248/28672335-64d87704-72d7-11e7-882b-d6869be64b9a.png)