{"id":21038869,"url":"https://github.com/revelaction/stegage","last_synced_at":"2026-01-06T10:09:43.148Z","repository":{"id":57646256,"uuid":"442296695","full_name":"revelaction/stegage","owner":"revelaction","description":"stegage is a command line tool and Go library to both encrypt (with age) and conceal (with steganography) a file.","archived":false,"fork":false,"pushed_at":"2024-09-23T20:26:14.000Z","size":459,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-19T13:46:13.216Z","etag":null,"topics":["age","age-encryption","encryption","go","golang","steganography"],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/github.com/revelaction/privage","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/revelaction.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-12-27T23:25:00.000Z","updated_at":"2024-09-23T20:26:18.000Z","dependencies_parsed_at":"2022-09-26T20:22:18.619Z","dependency_job_id":"1d8e6ba1-3179-4c99-a6ac-b64b0b5134b1","html_url":"https://github.com/revelaction/stegage","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/revelaction%2Fstegage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/revelaction%2Fstegage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/revelaction%2Fstegage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/revelaction%2Fstegage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/revelaction","download_url":"https://codeload.github.com/revelaction/stegage/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234821074,"owners_count":18891975,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["age","age-encryption","encryption","go","golang","steganography"],"created_at":"2024-11-19T13:36:43.114Z","updated_at":"2025-10-01T04:30:42.357Z","avatar_url":"https://github.com/revelaction.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\u003cimg alt=\"stegage\" src=\"./logo.png\"/\u003e\u003c/p\u003e\n\n[![Go Reference](https://pkg.go.dev/badge/github.com/revelaction/stegage)](https://pkg.go.dev/github.com/revelaction/stegage)\n[![Test](https://github.com/revelaction/stegage/actions/workflows/test.yml/badge.svg)](https://github.com/revelaction/stegage/actions/workflows/test.yml)\n[![Build](https://github.com/revelaction/stegage/actions/workflows/build.yml/badge.svg)](https://github.com/revelaction/stegage/actions/workflows/build.yml)\n[![Go Report Card](https://goreportcard.com/badge/github.com/revelaction/stegage)](https://goreportcard.com/report/github.com/revelaction/stegage)\n[![GitHub Release](https://img.shields.io/github/v/release/revelaction/stegage?style=flat)]() \n[![GitHub Release](https://img.shields.io/badge/built_with-Go-00ADD8.svg?style=flat)]()\n![sloc](https://sloc.xyz/github/revelaction/stegage)\n\n\n\n\n**stegage** is a command line tool and Go library to both encrypt\n(with [age](https://github.com/FiloSottile/age)) and conceal\n(with [steganography](https://github.com/auyer/steganography)) a file.\n\n\n| Original image             |Encoded image with the encrypted file inside |\n| -------------------- | ------------------|\n| ![Original File](testdata/stegage.jpeg)  | ![Encoded File](testdata/stegage_encoded.png)\n\n\n\n## How it works\n\n### encode\n\n**stegage** encrypts a file (f.ex. `doc.txt`) with a passphrase and embeds the\nencrypted file inside an image (f.ex. `stegage.jpeg`. The resulting image `stegage_encoded.png` is\nvisually identical to the original image `stegage.jpeg`.\n\n    ┌────────────┐              ┌────────────┐\n    │    doc.txt │    encrypt   │ doc.txt.enc│\n    │            ├─────────────►│            ├────┐\n    │            │              │            │    │          ┌─────────────────────────────────┐\n    │            │              │            │    │          │              stegage_encoded.png│\n    └────────────┘              └────────────┘    │  stegano │                                 │\n                                                  │  graphy  │                                 │\n              ┌─────────────────────────────────┐ ├─────────►│   ┌────────────┐                │\n              │                    stegage.jpeg │ │          │   │ doc.txt.enc│                │\n              │                                 │ │          │   │            │                │\n              │                                 │ │          │   │            │                │\n              │                                 │ │          │   │            │                │\n              │                                 │ │          │   └────────────┘                │\n              │                                 ├─┘          │                                 │\n              │                                 │            └─────────────────────────────────┘\n              │                                 │\n              │                                 │\n              │                                 │\n              └─────────────────────────────────┘\n\n\nThe supported image formats for embedding are `jpeg` and `png`. The resulting image format is always `png`.\n\n### decode\n\n**stegage** extracts the encrypted file from the embedding image and decrypts it. \n\n\n    ┌─────────────────────────────────┐\n    │              stegage_encoded.png│\n    │                                 │                 ┌────────────┐            ┌────────────┐\n    │                                 │                 │ doc.txt.enc│            │    doc.txt │\n    │   ┌────────────┐                │  steganography  │            │  decrypt   │            │\n    │   │ doc.txt.enc│                ├────────────────►│            ├───────────►│            │\n    │   │            │                │                 │            │            │            │\n    │   │            │                │                 └────────────┘            └────────────┘\n    │   │            │                │\n    │   └────────────┘                │\n    │                                 │\n    └─────────────────────────────────┘\n\n\n## Usage\n\n### encode \n\nEncrypt the file `doc.txt` and embed the encrypted payload in a copy of\n`stegage.png`.  Save the copy to the file `stegage_encoded.png`. \n\n```bash\n⤷ stegage encode --inside stegage.png doc.txt \u003e stegage_encoded.png \nEnter passphrase:\nConfirm passphrase:\n```\n\n\n### decode\n\nExtract the encrypted payload from the file `stegage_encoded.png` and decrypt\nit. Save the decrypted payload to the file `doc.txt` \n\n```console\n⤷ stegage decode stegage_encoded.png \u003e  doc.txt\nEnter passphrase:\n```\n\n## Installation\n\n### Official binary Releases\n\nYou can download the latest release versions of stegage from the [stegage\nrelease page.](https://github.com/revelaction/stegage/releases/)\n\n\n### Build from source\nIf your system has Go 1.17+:\n\n```console\ngo install github.com/revelaction/stegage/cmd...@v0.7.1-beta\n```\n \n## Library Usage\n\n### encode\n\n```go\n// error handling omitted for brevity. See ./cmd/stegage/main.go for a real example\nimage, _ := os.Open(image.png) \n\npassphrase:= strings.NewReader(\"aj4@7%8821vja\")\ndata, _ := os.Open(\"doc.txt\")\n\nout, _ := os.Create(\"encoded.png\") \n\nerr := stegage.Encode(passphrase, data, image, out); err != nil {\n\tfmt.Printf(\"stegage: error encoding: %v\", err)\n}\n```\n### decode\n\n```go\nimageEncoded, _ := os.Open(image_encoded.png)\npassphrase := strings.NewReader(\"aj4@7%8821vja\")\nout, _ := os.Create(\"doc.txt\") \n\nerr := stegage.Decode(passphrase, imageEncoded, out); err != nil {\n\tfmt.Printf(\"stegage: error decoding: %v\", err)\n}\n```\n\n## Bash Completion\n\n`stegage` has builtin bash autocompletion. You can enable it by putting the following bash\nsnippet in your `.bashrc` file:\n\n```console\nif hash stegage; then\n\tPROG=stegage source \u003c(stegage bash)\nfi\n```\n## Command line options\n\n```console\n⤷ stegage help\nNAME:\n   stegage - encrypt and conceal (steganography) a file\n\nUSAGE:\n   stegage [global options] command [command options] [arguments...]\n\nCOMMANDS:\n   encode, e  Encrypt a file with age and additionally conceal with steganography\n   decode, d  Decrypt an age encrypted file inside of an image file\n   bash       Dump bash complete script\n   help, h    Shows a list of commands or help for one command\n\nGLOBAL OPTIONS:\n   --help, -h  show help (default: false)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frevelaction%2Fstegage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frevelaction%2Fstegage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frevelaction%2Fstegage/lists"}