MCPcopy Create free account
hub / github.com/CYBERGEM777/HIDEAGEM

github.com/CYBERGEM777/HIDEAGEM @HIDEAGEM_V.1.1_LINUX

Chat with this repo
repository ↗ · DeepWiki ↗ · release HIDEAGEM_V.1.1_LINUX ↗ · + Follow
519 symbols 1,417 edges 7 files 60 documented · 12% updated 20mo agoHIDEAGEM_V.1.1_WINDOWS · 2024-04-17★ 441

Browse by type

Functions 497 Types & classes 22
What it actually does AI analysis from the code graph — generated when you open this
loading…
README
 888    888 8888888 8888888b.  8888888888        d8888  .d8888b.  8888888888 888b     d888
 888    888   888   888  "Y88b 888              d88888 d88P  Y88b 888        8888b   d8888
 888    888   888   888    888 888             d88P888 888    888 888        88888b.d88888
 8888888888   888   888    888 8888888        d88P 888 888        8888888    888Y88888P888
 888    888   888   888    888 888           d88P  888 888  88888 888        888 Y888P 888
 888    888   888   888    888 888          d88P   888 888    888 888        888  Y8P  888
 888    888   888   888  .d88P 888         d8888888888 Y88b  d88P 888        888   "   888
 888    888 8888888 8888888P"  8888888888 d88P     888  "Y8888P88 8888888888 888       888
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▄    ____ ______ ____                                      ▄                              ▄
█   /    /      \    \   HIDEAGEM STEGANOGRAPHY PLATFORM   █                  .     .     █
█  /___ /________\ ___\                                    █   .-.   .-.      '.___.'     █
█  \    \        /    /  ASTRAL SOFTWARE FROM THE FUTURE   █  (_  \ /  _)     .'   `.     █
█    \   \      /   /                                      █       |         :       :    █
█      \  \    /  /      COPYRIGHT 2024 WWW.CYBERGEM.NET   █       |         :       :    █
█        \ \  / /                                          █       |          `.___.'     █
█           \/           LET'S DO COMPUTER STUFF ALL DAY   █                              █
█                                                          █                              █
█ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ █    ._____.         .--.      █
█ MMMMMSSSSSSSSSSSSSSSSSSSSSSSSSSddMMMMMSSSSSSMSSSSSSSSSS; █      | |          /   _`.    █
█ MMMMSSSSSSSSSSSSSSSSSMSSSSS; ;SSdMMMMSSSSSSMMSSSSSSSSSS, █      | |         (_) ( )     █
█ MMSSSSSSSMSSSSSMSSSSMMMSS."-.-":MMMMMSSSSMMMMSSMSSSMMSS  █     _|_|_       '.    /      █
█ MSSSSSSSMSSSSMMMSSMMMPTMM;"-/\":MMM^"     MMMSSMMMSSMM   █    '     '        `--'       █
█ SSSSSSSMMSSMMMMMMMMMP-.MMM :  ;.;P       dMMMMMMMMMP'    █                              █
█ SSMSSSMMMSMMMMMMMMMP   :M;`:  ;.'+"""t+dMMMMMMMMMMP      █                _             █
█ MMMSSMMMMMMMMPTMMMM"""":P `.\// '    ""^^MMMMMMMP'       █      .--.     ' `:--.--.     █
█ MMMMMMPTMMMMP="TMMMsg,      \/   db`c"  dMMMMMP"         █     (    )       |  |  |_    █
█ MMMMMM  TMMM   d$$$b ^          /T$; ;-/TMMMP'  Let's    █    (_)  /        |  |  | )   █
█ MMMMM; .^`M; d$P^T$$b          :  $$ ::MMMMP  hide some  █        (_,       |  |  |/    █
█ MMMMMM   .-+d$$   $$$;         ;. $$ ;;MMMP,    Gems !   █                       (J     █
█ MMMMMMb   _d$$$   $$$$         :$$$; :MMMMMMp.           █                              █
█ MMMMMM"  " T$$$._.$$$;          T$P.'MMMSSSSSSb          █                _             █
█ MMM`TMb   -")T$$$$$$P'       `._ ""  :MMSSSMMP'          █       __      ' `:--.--.     █
█ MMM / \    '  "T$$P"           /     :MMMMMMP'           █  ___.'  '.___    |  |  |     █
█ MMSb`. ;                      "      :MMMMMM'            █  ____________    |  |  |     █
█ MMSSb_lSSSb.             .___.       MMMMMP ,d88b.d88b,  █                  |  |  | .., █
█ MMMMSSSSSSSSb.                     .MMMMMM. 88888888888  █                        `--': █
█ MMMMMMMMMMMSSSb                  .dMMMMMMMP `Y8888888Y'  █                              █
█ MMMMMMMMMMMMMSS;               .dMMMMMMMMMM'  `Y888Y'    █         ...             _    █
█ MMMMGEMMAMMMMb`;"-.          .dMMMMMMMMMMP'     `Y'      █         .':     \      /_)   █
█ MMMMMMMMMMMMMMb:   `'--.___.dMMMMMMMMMPP'                █       .'         \    /`.    █
█ MMMMMMMMMMMMMMMb;           dMMMMMMMMPPR                 █   `..'            \  /   ;   █
█ ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ █   .'`.             \/ __.'   █
█                                                          █                              █
█          ░░░░░░░░          ▒▒▒▒▒▒▒▒          ░░░░░░░░    █                              █
█       ▓▓▓░░ ████████    ███▒▒ ▓▓▓▓▓▓▓▓    ▓▓▓░░ ████████ █                 `-.    .-'   █
█    ▒▒▒▓▓ ░░ ██ ▒▒▒▒▒▒░░░██ ▒▒ ▓▓ ░░░░░░▒▒▒▓▓ ░░ ██+§¥µ██ █ .-"-._.-"-._.-     :  :      █
█ ███▒▒ ▓▓ ░░░██ ▒▒ ▓▓▓░░ ██ ▒▒▒▓▓ ░░ ███▒▒ ▓▓ ░░░██$@¢¶██ █ .-"-._.-"-._.-   --:--:--    █
█ ██ ▒▒ ▓▓▓▓▓▓███▒▒ ▓▓ ░░ ██████▓▓▓░░ ██ ▒▒ ▓▓▓▓▓▓████████ █                    :  :      █
█ ██ ▒▒▒▒▒▒▒▒    ▒▒▒▓▓ ░░░░░░░░    ░░░██ ▒▒▒▒▒▒▒▒          █                 .-'    `-.   █
█ ████████          ▓▓▓▓▓▓▓▓          ████████    CYBERGEM █                              █
▀                                                          ▀                              ▀
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀

HIDEAGEM

HIDEAGEM is an experimental tool for hiding files inside of images.

It's written in C++ and can be used via Python CLI and custom nodes in ComfyUI for Stable Diffusion.

WARNING: HIDEAGEM is experimental software! It may have unknown flaws or vulnerabilities. Use at own risk!

WARNING: HIDEAGEM has not yet been studied to determine its resistance to steganalysis (e.g. tools that calculate the probability of a hidden message being present in an image). So assume that it may be possible for adversaries to detect if an image is "suspicious."

For an in depth explanation of HIDEAGEM's algorithms and design, please see this post.

Development updates and support are available on Discord.

Objectives

Steganography is about hiding the presence of a message; it's about concealing the existence of communication.

HIDEAGEM aims to be a next-generation steganography platform, combining modern cryptographic and steganographic techniques in order to facilitate fast, secure, and robust information hiding in cover media.

In addition to pursuing the traditional objective of steganography (stealth communication), other security properties of hiding message bits in large bit collections are being explored.

Steganography Platform

HIDEAGEM is designed to be expandable and adaptable, a platform from which various steganographic algorithms and techniques can be launched to conceal data within a variety of cover media types.

New stego algorithms can be incorporated into the program over time in order to support more file types and leverage new techniques.

Features

List of general features and potential future development directions.

Current Features               |  Future Development
-------------------------------|---------------------------------------------------
Unicode passwords              |  Keyfiles
Tamper-proof Gem data          |  Mobile app
512-bit symmetric key          |  More stego algorithms
Secure Memory Handling         |  More cover media types
Multiple files per password    |  Split files across images
Multiple passwords per image   |  Web app (local execution)
Offline brute-force resistance |  Browser extension (e.g. context menu Gem extract)

Unicode Passwords

Use any crazy Unicode characters you want in your passwords: You can even use your favorite emojis; no one can stop you! 🐬

Tamper-Proof Gem Data

Note: The information below applies only to HIDEAGEM's current spatial domain algorithms that are compatible only with lossless image formats such as PNG, TIFF, and BMP.

If a Gem is successfully extracted and has the correct Gem Hash, then it is virtually guaranteed to be bit-for-bit the same Gem that you hid in the image.

If even a single bit of a Gem Pixel (a pixel that has Gem Data hidden inside of it) is corrupted then the Gem extraction will fail.

Tamper-proof comes at the cost of fragility: Small changes to Gem Images can make the data unrecoverable. They are fragile and can be broken by resizing, cropping, or mutating a pixel that contains Gem Data.

512-bit Symmetric Key

HIDEAGEM uses an experimental symmetric key system designed to work in concert with its steganographic algorithms.

The 512-bit key is generated using libsodium’s Argon2id password hashing function and the user supplied password.

Argon2id was selected because it offers configurable brute-force resistance parameters (such as memory requirements), and resistance to GPU brute-force attacks.

The Gem Data is encrypted using a 256-bit key derived from the 512-bit key, and is then hidden in the cover media using the 512-bit key. The 512-bit key must first be used to extract the entire encrypted Gem before the 256-bit key can be used to decrypt any of its bits.

You can learn more about the key system here.

NOTE:  The key's ultimate strength is only as strong as the password. A very
       long/random password is required to leverage all 512 bits of the key.

       To achieve 512 bits of entropy with a password using the ASCII character set,
       the password would have to be >= ~74 chars and each character perfectly random.

Secure Memory Handling

In order to try to mitigate potential side-channel attacks, libsodium's low level memory management functions are used to securely erase memory of keys, Gem files, and other sensitive data generated during the embed/extract processes.

It's also used to prevent sensitive data like keys from being swapped to disk.

Multiple Files Per Password

You can think of images as encrypted write-once file folders or archives.

You can hide any number of files in an image using a single password, limited only by the image's embed capacity. They'll all be extracted at once when the correct password is entered.

The Gem Stream has an overhead of 52 bytes, and each Gem File an overhead of 8 bytes.

HIDEAGEM tries to compress all Gem Files with miniz (zlib) before encrypting them, which can sometimes reduce the number of bytes embedded substantially.

The max file size per Gem File and max bytes that can be embedded per Ocean is 16 exabytes.

Multiple Passwords Per Image

HIDEAGEM currently supports hiding multiple sets of files using multiple passwords and a single image, however a UI hasn't been developed for using that feature yet.

The way it works is also a bit peculiar in that it's hierarchical: To access the next set of files you need all the passwords that came before it in addition to the file set's password.

So consider this a stealth feature that's probably not useful yet.

Offline Brute-Force Resistance

The Argon2id password hashing function is used to generate keys using the user supplied password.

The Master Key is generated using INTERACTIVE key parameters, which offers significant password brute-force resistance compared to using a regular hash function to generate the key.

Software Stack

HIDEAGEM is written in C++ and can be used in Python via a tiny API.

Custom nodes for ComfyUI Stable Diffusion platform are available, making it easy to integrate into 2D generative AI workflows.

The following external libraries are used:

libsodium

All cryptographic operations, such as Gem Data encryption, hashing, and random number generation are done using libsodium's functions.

Key Generation: BLAKE2b hashing function and Argon2id password hashing algorithm

Gem Data Encryption: XChaCha20-Poly1305 symmetric encryption algorithm (256-bit key + 192-bit nonce)

CSPRNG Implementation: BLAKE2b hash and XChaCha20 stream cipher (256-bit seed + 192-bit nonce)

Additionally, libsodium's low level memory management functions are used to manage sensitive data such as keys and Gem Files.

utf8proc

A small library for managing Unicode strings. It's used to normalize Unicode passwords so that they'll work consistently between systems.

miniz

Gem Data compression is attempted with miniz (zlib implementation) before encryption.

Potential Loss of Backwards Compatibility During Alpha

Hold on to old versions of HIDEAGEM in case you need to migrate data.

Small changes to HIDEAGEM's code during this early phase of development can break backwards compatibility. New versions of HIDEAGEM may not be able to extract Gems hidden with older versions.

This won't be an issue once the code is considered stable, as the version system will from then onwards be used to provide backwards compatibility with all previous versions.

ComfyUI Nodes

HIDEAGEM v.1 ships with with some nodes for ComfyUI. You can use them to hide Gems in your AI generated images, or any images saved on disk.

🚨 WARNING: ComfyUI's default save image node will reveal that HIDEAGEM was used in the PNG metadata !!!

It's important to use HIDEAGEM's SAVE IMAGE node, as it doesn't save that metadata to the output PNG Gem image.

The nodes come with some example workspaces showing how to use them.

When fiding Gems, the console window will require user input to save Gems to disk, so after you start a Gem find switch over to ComfyUI's console to see what the result was.

NOTE: The hide and find nodes don't handle images with an alpha channel (such as transparent PNGs) properly. For now, use HIDEAGEM via the CLI if you need to hide/find Gems in images that have alpha channels.

Building

How to compile HIDEAGEM and all dependencies from source:

Windows

  • install cmake
  • git clone --recurse-submodules https://github.com/CYBERGEM777/HIDEAGEM
  • Navigate to HIDEAGEM\builds\visual_studio\2022
  • Run SETUP.BAT
  • Open HIDEAGEM_CORE.sln in Visual Studio
  • Set configuration to Release x64
  • Build solution

Binarie

Core symbols most depended-on inside this repo

Shape

Function 321
Method 176
Class 16
Enum 6

Languages

C++96%
Python4%

Modules by API surface

dependencies/stb/stb_image.h218 symbols
include/HIDEAGEM_CORE.h156 symbols
src/HIDEAGEM_CORE.cpp73 symbols
dependencies/stb/stb_image_write.h49 symbols
extras/ComfyUI/HIDEAGEM_NODES.py18 symbols
HIDEAGEM.py5 symbols

For agents

$ claude mcp add HIDEAGEM \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page