Skip to main content

NetCloud24 Cryptographic POC

Project description


Logo

Kato (NetCloud24)

A Rijndael-inspired cryptographic proof-of-concept algorithm.

View Demo · Report Bug · Request Feature

Contributors Forks Stargazers Issues GPL3 License

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgments

FOSSA Status

About The Project

FOSSA Status

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.

(Back to top)

Built With

  • Python

(Back to top)

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.

Installation

  1. 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
    
  2. Import into your script

    from kato import Kato
    

(Back to top)

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]]

(Back to top)

Roadmap

  • Add true CBC mode.
  • C implementation.

See the open issues for a full list of proposed features (and known issues).

(Back to top)

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!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(Back to top)

License

Distributed under the GPL3 License. See LICENSE.txt for more information.

(Back to top)

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

(Back to top)

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!

(Back to top)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kato-1.0.0.tar.gz (21.6 kB view details)

Uploaded Source

Built Distribution

kato-1.0.0-py3-none-any.whl (20.2 kB view details)

Uploaded Python 3

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

Hashes for kato-1.0.0.tar.gz
Algorithm Hash digest
SHA256 9a353ac89127cc3de70481bdbd31ac4417ffa2829263f36ec85e0b7a3ceda532
MD5 4e41bb67450eb7c55e49d4259fe16711
BLAKE2b-256 b05007b12a2e1bc0b6d79342200f9056cffb70fe9e52f9d41b922cdde76cfad8

See more details on using hashes here.

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

Hashes for kato-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8fe4f18a20db53923ec2c6dc60d16dc9f846266aa8af35bd61ef2f949be579b0
MD5 872888b8542ac710c13a7d355a6fd73c
BLAKE2b-256 5db4a8a6af9310e81acd35a30339544faf18ff9756dee49553a7f0a7ae2384b6

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page