Skip to content

xtncl/StegaCube

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🧊 StegaCube

StegaCube is a web tool for encoding short messages into Rubik’s Cube color patterns. You can use it to

  • share secret messages with cubing friends
  • hide easter eggs in YouTube videos or photos
  • add puzzle clues to escape rooms or geocaches
  • send nerdy birthday messages on actual cubes
  • use as a fun challenge in speedcubing sessions
  • place hidden notes on your desk cubes
  • confuse people for fun 🤓

🔗 Live Demo

screenshot


⚠️ What It Is / Isn’t

✅ It is:

  • A fun way to encode and decode messages using 6 cube colors
  • A funny side project inspired by cubing and curiosity
  • Useful for puzzles, geocaches, nerd jokes, and secret notes
  • A visual encoder — not cryptographically secure

❌ It’s not:

  • A secure encryption method
  • A serious steganographic tool
  • Meant for protecting sensitive data

🧠 How it Works

StegaCube encodes text messages by converting each character into a pair of Rubik’s Cube colors. Since there are 6 standard cube colors, each pair can represent one of 6×6 = 36 unique combinations — just enough to cover:

  • 26 letters (a–z)
  • space
  • 9 special characters: . ! ? @ # : / ( )

The cube face used for encoding is a 3×3 grid, with the center field always set to white. The remaining 8 tiles are filled in top-left to bottom-right, skipping the center. Every 2 tiles = 1 character, so one face can store 4 characters.

🧭 Orientation Hint

To decode a cube in the right direction:

  • The message face has a white center
  • The top center field is green

(But this is just a reading convention — you’re free to orient it however you like.)

Here’s your updated README.md section with seamless integration of the CLI tool into the original StegaCube project. It follows your format and includes your exact openssl usage example.


🔄 How to Encode Photos, Videos, Audio, or Documents

The Python script scbase36.py allows you to encode any binary data (text, files, images, encrypted blobs) into StegaCube-compatible characters using a custom 36-character alphabet.

Each character maps to a pair of Rubik’s Cube colors, making the output suitable for physical or visual cube-based encoding.

📦 Estimate How Many Cubes You Need

Use the -s flag to get a summary:

./scbase36.py -i demo.zip -s
📦 File Summary:
- File size: 487 Bytes (3896 bits)
- Encoded length: 754 characters (Base36)
- Needed cubes: 189 (1 face per cube, 4 chars each)

Encode the file

./scbase36.py -i demo.zip

Output:

bujkzj !@kb!gxph)vqmbpywxmtrpofalpbl#bl#kyzrzlwk/rmh lgwgeshcjye iu/#d)gksmx/qfj!kwfzy@s)nuhkfr aowro:d. egko/vcnyq@(vmzjgkmoeou ...

➡️ Paste this into the StegaCube visual encoder, scramble your cubes, and share them however you want.

To recover the data later:

./scbase36.py -d -i encoded.txt -o recovered.zip

⚙️ Other Examples

./scbase36.py "hello world"             # Encode a simple string
./scbase36.py -d "abcxyz123..."         # Decode a simple string
cat somefile | ./scbase36.py            # Encode from stdin
echo "xyz..." | ./scbase36.py -d        # Decode from piped input

🛡 Combine with Encryption

For secure messages, you can combine it with OpenSSL:

echo "mysecret" \
| openssl enc -aes-256-cbc -pbkdf2 \
| ./scbase36.py

You’ll be prompted for a password. Example output:

bb?kdvosq#dy?jlh#x@lztqzug@rgknyke:m!a#cl:ulfwzdj(

🔓 Decode and Decrypt

./scbase36.py -d 'bb?kdvosq#dy?jlh#x@lztqzug@rgknyke:m!a#cl:ulfwzdj(' \
| openssl enc -d -aes-256-cbc -pbkdf2

Enter the decryption password to reveal:

mysecret

📥 Requirements

  • Python 3.x
  • No dependencies
  • Works on Linux, macOS, WSL, etc.

Make it executable:

chmod +x scbase36.py

Or use it like:

python3 scbase36.py

👋 Why I Built It

One lazy Sunday afternoon, I was sitting on the couch practicing speedcubing when i wondered: “Could I hide a message inside a Rubik’s Cube?”

A few minutes later, I vibe-coded this tool — fast, imperfect, but fun. Yes, I know there’s tons of optimization potential. You could probably store a lot more data, maybe even full images, inside a single cube. But that’s a challenge for a future side project.

For now, I think it’s cool enough that you can encode real text messages using nothing but color patterns.

About

A web tool to encode and decode messages using 3×3 Rubik’s Cube color tiles

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors