NetCloud24 Cryptographic POC
Project description
Kato (NetCloud24)
A Rijndael-inspired cryptographic proof-of-concept algorithm.
View Demo
·
Report Bug
·
Request Feature
Table of Contents
About The Project
Kato is a cryptographic proof-of-concept algorithm inspired by AES (Rijndael), or the Advanced Encryption Standard. As a symbol of power, Kato serves as a hybridization focusing on efficiency and versatility without compromising security. We welcome any and all contributions towards the implementation and empowerment of the algorithm, aiming to become more than just a conceptualized technology.
Built With
Getting Started
This is a minimal example of getting Kato operating locally. You may require additional steps, modification or a customized implementation to suit your needs.
Prerequisites
This is an example of how to list things you need to use the software and how to install them.
- Python: https://www.python.org/downloads/
- Ensure you also have pip installed.
Installation
-
Clone the repo
git clone https://github.com/your_username_/Project-Name.git
OR
Install using pip from the Python Package Index (PyPI)
pip install kato
-
Import into your script
from kato import Kato
Usage
Below are the minimal usage examples, as well as the returned types from Kato.
Encrypting
ECB Mode:
from kato import Kato
key = bytes(random.sample(range(256), 16))
k = Kato(key)
ciphertext = k.encrypt(bytes("abcdefghijklmnop","utf-8"))
CBC Mode:
from kato import Kato
key = bytes(random.sample(range(256), 16))
iv = bytes(random.sample(range(256), 16))
k = Kato(key, iv)
ciphertext = k.encrypt(bytes("abcdefghijklmnop","utf-8"))
Decrypting
plaintext = k.decrypt(ciphertext)
Each Kato class instance will have a key (and optionally, an Initialization Vector) as an attribute. This means you will have to create new Kato instances for each key (and IV pair) you wish to use.
Types
-
Kato.init():
- key: 16 bytes
- iv (Optional): 16 bytes
-
Kato.encrypt(): Returns a 2D Array (list of lists)
- plaintext: 16 bytes
- Example Return:
[[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]]
-
Kato.decrypt(): Returns a bytes object or 2D Array (list of lists)
- ciphertext: 16 bytes
- Example Return:
b'abcdefghijklmnop'
or[[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]]
- Note: If any digit in the state matrix cannot be decoded into hex bytes, the function will return a 2D Array.
-
Kato.cipher_block_chaining(): Returns a bytes object.
- block: 16 bytes
- IV (Optional): 16 bytes
- Example Return:
b'\xxx\xxx\xxx\xxx'
- Note: This CBC implementation is NOT true CBC, instead a mock-CBC simplying XORing the IV with the block before encryption and after decryption.
-
Kato.transpose_matrix(): Returns a 2D Array (list of lists)
- matrix: 4x4 2D Array
- Example Return:
[[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]]
-
Kato.omflip_matrix(): Returns a 2D Array (list of lists)
- matrix: 4x4 2D Array
- key: Array of 4 digits (default is
[3, 1, 0, 2]
) - Example Return:
[[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]]
-
Kato.omflip_decrypt_matrix(): Returns a 2D Array (list of lists)
- matrix: 4x4 2D Array
- key: Array of 4 digits (default is
[3, 1, 0, 2]
) - Example Return:
[[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]]
-
Kato.__add_round_key(): Returns a 2D Array (list of lists)
- state: 4x4 2D Array
- round_key: 16 bytes
- Example Return:
[[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]]
Roadmap
- Add true CBC mode.
- C implementation.
See the open issues for a full list of proposed features (and known issues).
Contributing
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
License
Distributed under the GPL3 License. See LICENSE.txt
for more information.
Credits
Leighton Brooks - leigh@ameasere.com
Milena Bosiacka - social
Riza Demirbas - social
Sam Truss - social
Yuliia Yavorska - social
Project Link: https://github.com/ameasere/kato
Acknowledgments
Use this space to list resources you find helpful and would like to give credit to. I've included a few of my favorites to kick things off!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file kato-1.0.0.tar.gz
.
File metadata
- Download URL: kato-1.0.0.tar.gz
- Upload date:
- Size: 21.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9a353ac89127cc3de70481bdbd31ac4417ffa2829263f36ec85e0b7a3ceda532 |
|
MD5 | 4e41bb67450eb7c55e49d4259fe16711 |
|
BLAKE2b-256 | b05007b12a2e1bc0b6d79342200f9056cffb70fe9e52f9d41b922cdde76cfad8 |
File details
Details for the file kato-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: kato-1.0.0-py3-none-any.whl
- Upload date:
- Size: 20.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8fe4f18a20db53923ec2c6dc60d16dc9f846266aa8af35bd61ef2f949be579b0 |
|
MD5 | 872888b8542ac710c13a7d355a6fd73c |
|
BLAKE2b-256 | 5db4a8a6af9310e81acd35a30339544faf18ff9756dee49553a7f0a7ae2384b6 |