{"id":13562251,"url":"https://github.com/NotCompsky/bpcs","last_synced_at":"2025-04-03T18:33:11.075Z","repository":{"id":56870618,"uuid":"293946862","full_name":"NotCompsky/bpcs","owner":"NotCompsky","description":"Bit-Plane Complexity Steganography","archived":false,"fork":false,"pushed_at":"2020-10-26T10:34:47.000Z","size":649,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-11-04T14:44:36.741Z","etag":null,"topics":["png","steg","steganography","steganography-library","stego"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NotCompsky.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-09-08T23:04:41.000Z","updated_at":"2022-08-20T00:53:24.000Z","dependencies_parsed_at":"2022-08-20T12:10:47.511Z","dependency_job_id":null,"html_url":"https://github.com/NotCompsky/bpcs","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NotCompsky%2Fbpcs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NotCompsky%2Fbpcs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NotCompsky%2Fbpcs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NotCompsky%2Fbpcs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NotCompsky","download_url":"https://codeload.github.com/NotCompsky/bpcs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247056980,"owners_count":20876489,"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":["png","steg","steganography","steganography-library","stego"],"created_at":"2024-08-01T13:01:06.279Z","updated_at":"2025-04-03T18:33:06.061Z","avatar_url":"https://github.com/NotCompsky.png","language":"C++","funding_links":[],"categories":["C++"],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n\t\u003ch1 align=\"center\"\u003ebpcs\u003c/h1\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n\t\u003ca href=\"LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/github/license/NotCompsky/bpcs\"/\u003e\u003c/a\u003e\n\t\u003ca href=\"https://github.com/notcompsky/bpcs/releases\"\u003e\u003cimg src=\"https://img.shields.io/github/v/release/NotCompsky/bpcs\"/\u003e\u003c/a\u003e\n\t\u003ca href=\"https://hub.docker.com/repository/docker/notcompsky/bpcs/tags\"\u003e\u003cimg src=\"https://img.shields.io/docker/image-size/notcompsky/bpcs?label=Docker%20image\"/\u003e\u003c/a\u003e\n\t\u003ca href=\"https://github.com/notcompsky/bpcs/graphs/commit-activity\"\u003e\u003cimg src=\"https://img.shields.io/github/commit-activity/w/NotCompsky/bpcs\"/\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cfigure class=\"image\"\u003e\n\t\u003cimg src=\"https://user-images.githubusercontent.com/30552567/93227238-12abd080-f76c-11ea-8243-65ccb365759c.png\"/\u003e\n\t\u003cfigcaption\u003eThis entire repository, along with portable binaries for Linux, are contained - encrypted - in this vessel image. Photograph colourised by Marina Amaral.\u003c/figcaption\u003e\n\u003c/figure\u003e\n\n# INTRODUCTION\n\nBit Plane Complexity Segmentation (BPCS) steganography is a method of embedding a message file in an image through replacing the most \"complex\" regions with the data from the message file.\n\nThe idea behind it is that these complex grids appear as noise to the human eye.\n\nThe main draw of this method is the efficiency of data embedding. With sensible vessel images - for instance, pictures taken by cameras rather than digital cartoons - one can replace almost half of the vessel image with embedded data without visibly altering its appearance.\n\n# COMPATIBILITY\n\nThe code should work on Windows and all modern UNIX platforms. Windows has slightly more overhead due to lacking several kernel features (`sendfile` and `splice`). BSD and MacOS have not been tested, however they should be fine, and if not a workaround will be easy to implement.\n\n# IMPLEMENTATION\n\nThis project at its core is an implementation of the method Khaire and Nalbalwar in Shrikant Khaire et. al describe in \"Review: Steganography – Bit Plane Complexity Segmentation (BPCS) Technique\" in the International Journal of Engineering Science and Technology Vol. 2(9), 2010, 4860-4868.\n\nThe image is split into its constituent channels, and these into their consitutent bitplanes. The average image has a bit-depth of 8 and 3 channels, so gives us 24 bitplanes to work with.\n\nEach bitplane is split up into 8x8 grids, each of which is assigned a 'complexity', where 'complexity' is defined as the sum of the changes in value (from 0 to 1 or vice versa) of horizontally and vertically adjacent elements.\n\nThose whose 'complexity' is above a specified threshold will be entirely written over with data. If the resulting grid's complexity falls below the threshold, it is 'conjugated' such that its complexity again rises above the threshold (and is therefore retrievable).\n\n# USES\n\nSteganography in general has a variety of uses. For instance:\n\n    * Watermarking copywrited materials so that its source can be tracked in the event of piracy\n    * Watermarking banknotes designs to allow compliant software to refuse to edit them\n    * Watermarking printer pages to embed serial numbers and datetime stamps.\n    * Skirting firewall rules (with infiltrating/exfiltrating of data over embedded transport layers)\n    * Online puzzles\n    * Obfuscating code that is to be executed\n\nDue to its high efficiency and throughput - in a good image, roughly 50% of the vessel image's size can be used to store the hidden data, and even a single CPU thread has a throughput of 5MB/s without GPU acceleration - BPCS is viable for many applications where other stego techniques simply are not, such as streaming 4K video over HTTP using PNG images.\n\nThe efficiency depends very highly on the vessel images used. Some images can handily fit their originals within themselves, sometimes even resulting in a smaller file size.\n\nIn my view, BPCS steganography is not resilient to stego analysis; it is more difficult to detect than trivial stego techniques such as LSB, but it is not designed to evade detection, unlike [steghide](http://steghide.sourceforge.net/).\n\n# FEATURES\n\n    * High performance - between 5-10MB/s on a single CPU thread on my mid-tier machine.\n    * Any number of files can be embedded and extracted.\n    * Any encryption can be applied.\n\n# USAGE\n\nSee [the manual](doc/bpcs.1.md) for general use.\n\n# DISCLAIMER\n\nThis was my first taste of C++. I had only fleeting experience with C from writing a handful of things interacting with the Linux OS. I was self-teaching the language while creating this project, using a text editor, and a compile-run-rewrite cycle of debugging. In other words, please do not look into the commit history for inspiration of good coding practices!\n\n# LICENSE\n\n[AGPLv3](LICENSE)\n\n# BENCHMARKS\n\nCompared to [steghide](http://steghide.sourceforge.net/), this program has around 5x storage efficiency, and 50x more throughput (over 5MB/s, compared to 100KB/s, on my machine). However, steghide uses a very different method that I suspect is more resistant to steganalysis.\n\n# SEE ALSO\n\nA [BPCS implementation in python](https://github.com/mobeets/bpcs)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FNotCompsky%2Fbpcs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FNotCompsky%2Fbpcs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FNotCompsky%2Fbpcs/lists"}