• Stars
    star
    555
  • Rank 79,577 (Top 2 %)
  • Language
    Go
  • License
    MIT License
  • Created about 7 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

JPEG steganography

jsteg

GoDoc Go Report Card

go get lukechampine.com/jsteg

jsteg is a package for hiding data inside jpeg files, a technique known as steganography. This is accomplished by copying each bit of the data into the least-significant bits of the image. The amount of data that can be hidden depends on the filesize of the jpeg; it takes about 10-14 bytes of jpeg to store each byte of the hidden data.

Example

// open an existing jpeg
f, _ := os.Open(filename)
img, _ := jpeg.Decode(f)

// add hidden data to it
out, _ := os.Create(outfilename)
data := []byte("my secret data")
jsteg.Hide(out, img, data, nil)

// read hidden data:
hidden, _ := jsteg.Reveal(out)

Note that the data is not demarcated in any way; the caller is responsible for determining which bytes of hidden it cares about. The easiest way to do this is to prepend the data with its length.

A jsteg command is included, providing a simple wrapper around the functions of this package. It can hide and reveal data in jpeg files and supports input/output redirection. It automatically handles length prefixes and uses a magic header to identify jpegs that were produced by jsteg.

A more narrowly-focused command named slink is also included. slink embeds a public key in a jpeg, and makes it easy to sign data and verify signatures using keypairs derived from password strings. See cmd/slink for a full description.

Binaries for both commands can be found here.


This package reuses a significant amount of code from the image/jpeg package. The BSD-style license that governs the use of that code can be found in the go_LICENSE file.

More Repositories

1

blake3

A pure-Go implementation of the BLAKE3 cryptographic hash function
Assembly
314
star
2

geiger

A Geiger counter for allocations
Go
269
star
3

uint128

uint128 for Go
Go
212
star
4

stm

Software Transactional Memory in Go
Go
190
star
5

freeze

An immutability helper for Go
Go
138
star
6

ply

Painless polymorphism
Go
119
star
7

frand

A fast userspace CSPRNG
Go
81
star
8

lthash

A homomorphic hash function
Go
70
star
9

fastxor

The fastest way to xor bytes in Go
Go
69
star
10

few

Fastest Encoder in the West
Go
64
star
11

randmap

Truly random map access and iteration for Go (OUTDATED -- FOR EDUCATIONAL PURPOSES ONLY)
Go
61
star
12

flagg

Barebones subcommand handling
Go
56
star
13

intersort

Sort anything.
Go
55
star
14

us

An alternative interface to Sia
Go
54
star
15

noescape

Promise to the Go compiler that your Reads and Writes are well-behaved
Go
51
star
16

advent

Advent of Code solutions
Go
38
star
17

rote

A flashcard app for Landscape
JavaScript
31
star
18

goldilocks

Find your habitable zone
JavaScript
28
star
19

hey

Hey!
Go
22
star
20

slouch

A competitive programming language (WIP -- MAY CONTAIN HIDEOUS CODE)
Go
20
star
21

jr

A tiny Command Line Interface JavaScript Object Notation Remote Procedure Call client
Go
16
star
22

user

A CLI renter for Sia
Go
12
star
23

walrus

A wallet server for Sia
Go
12
star
24

go-urbit

Go + Urbit
Go
11
star
25

muse

A contract server for Sia
Go
10
star
26

ascon

Go
6
star
27

httprpc

An HTTP wrapper for net/rpc
Go
6
star
28

ADHN

Inline summaries on the HN front page
JavaScript
5
star
29

nock

A simple Nock interpreter in Go
Go
5
star
30

caller

Nicely-formatted callstack strings
Go
5
star
31

walrus-cli

A client for the walrus wallet server
Go
3
star
32

mkvsynth

Linux Video Processing
C
3
star
33

Streaming-Merkle-Trees-Paper

TeX
2
star
34

tenten

A 1010! AI
Go
2
star
35

pool

Go
2
star
36

threadgroup

A shutdown facilitator for Go
Go
2
star
37

shard

A host announcement relay daemon for Sia
Go
2
star
38

dispel

A searchable online image database
Go
2
star
39

silicon

modal fork of sandy
C
1
star
40

jj

The JSON Journal
Go
1
star
41

0hh1

Automated solver for http://0hh1.com
Go
1
star
42

algo

Fooling around with animation in Go
Go
1
star
43

sialedger

Go interface to the Sia Ledger Nano S app
Go
1
star
44

upnp

Go
1
star
45

us-bindings

Various bindings for https://github.com/lukechampine/us
Go
1
star
46

mjson

Modify JSON super fast
Go
1
star