pycryptools


Namepycryptools JSON
Version 2.0.1 PyPI version JSON
download
home_pagehttps://pypi.org/project/pycryptools/
SummaryPyCrypTools is a python library that brings us a series of classics algorithms to encrypt and decrypt inputs.
upload_time2023-01-18 08:00:44
maintainer
docs_urlNone
authorCarlos Padilla
requires_python
licenseCC0-1.0 License
keywords encrypt decrypt
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            _It is currently under early development, but little by little new algorithms will be added_

<div align="center">
 
 # PyCrypTools

 ### Version 2.0.0 | 17/01 Last Update
  
![PyPI](https://img.shields.io/pypi/v/pycryptools)
![PyPI - Downloads](https://img.shields.io/pypi/dm/pycryptools?color=green&label=downloads)
![Downloads](https://static.pepy.tech/personalized-badge/pycryptools?period=total&units=international_system&left_color=grey&right_color=green&left_text=downloads)
![PyPI - License](https://img.shields.io/pypi/l/pycryptools)
![](https://tokei.rs/b1/github/14wual/pycryptools)
  
PyCrypTools is a python library that brings us a series of algorithms to encrypt and decrypt inputs.
  
</div>

```
888       888 888     888       d8888 888
888   o   888 888     888      d88888 888
888  d8b  888 888     888     d88P888 888        (code by WUAL)
888 d888b 888 888     888    d88P 888 888            twitter.com/codewual
888d88888b888 888     888   d88P  888 888     github.com/14wual
88888P Y88888 888     888  d88P   888 888            youtube: WualPK
8888P   Y8888 Y88b. .d88P d8888888888 888     
888P     Y888  "Y88888P" d88P     888 88888888
```

See commits updates (CHANGELOG) here: <a href="https://github.com/14wual/pycryptools/blob/main/CHANGELOG.md"><b>Link</b></a>

## Install

```python
pip install pycryptools
```

## Terminal Command
```
pycryptools --algorithm -mode message
```

<details>

### Avilale algorithm: 

```python
   Avilable Algorithm:
            --atbash            --scytale
            --polybios            --caesar
            --alberti            --jefferson
            --vigenere            --morse
            --letter-to-number
```

### Avilale modes: 

```python

   Avilable Modes:
            -e            [for encrypt]
            -d            [for decrypt]
            -n            [none mode]
```

</details>

## Examples

**Result**: `OWRILHO`| `EXAMPLE`
```python
from pycryptools.scytale import scytale

message = "example"
keyword = "random"

encrypt = scytale.encrypt(message, keyword)
print(encrypt)

decrypt = scytale.decrypt(encrypt, keyword)
print(decrypt)
```

# Modern Algorithms

[PyCrypTools](https://github.com/14wual/pycryptools) currently has 1 modern algorithm.

**(Under development) Not yet available**

1. [Rail Fence](https://github.com/14wual/pycryptools/blob/main/README.md#rail-fence)

# Classics Algorithms

[PyCrypTools](https://github.com/14wual/pycryptools) currently has 9 classics algorithms.

1. [AtBash](https://github.com/14wual/pycryptools/blob/main/README.md#atbash)
2. [Scytale](https://github.com/14wual/pycryptools/blob/main/README.md#scytale)
3. [Polybios](https://github.com/14wual/pycryptools/blob/main/README.md#polybios)
4. [Caesar](https://github.com/14wual/pycryptools/blob/main/README.md#caesar)
5. [Alberti](https://github.com/14wual/pycryptools/blob/main/README.md#alberti-disk)
6. [Jefferson](https://github.com/14wual/pycryptools/blob/main/README.md#jefferson-wheel)
7. [Morse](https://github.com/14wual/pycryptools/blob/main/README.md#morse)
8. [Vigenere](https://github.com/14wual/pycryptools/blob/main/README.md#vigenere)
9. [Letter-Number](https://github.com/14wual/pycryptools/blob/main/README.md#letter-number)

### Rail Fence

### AtBash

Usage:
```python
from pycryptools.atbash import Atbash

message = "example"

encrypt = Atbash.encrypt(message)
print(encrypt)

decrypt = Atbash.decrypt(encrypt)
print(decrypt)
```

Atbash is a monoalphabetic substitution encryption algorithm. This means that it uses a single substitution table to encode all the letters in the original message. In the case of Atbash encryption, the substitution table is built from a given keyword and consists of reversing the order of the letters of the alphabet to substitute each letter of the original message.

### Scytale

Usage: 
```python
from pycryptools.scytale import Scytale

message = "example"
keyword = "random"

encrypt = Scytale.encrypt(message, keyword)
print(encrypt)

decrypt = Scytale.decrypt(encrypt, keyword)
print(decrypt)
```

To encrypt a message, the message is written on a strip of paper or a stick and wrapped around the cylindrical object using the keyword to determine the number of columns. The message is then read across the columns, from top to bottom. The result is an encrypted message in which the letters appear in a different order than in the original message.

To decrypt the message, you need to know the keyword used to encrypt it, since it determines the number of columns and the order in which the letters must be read.

### Polybios

Usage: 
```python
from pycryptools.polybios import Polybios

message = "example"

encrypt = Polybios.encrypt(message)
print(encrypt)

decrypt = Polybios.decrypt(encrypt)
print(decrypt)
```

The Polybios cipher is a polyalphabetic substitution cipher technique that uses a 5x5 table to assign a pair of numerical coordinates to each letter of the alphabet. The table is built using a 5x5 matrix where the letters of the alphabet are placed in a specific order, rather than in alphabetical order.

### Alberti Disk

Usage:
```python
from pycryptools.alberti import Alberti

message = "example"
outer_alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
inner_alphabet = "XZYWVUTSRQPONMLKJIHGFEDCBA"

encrypt = Alberti.encrypt(message, inner_alphabet, outer_alphabet)
print(encrypt)

decrypt = Alberti.decrypt(encrypt, inner_alphabet, outer_alphabet)
print(decrypt)
```

The Alberti disk is a mechanical device used to encrypt and decrypt messages using the polyalphabetic substitution cipher. It was invented by the Italian humanist and scientist Leon Battista Alberti in the 15th century. The disk consists of two overlapping wheels, each with an alphabet printed on its rim. The top wheel, known as the recorder wheel, is free to rotate and has a hole in the center through which the bottom wheel, known as the decryption wheel, can be seen.

### Jefferson Wheel

Usage:
```python
from pycryptools.jefferson import Jefferson

message = "jefferson"
disks = Jefferson.generate_disks()
encrypted = Jefferson.encrypt(message, disks);print(encrypted)
decrypted = Jefferson.decrypt(encrypted, disks);print(decrypted)
```

The Jefferson Wheel Cipher is a mechanical encryption device that uses a set of rotating disks to encrypt and decrypt messages. Each disk has the alphabet written on it in a different order, and the order of the disks can be changed to create a unique encryption key.

### Morse

Usage:
```python
from pycryptools.morse import Morse

message = "morse code"
encrypted = Morse.encrypt(message);print(encrypted)
decrypted = Morse.decrypt(encrypted);print(decrypted)
```

Morse code is a system of representing letters, numbers, and punctuation marks by means of a series of dots and dashes of variable length. It was developed by Samuel Morse in the 19th century and was mainly used in telegraphy (telegraphing), to transmit messages through electrical signals.

In Morse code, each letter, number, or punctuation mark is represented by a unique pattern of dots and dashes. For example, the letter "A" is represented by a dot followed by a dash, while the letter "N" is represented by three consecutive dashes. The space between letters is represented by a dot, while the space between words is represented by three consecutive dots.

### Vigenere

Usage:
```python
from pycryptools.vigenere import Vigenere

message = "vigenere";keyword = "example"
encrypt = Vigenere.encrypt(message, keyword);print(encrypt)
decrypt = Vigenere.decrypt(encrypt, keyword);print(decrypt)
```

The Vigenère cipher is a polyalphabetic substitution encryption method that uses a key-based character substitution table. The table is built from a character array, where each column represents a letter of the key and each row represents a letter of the alphabet.

### Letter Number

Usage:
```python
from pycryptools.letter_number import LetterNumber

message = "letter number"
encrypt = LetterNumber.encrypt(message, keyword);print(encrypt)
decrypt = LetterNumber.decrypt(encrypt, keyword);print(decrypt)
```

Letter-to-number encryption consists of replacing each letter of the alphabet in a message with a specific number. It is a form of simple substitution ignition in which a table of correspondence between letters and numbers is used to encrypt and decrypt the message.

## License
Copyright © 2023 Carlos Padilla.

This project is [CC0 1.0 Universal](https://github.com/14wual/pycryptools/blob/main/LICENSE) licensed.

## 🚀 Know me
Linkeding - https://www.linkedin.com/in/cpadilla10/
Twitter - https://twitter.com/codewual
YouTube - https://www.youtube.com/channel/UC0B3mTwPPdKPEwLerauEtdg

            

Raw data

            {
    "_id": null,
    "home_page": "https://pypi.org/project/pycryptools/",
    "name": "pycryptools",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "encrypt decrypt",
    "author": "Carlos Padilla",
    "author_email": "cpadlab@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/2a/ed/2324da0480d86312b7ea239281478ab8f816d90fc14383363881be4ca3ec/pycryptools-2.0.1.tar.gz",
    "platform": null,
    "description": "_It is currently under early development, but little by little new algorithms will be added_\r\n\r\n<div align=\"center\">\r\n \r\n # PyCrypTools\r\n\r\n ### Version 2.0.0 | 17/01 Last Update\r\n  \r\n![PyPI](https://img.shields.io/pypi/v/pycryptools)\r\n![PyPI - Downloads](https://img.shields.io/pypi/dm/pycryptools?color=green&label=downloads)\r\n![Downloads](https://static.pepy.tech/personalized-badge/pycryptools?period=total&units=international_system&left_color=grey&right_color=green&left_text=downloads)\r\n![PyPI - License](https://img.shields.io/pypi/l/pycryptools)\r\n![](https://tokei.rs/b1/github/14wual/pycryptools)\r\n  \r\nPyCrypTools is a python library that brings us a series of algorithms to encrypt and decrypt inputs.\r\n  \r\n</div>\r\n\r\n```\r\n888       888 888     888       d8888 888\r\n888   o   888 888     888      d88888 888\r\n888  d8b  888 888     888     d88P888 888        (code by WUAL)\r\n888 d888b 888 888     888    d88P 888 888            twitter.com/codewual\r\n888d88888b888 888     888   d88P  888 888     github.com/14wual\r\n88888P Y88888 888     888  d88P   888 888            youtube: WualPK\r\n8888P   Y8888 Y88b. .d88P d8888888888 888     \r\n888P     Y888  \"Y88888P\" d88P     888 88888888\r\n```\r\n\r\nSee commits updates (CHANGELOG) here: <a href=\"https://github.com/14wual/pycryptools/blob/main/CHANGELOG.md\"><b>Link</b></a>\r\n\r\n## Install\r\n\r\n```python\r\npip install pycryptools\r\n```\r\n\r\n## Terminal Command\r\n```\r\npycryptools --algorithm -mode message\r\n```\r\n\r\n<details>\r\n\r\n### Avilale algorithm: \r\n\r\n```python\r\n   Avilable Algorithm:\r\n            --atbash            --scytale\r\n            --polybios            --caesar\r\n            --alberti            --jefferson\r\n            --vigenere            --morse\r\n            --letter-to-number\r\n```\r\n\r\n### Avilale modes: \r\n\r\n```python\r\n\r\n   Avilable Modes:\r\n            -e            [for encrypt]\r\n            -d            [for decrypt]\r\n            -n            [none mode]\r\n```\r\n\r\n</details>\r\n\r\n## Examples\r\n\r\n**Result**: `OWRILHO`| `EXAMPLE`\r\n```python\r\nfrom pycryptools.scytale import scytale\r\n\r\nmessage = \"example\"\r\nkeyword = \"random\"\r\n\r\nencrypt = scytale.encrypt(message, keyword)\r\nprint(encrypt)\r\n\r\ndecrypt = scytale.decrypt(encrypt, keyword)\r\nprint(decrypt)\r\n```\r\n\r\n# Modern Algorithms\r\n\r\n[PyCrypTools](https://github.com/14wual/pycryptools) currently has 1 modern algorithm.\r\n\r\n**(Under development) Not yet available**\r\n\r\n1. [Rail Fence](https://github.com/14wual/pycryptools/blob/main/README.md#rail-fence)\r\n\r\n# Classics Algorithms\r\n\r\n[PyCrypTools](https://github.com/14wual/pycryptools) currently has 9 classics algorithms.\r\n\r\n1. [AtBash](https://github.com/14wual/pycryptools/blob/main/README.md#atbash)\r\n2. [Scytale](https://github.com/14wual/pycryptools/blob/main/README.md#scytale)\r\n3. [Polybios](https://github.com/14wual/pycryptools/blob/main/README.md#polybios)\r\n4. [Caesar](https://github.com/14wual/pycryptools/blob/main/README.md#caesar)\r\n5. [Alberti](https://github.com/14wual/pycryptools/blob/main/README.md#alberti-disk)\r\n6. [Jefferson](https://github.com/14wual/pycryptools/blob/main/README.md#jefferson-wheel)\r\n7. [Morse](https://github.com/14wual/pycryptools/blob/main/README.md#morse)\r\n8. [Vigenere](https://github.com/14wual/pycryptools/blob/main/README.md#vigenere)\r\n9. [Letter-Number](https://github.com/14wual/pycryptools/blob/main/README.md#letter-number)\r\n\r\n### Rail Fence\r\n\r\n### AtBash\r\n\r\nUsage:\r\n```python\r\nfrom pycryptools.atbash import Atbash\r\n\r\nmessage = \"example\"\r\n\r\nencrypt = Atbash.encrypt(message)\r\nprint(encrypt)\r\n\r\ndecrypt = Atbash.decrypt(encrypt)\r\nprint(decrypt)\r\n```\r\n\r\nAtbash is a monoalphabetic substitution encryption algorithm. This means that it uses a single substitution table to encode all the letters in the original message. In the case of Atbash encryption, the substitution table is built from a given keyword and consists of reversing the order of the letters of the alphabet to substitute each letter of the original message.\r\n\r\n### Scytale\r\n\r\nUsage: \r\n```python\r\nfrom pycryptools.scytale import Scytale\r\n\r\nmessage = \"example\"\r\nkeyword = \"random\"\r\n\r\nencrypt = Scytale.encrypt(message, keyword)\r\nprint(encrypt)\r\n\r\ndecrypt = Scytale.decrypt(encrypt, keyword)\r\nprint(decrypt)\r\n```\r\n\r\nTo encrypt a message, the message is written on a strip of paper or a stick and wrapped around the cylindrical object using the keyword to determine the number of columns. The message is then read across the columns, from top to bottom. The result is an encrypted message in which the letters appear in a different order than in the original message.\r\n\r\nTo decrypt the message, you need to know the keyword used to encrypt it, since it determines the number of columns and the order in which the letters must be read.\r\n\r\n### Polybios\r\n\r\nUsage: \r\n```python\r\nfrom pycryptools.polybios import Polybios\r\n\r\nmessage = \"example\"\r\n\r\nencrypt = Polybios.encrypt(message)\r\nprint(encrypt)\r\n\r\ndecrypt = Polybios.decrypt(encrypt)\r\nprint(decrypt)\r\n```\r\n\r\nThe Polybios cipher is a polyalphabetic substitution cipher technique that uses a 5x5 table to assign a pair of numerical coordinates to each letter of the alphabet. The table is built using a 5x5 matrix where the letters of the alphabet are placed in a specific order, rather than in alphabetical order.\r\n\r\n### Alberti Disk\r\n\r\nUsage:\r\n```python\r\nfrom pycryptools.alberti import Alberti\r\n\r\nmessage = \"example\"\r\nouter_alphabet = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\"\r\ninner_alphabet = \"XZYWVUTSRQPONMLKJIHGFEDCBA\"\r\n\r\nencrypt = Alberti.encrypt(message, inner_alphabet, outer_alphabet)\r\nprint(encrypt)\r\n\r\ndecrypt = Alberti.decrypt(encrypt, inner_alphabet, outer_alphabet)\r\nprint(decrypt)\r\n```\r\n\r\nThe Alberti disk is a mechanical device used to encrypt and decrypt messages using the polyalphabetic substitution cipher. It was invented by the Italian humanist and scientist Leon Battista Alberti in the 15th century. The disk consists of two overlapping wheels, each with an alphabet printed on its rim. The top wheel, known as the recorder wheel, is free to rotate and has a hole in the center through which the bottom wheel, known as the decryption wheel, can be seen.\r\n\r\n### Jefferson Wheel\r\n\r\nUsage:\r\n```python\r\nfrom pycryptools.jefferson import Jefferson\r\n\r\nmessage = \"jefferson\"\r\ndisks = Jefferson.generate_disks()\r\nencrypted = Jefferson.encrypt(message, disks);print(encrypted)\r\ndecrypted = Jefferson.decrypt(encrypted, disks);print(decrypted)\r\n```\r\n\r\nThe Jefferson Wheel Cipher is a mechanical encryption device that uses a set of rotating disks to encrypt and decrypt messages. Each disk has the alphabet written on it in a different order, and the order of the disks can be changed to create a unique encryption key.\r\n\r\n### Morse\r\n\r\nUsage:\r\n```python\r\nfrom pycryptools.morse import Morse\r\n\r\nmessage = \"morse code\"\r\nencrypted = Morse.encrypt(message);print(encrypted)\r\ndecrypted = Morse.decrypt(encrypted);print(decrypted)\r\n```\r\n\r\nMorse code is a system of representing letters, numbers, and punctuation marks by means of a series of dots and dashes of variable length. It was developed by Samuel Morse in the 19th century and was mainly used in telegraphy (telegraphing), to transmit messages through electrical signals.\r\n\r\nIn Morse code, each letter, number, or punctuation mark is represented by a unique pattern of dots and dashes. For example, the letter \"A\" is represented by a dot followed by a dash, while the letter \"N\" is represented by three consecutive dashes. The space between letters is represented by a dot, while the space between words is represented by three consecutive dots.\r\n\r\n### Vigenere\r\n\r\nUsage:\r\n```python\r\nfrom pycryptools.vigenere import Vigenere\r\n\r\nmessage = \"vigenere\";keyword = \"example\"\r\nencrypt = Vigenere.encrypt(message, keyword);print(encrypt)\r\ndecrypt = Vigenere.decrypt(encrypt, keyword);print(decrypt)\r\n```\r\n\r\nThe Vigen\u00c3\u00a8re cipher is a polyalphabetic substitution encryption method that uses a key-based character substitution table. The table is built from a character array, where each column represents a letter of the key and each row represents a letter of the alphabet.\r\n\r\n### Letter Number\r\n\r\nUsage:\r\n```python\r\nfrom pycryptools.letter_number import LetterNumber\r\n\r\nmessage = \"letter number\"\r\nencrypt = LetterNumber.encrypt(message, keyword);print(encrypt)\r\ndecrypt = LetterNumber.decrypt(encrypt, keyword);print(decrypt)\r\n```\r\n\r\nLetter-to-number encryption consists of replacing each letter of the alphabet in a message with a specific number. It is a form of simple substitution ignition in which a table of correspondence between letters and numbers is used to encrypt and decrypt the message.\r\n\r\n## License\r\nCopyright \u00c2\u00a9 2023 Carlos Padilla.\r\n\r\nThis project is [CC0 1.0 Universal](https://github.com/14wual/pycryptools/blob/main/LICENSE) licensed.\r\n\r\n## \u00f0\u0178\u0161\u20ac Know me\r\nLinkeding - https://www.linkedin.com/in/cpadilla10/\r\nTwitter - https://twitter.com/codewual\r\nYouTube - https://www.youtube.com/channel/UC0B3mTwPPdKPEwLerauEtdg\r\n",
    "bugtrack_url": null,
    "license": "CC0-1.0 License",
    "summary": "PyCrypTools is a python library that brings us a series of classics algorithms to encrypt and decrypt inputs.",
    "version": "2.0.1",
    "split_keywords": [
        "encrypt",
        "decrypt"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f5a8eda6aca82593b492b41278080a2fa05316d865106ebb607bf3a3facac23b",
                "md5": "caecadb8174e91588ccb165093040ebe",
                "sha256": "837e5f2c46990f24fa18b2468ed8d34edf8ad610b2408e39331a5bd60f3a2293"
            },
            "downloads": -1,
            "filename": "pycryptools-2.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "caecadb8174e91588ccb165093040ebe",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 19091,
            "upload_time": "2023-01-18T08:00:34",
            "upload_time_iso_8601": "2023-01-18T08:00:34.919132Z",
            "url": "https://files.pythonhosted.org/packages/f5/a8/eda6aca82593b492b41278080a2fa05316d865106ebb607bf3a3facac23b/pycryptools-2.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2aed2324da0480d86312b7ea239281478ab8f816d90fc14383363881be4ca3ec",
                "md5": "bbb99b9533076c2ac640388706e1f378",
                "sha256": "773f3084d9709ebd3b0908255f4584f42e9bd9aa0ad58834ee69e048a4af9f87"
            },
            "downloads": -1,
            "filename": "pycryptools-2.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "bbb99b9533076c2ac640388706e1f378",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 15522,
            "upload_time": "2023-01-18T08:00:44",
            "upload_time_iso_8601": "2023-01-18T08:00:44.130090Z",
            "url": "https://files.pythonhosted.org/packages/2a/ed/2324da0480d86312b7ea239281478ab8f816d90fc14383363881be4ca3ec/pycryptools-2.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-01-18 08:00:44",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "pycryptools"
}
        
Elapsed time: 0.03116s