← Latest papers
💻 computer science

A Deterministic Complete Graph Hill Cipher with Shift128 Residual Encryption for Universal Binary Files

This paper presents CGHC-S128, a hybrid encryption framework that combines a Complete Graph Hill Cipher with Shift128 residual encryption to securely and efficiently encrypt universal binary files of any size without padding, while ensuring mathematical key invertibility, perfect decryption, and strong resistance to cryptanalytic attacks.

Original authors: Samsul Arifin¹, Paskalis Farelnata Zamasi, Ade Kurniawan, Tiawan Tiawan, Merios Gusan Putra, Edwin Kristianto Sijabat, Dani Lukman Hakim, Dwi Wijonarko

Published 2026-07-30
📖 6 min read🧠 Deep dive

Original authors: Samsul Arifin¹, Paskalis Farelnata Zamasi, Ade Kurniawan, Tiawan Tiawan, Merios Gusan Putra, Edwin Kristianto Sijabat, Dani Lukman Hakim, Dwi Wijonarko

Original paper licensed under CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you are trying to send a secret message to a friend, but instead of just letters, you are sending a whole digital suitcase filled with photos, documents, and videos. In the world of computer security, this is called "encryption." Think of encryption like a magical lock that scrambles your suitcase so that if a thief steals it, they only see a jumbled mess of nonsense. For decades, scientists have used a classic trick called the "Hill Cipher" to do this. It works like a giant math puzzle where you multiply your message by a special grid of numbers (a matrix) to turn it into gibberish. The problem is, this old trick is a bit finicky: it's hard to find the right grid of numbers that can be easily unlocked later, and it gets very confused if your suitcase isn't the exact right size, often forcing you to stuff in extra "padding" material just to make it fit.

Now, imagine a new team of inventors who decided to fix this by looking at a different kind of math: graph theory. Instead of just guessing random number grids, they looked at a "complete graph," which is like a party where every single guest shakes hands with every other guest. They realized that the map of these handshakes creates a perfect, predictable grid that is guaranteed to be unlockable. They combined this with a simple "shift" trick for the leftover bits of data that don't fit perfectly into the main puzzle. The result is a new system called CGHC-S128, designed to lock up any digital file—whether it's a PDF, a video, or a weird binary file—without changing its size or leaving any loose ends.

The New "Party Handshake" Lock

In this study, the researchers from Institut Teknologi Sains Bandung and the University of Jember introduced a new way to protect digital files called CGHC-S128. Think of it as a two-step security system for your digital suitcase.

First, they tackle the main bulk of the file using a "Complete Graph Hill Cipher." In the old days, making a Hill Cipher key was like trying to find a specific key in a dark room full of thousands of keys; you had to keep trying until you found one that worked. This new method is smarter. It uses the structure of a "complete graph"—imagine a party where everyone knows everyone else—to create a key. Because of the way these handshakes work mathematically, the researchers proved that this key is always the right shape to be unlocked later. It's like having a master key that is guaranteed to fit the lock every single time, no guessing required.

Second, they deal with the "leftovers." Digital files are rarely the perfect size to fit neatly into these mathematical grids. Usually, you'd have to add "padding" (extra junk data) to fill the gap, which makes the file bigger. This new system uses a lightweight "Shift128" trick for the remaining bytes. Imagine if you had a few extra socks that didn't fit in the main drawer; instead of throwing them away or stuffing them in a box, you just slide them into a special side pocket that shifts their position. This ensures every single byte of your file is protected without adding any extra bulk.

What They Found in the Lab

The team tested their new system using PDF documents and various sizes of mathematical grids to see how well it worked. They didn't just hope it worked; they ran the numbers to see if the scrambled files looked truly random and if they could be perfectly unscrambled later.

The results were impressive. When they locked the files, the scrambled data looked almost perfectly random. In the world of encryption, "randomness" is measured by a score called entropy. A perfect score is 8.0. Their encrypted files scored a 7.999810, which is incredibly close to perfect. This means the scrambled file looks so much like static noise that it's nearly impossible to guess what's inside.

They also checked how well the system scrambled the data. If you change just one tiny bit of the original file (like changing a single letter), a good lock should change about half of the entire scrambled message. This is called the "avalanche effect." Their system achieved an avalanche effect of 49.9241%, which is almost exactly the ideal 50%. This suggests that even a tiny change in the input creates a massive, unpredictable change in the output, making it very hard for hackers to find patterns.

Furthermore, they tested how sensitive the system was to the key. If a hacker tried to use a key that was just slightly wrong, the system should produce a completely different result. The researchers found that changing the key slightly resulted in a 99.6114% difference in the output, meaning the system is extremely sensitive and secure against guessing games.

The Trade-Off: Speed vs. Size

While the security was excellent, the team also looked at how fast the system runs. They found that encrypting (locking) the file was very fast, even with large grids. However, decrypting (unlocking) the file got slower as the grids got bigger. This is because unlocking requires a complex math operation called "matrix inversion," which is like trying to solve a giant Sudoku puzzle in reverse.

For smaller grids (where the parameter n was between 9 and 99), the system was lightning fast, taking less than a second to lock and unlock a file. But when they tried a very large grid (where n was 999), the unlocking process took over 327 seconds (more than five minutes). If they tried an even larger grid (n = 9999), the system got stuck and couldn't finish unlocking within a reasonable time. This tells us that while the math works perfectly for huge grids, in the real world, you'd want to stick to medium-sized grids to keep things fast.

The Bottom Line

The researchers concluded that their CGHC-S128 system is a solid, mathematically sound way to protect any kind of binary file. It guarantees that the file size stays exactly the same (no extra padding needed), it scrambles the data so well that it looks like random noise, and it can be perfectly restored to the original file every time.

They verified this by locking a PDF file, scrambling it, and then unlocking it. The file came out exactly the same, with the same digital fingerprint (MD5 and SHA-256 hashes) as the original. The team suggests that for practical use, sticking to medium-sized grids offers the best balance between strong security and fast performance. While they didn't test it on every type of file in the universe, their tests on PDFs and binary data suggest this method could be a powerful new tool for keeping digital secrets safe, combining the elegance of graph theory with the practicality of modern file protection.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →