Skip to main content

Sanctioned Encryption Algorithm (SEA)

Project description

Sanctioned Encryption Algorithm (SEA)

Overview

The Sanctioned Encryption Algorithm (SEA) is a custom encryption library that provides multiple layers of data transformation for enhanced security. Each layer applies a different type of transformation to the input data, making the encryption process more robust. The algorithm supports both encryption and decryption operations, with configurable layers to define the encryption depth.this library is just a simple project which can be used for simple small websites , it is never meant to defeat any algorithm like AES or DES . SEA has a different purpose and it can be used in situation wherew there is not lots of infrastructure or resources . made on 13 aug 2024

SEA

Methods

__init__(self)

Initializes the SEA object with predefined layers of transformations:

  1. reverse_order
  2. shift_characters
  3. substitute_characters
  4. caesar_cipher
  5. mirror_alphabet

depth(self, layer_order: int)

Sets the order of layers to be applied for encryption or decryption.

  • Parameters:

    • layer_order (int): An integer representing the sequence of layers to use.
  • Purpose :

    • Set Layer Order: The depth method sets the specific order of transformation layers that will be applied to the data. This order determines how the data is processed through various encryption and decryption layers.
    • Encryption Depth: By setting the layer_order, you define the depth or complexity of the encryption process, which enhances security by creating a more intricate transformation sequence.
  • Parameters:

    • layer_order (int): This is an integer that represents the sequence of layers. Each digit of this integer corresponds to a specific transformation layer, with each layer applied in the order of the digits. For example, if you set layer_order to 231451, it means:
    • Layer 2 (shift_characters) will be applied first.
    • Layer 3 (substitute_characters) will be applied second.
    • Layer 1 (reverse_order) will be applied third.
    • Layer 4 (caesar_cipher) will be applied fourth.
    • Layer 5 (mirror_alphabet) will be applied last.

guard(self, data: str) -> str

Encrypts the input data based on the set layer order.

  • Parameters:
    • data (str): The input data to be encrypted.
  • Returns: The encrypted data (str).
  • Raises: ValueError if the depth is not set.

unGuard(self, encrypted_data: str) -> str

Decrypts the encrypted data based on the set layer order.

  • Parameters:
    • encrypted_data (str): The encrypted data to be decrypted.
  • Returns: The decrypted data (str).
  • Raises: ValueError if the depth is not set.

Sonar

The Sonar class generates secure, randomized depth sequences for encryption using the SEA class. it is uesd to generate the depth or we say layer for the sea encyption . sonar uses quantum resistant number generation for better security of every session

Example with out sonar

from seaBlock import SEA

# Initialize SEA
sea = SEA()

# Set encryption depth
sea.depth(231451)

# Encrypt data
encrypted = sea.guard("HelloWorld123")

# Decrypt data
decrypted = sea.unGuard(encrypted)

print(f"Encrypted: {encrypted}")
print(f"Decrypted: {decrypted}")

Example with sonar

from seaBlock import SEA
from seaBlock import Sonar

# Initialize sonar
sonar = Sonar()

sonar.range(20)  # Set the length to 20 digits
depth = sonar.activate()
print(depth)

sea = SEA()
sea.depth(depth)  # Set the encryption depth 
encrypted = sea.guard('hello world')
decrypted = sea.unGuard(encrypted)
print(encrypted)
print(decrypted)

made under MIT licence

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

seaBlock-0.5.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

seaBlock-0.5-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file seaBlock-0.5.tar.gz.

File metadata

  • Download URL: seaBlock-0.5.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.3

File hashes

Hashes for seaBlock-0.5.tar.gz
Algorithm Hash digest
SHA256 caa17097b6db1a20fd797e536b0a60b942751d82bbcc2e8f2e0cae5c9cf919cc
MD5 95d57494458d853e10e534e7d9df004d
BLAKE2b-256 ee8f7cafc204cb44beac9c8ca75eacb003f86d926972a26eafa76b5291f767f6

See more details on using hashes here.

File details

Details for the file seaBlock-0.5-py3-none-any.whl.

File metadata

  • Download URL: seaBlock-0.5-py3-none-any.whl
  • Upload date:
  • Size: 4.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.3

File hashes

Hashes for seaBlock-0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 e2424b2c8eff8a73de7a396822bbc103239f9e26dfc2e5b801af26d63624d927
MD5 f709124e2258f6b674ac489535c1b6cc
BLAKE2b-256 00f712e45b7db4d50acff5f20a0032468e874000210ea6b13480e327156e0c0e

See more details on using hashes here.

Supported by

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