9nightss/KOD8_ENC

GitHub: 9nightss/KOD8_ENC

KOD8 是一个基于 Python 的多层链式加密混淆引擎,通过八轮可逆变换对文本、图像、视频等多种数据进行自定义加密处理。

Stars: 0 | Forks: 0

# KOD8_ENC KOD 8 是一个多层混淆和加密引擎,专为高扩散性数据保护而设计。与标准的单算法密码不同,KOD 8 采用战略链式架构,根据检测到或指定的输入类型,精确应用八种独立且可逆的转换。 更多功能 ``` Strategic Auto-Detection: The engine analyzes input headers and entropy to automatically select the most effective cipher list (Text, Image, Video, Document, Numeric, or Experimental). ``` 使用一个基础函数,运行方式简单如下: ``` F(x) = 1(3(9(7(4(2(6(8*x))))))) 8-Round Chain Logic: Every piece of data passes through exactly 8 operations. Decryption is achieved by running the identical chain in perfect reverse. Turkish Alphabet Support: Specialized Vigenere and Atbash operations that respect the unique character set of the Turkish language (ABCÇDEFGĞHİIJKLMNOÖPRSŞTUÜVYZ). Zero-Dependency UI: A professional, high-contrast Tkinter interface built entirely on the Python Standard Library. Deterministic Security: Features a Fisher-Yates shuffled S-Box and a Linear Congruential Generator (LCG) keystream, both seeded by a customizable master key. ``` 架构 该系统分为两个主要模块: ``` kod8_engine.py: The cryptographic core containing the primitive operations (S-Box, XOR cascades, Columnar transpositions, etc.) and the 6 defined CipherLists. kod8_ui.py: The frontend controller providing real-time verification of each encryption layer. ``` 6 种加密策略 ID 名称 目标数据 主要侧重点 CL1 纯文本 人类可读的文本 支持土耳其语的替换与语言扩散。 CL2 图像文件 PNG, JPG, WebP Binary 安全的 S-Box 层与块重组。 CL3 视频文件 MP4, MKV, AVI 重度 Stream-XOR,以打破长重复模式。 CL4 文档 PDF, DOCX, TXT 破坏结构的列置换。 CL5 数字/数据 JSON, CSV, 坐标 Base-36 转换,以消除十进制模式。 CL6 实验性 混合/未知 使用所有原语家族进行最大程度的混淆。 快速开始 前置条件 ``` Python 3.8 or higher. No external libraries (like pip install) are required. ``` 安装 ``` Save kod8_engine.py and kod8_ui.py in the same directory. (Optional) Open kod8_engine.py and modify the KOD8_KEY variable to your own custom 8-digit numeric string. ``` 用法 通过你的终端运行 UI: python kod8_ui.py 教程 ``` Upload: Click "UPLOAD / BROWSE" to load a file, or type directly into the text area. Encrypt: Press "ENCRYPT". The UI will visually "check off" each of the 8 layers as they are applied. Save: After encryption, you can save the result as a .kod8 file. This file contains a header identifying which cipher_id was used. Decrypt: Load a .kod8 file. If the header is missing, the UI will prompt you to select the original strategy used. ``` 原语操作 KOD 8 使用了各种数学和位置原语: ``` Substitution: S-Box (bijective byte mapping), Vigenere (polyalphabetic), Atbash (mirror), and Base-36 digit shifting. Transposition: Rail-Fence (zigzag), Columnar (grid-based), Block Shuffle (key-derived chunk reordering), and circular Block Rotation. Diffusion: Rolling XOR (CBC-style byte chaining) and Block XOR Cascade (CBC-style block chaining). Encoding: Hex and Base64 normalization. ``` 链式安全规则 (R1–R6) 为了确保 100% 的可逆性且不破坏数据,该引擎强制执行严格的安全规则: ``` R4 (Unicode Constraint): unicode_shift never precedes Turkish-alphabet operations to prevent "breaking" the character mapping. R6 (Normalization): All text input is normalized to uppercase before the first step to ensure substitution consistency. Binary Integrity: Image and Video lists (CL2, CL3) utilize Base64 as the primary entry point to ensure binary payloads remain printable throughout the chain. ``` 许可证 本项目仅供教育和混淆目的使用。
标签:Python, Tkinter, 加密引擎, 密码学, 手动系统调用, 数据加密, 无后门, 逆向工具