ABP (Additional Binary Patterns) is a string encryption algorithm, designed on March 31, 2025. It is based on the use of a table of patterns to transform a text in a reversible way. From the MazeGroup Wiki page (in french).
Use the command pip install abp-tools
.
The code below imports ABP :
from abp import *
The function encode(text: str, patterns: list[list[int]]) -> bytes
takes the string to encode/encrypt and a list of list of numbers (the table of patterns), it returns a bytes string.
The function decode(ciphertext: bytes, patterns: list[list[int]]) -> str
takes the bytes string and the table of patterns to decode, it returns a string.
The function generate_patterns(key: str, num_patterns: int = 100) -> list
takes a string key and a number of patterns to generate, it returns the table of patterns corresponding to the parameters.