jc-cipher


Namejc-cipher JSON
Version 0.0.9 PyPI version JSON
download
home_pagehttps://github.com/statogale/caesar-cipher
SummaryPreserving History Through Code- Caesar Cipher
upload_time2023-12-21 12:14:16
maintainer
docs_urlNone
authorStatogale (Gabriel Okundaye)
requires_python
licenseMIT
keywords python caesar cipher julius caesar history
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
## Preserving History Through Code- Julius Caesar's Shift Cipher

### Gaius Julius Caesar
From Wikipedia, the free encyclopedia  
In cryptography, a Caesar cipher, also known as Caesar's cipher, the shift cipher, Caesar's code, or Caesar shift, is one of the simplest and most widely known encryption techniques. It is a type of substitution cipher in which each letter in the plaintext is replaced by a letter some fixed number of positions down the alphabet. For example, with a left shift of 3, D would be replaced by A, E would become B, and so on. The method is named after Julius Caesar, who used it in his private correspondence.

<div align="center">
    <!-- <img src="/images/julius_caesar.png" -->
    <img src="https://raw.githubusercontent.com/statogale/caesar-cipher/main/images/julius_caesar.png"
         width="400"
         align="center"
         margin="100"
         alt="The Caesar cipher is named for Julius Caesar, who used an alphabet where decrypting would shift three letters to the left.." 
         caption="Gaius Julius Caesar"
    />    
    <div align="center">Julius Caesar (100-44 BCE)</div>
</div>
Source: <a href="https://en.wikipedia.org/wiki/File:Bust_of_Julius_Caesar_from_History_of_the_World_(1902).png">Wikipedia</a>


### Caesar cipher using a left rotation of three places
#### Expectations

Plain : ABCDEFGHIJKLMNOPQRSTUVWXYZ <br/>
Cipher: XYZABCDEFGHIJKLMNOPQRSTUVW <br/>

Plaintext : THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG <br/>
Ciphertext: QEB NRFZH YOLTK CLU GRJMP LSBO QEB IXWV ALD <br/>  
<br/>

<div align="center">
    <!-- <img src="/images/caesar_cipher_left_shift_of_3.png" -->
    <img src="https://raw.githubusercontent.com/statogale/caesar-cipher/main/images/caesar_cipher_left_shift_of_3.png"
         width="400"
         align="center"
         margin="100"
         alt="The action of a Caesar cipher is to replace each plaintext letter with a different one a fixed number of places down the alphabet. The cipher illustrated here uses a left shift of three, so that (for example) each occurrence of E in the plaintext becomes B in the ciphertext." 
         caption="The action of a Caesar cipher"
    />    
    <div align="center">The action of a Caesar cipher</div>
</div>
Source: <a href="https://upload.wikimedia.org/wikipedia/commons/thumb/4/4a/Caesar_cipher_left_shift_of_3.svg/220px-Caesar_cipher_left_shift_of_3.svg.png">Wikipedia</a>


### Caesar cipher disk was invented over a millemium after Julius Caesar
#### But we would borrow Alberti's disc to also visualize the Caesar's Cipher

<br />
<div align="center">
    <!-- <img src="/images/alberti_cipher_disk.png"  -->
    <img src="https://raw.githubusercontent.com/statogale/caesar-cipher/main/images/alberti_cipher_disk.png" 
         width="400"
         align="center"
         margin="100"
         alt="CipherDisk2000" 
         caption="Cipher disc for substitution cipher, manufacturer: Linge, Pleidelsheim (Germany)"
    />    
    <div align="center"><br>CipherDisk2000 invented by <a href="https://en.wikipedia.org/wiki/Leon_Battista_Alberti">Leon Battista Alberti</a>&nbsp<i>1404 - 1472</i></div>
</div>
 
Source: <a href="https://upload.wikimedia.org/wikipedia/commons/b/b5/CipherDisk2000.jpg">Wikipedia</a>


### Caesar cipher using a left rotation of three places
##### With a left shift of 3, D would be replaced by A, E would become B, and so on. 
#### The cipher disk illustration was inspired by Alberti's cipher disk, although his disk had the outer disk as the rotating disk and it was also in the reverse order compared to the inner disk.

<div align="center">
    <br>
    <!-- <img src="/images/cipher_disk_shift_0.png" -->
    <img src="https://raw.githubusercontent.com/statogale/caesar-cipher/main/images/cipher_disk_shift_0.png"
         width="300"
         align="center"
         margin="100"
         alt="CipherDisk in 0 position 0 Shift" 
         caption="Cipher disc default position"
    />
    <div align="center">CipherDisk in 0 position 0 Shift</div>
    <br>
    <img src="https://raw.githubusercontent.com/statogale/caesar-cipher/main/images/cipher_disk_shift_3.png"
         width="300"
         align="center"
         margin="100"
         alt="CipherDisk with 3 left rotations or -3 Shift" 
         caption="Cipher disc 3 left rotations"
    />
    <div align="center">Cipher disc 3 left rotations</div>
</div>

# Focus
### This caesar cipher program encrypts only uppercase letters and no other characters. Modelled closely to the caesar cipher used before common era.


# Install
```bash
pip install jc-cipher
``` 

# Run in command/terminal
```bash
jc-cipher
```

# Import modules
```bash
from caesar_cipher import encryption as ce
from caesar_cipher import decryption as de
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/statogale/caesar-cipher",
    "name": "jc-cipher",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "python,caesar cipher,julius caesar,history",
    "author": "Statogale (Gabriel Okundaye)",
    "author_email": "<gabriel.okundaye@statogale.com>",
    "download_url": "https://files.pythonhosted.org/packages/8d/19/2a3d93484f593830e809c3428b640c2001afe97e67ce9819ace55e93e38a/jc-cipher-0.0.9.tar.gz",
    "platform": null,
    "description": "\r\n## Preserving History Through Code- Julius Caesar's Shift Cipher\r\n\r\n### Gaius Julius Caesar\r\nFrom Wikipedia, the free encyclopedia  \r\nIn cryptography, a Caesar cipher, also known as Caesar's cipher, the shift cipher, Caesar's code, or Caesar shift, is one of the simplest and most widely known encryption techniques. It is a type of substitution cipher in which each letter in the plaintext is replaced by a letter some fixed number of positions down the alphabet. For example, with a left shift of 3, D would be replaced by A, E would become B, and so on. The method is named after Julius Caesar, who used it in his private correspondence.\r\n\r\n<div align=\"center\">\r\n    <!-- <img src=\"/images/julius_caesar.png\" -->\r\n    <img src=\"https://raw.githubusercontent.com/statogale/caesar-cipher/main/images/julius_caesar.png\"\r\n         width=\"400\"\r\n         align=\"center\"\r\n         margin=\"100\"\r\n         alt=\"The Caesar cipher is named for Julius Caesar, who used an alphabet where decrypting would shift three letters to the left..\" \r\n         caption=\"Gaius Julius Caesar\"\r\n    />    \r\n    <div align=\"center\">Julius Caesar (100-44 BCE)</div>\r\n</div>\r\nSource: <a href=\"https://en.wikipedia.org/wiki/File:Bust_of_Julius_Caesar_from_History_of_the_World_(1902).png\">Wikipedia</a>\r\n\r\n\r\n### Caesar cipher using a left rotation of three places\r\n#### Expectations\r\n\r\nPlain : ABCDEFGHIJKLMNOPQRSTUVWXYZ <br/>\r\nCipher: XYZABCDEFGHIJKLMNOPQRSTUVW <br/>\r\n\r\nPlaintext : THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG <br/>\r\nCiphertext: QEB NRFZH YOLTK CLU GRJMP LSBO QEB IXWV ALD <br/>  \r\n<br/>\r\n\r\n<div align=\"center\">\r\n    <!-- <img src=\"/images/caesar_cipher_left_shift_of_3.png\" -->\r\n    <img src=\"https://raw.githubusercontent.com/statogale/caesar-cipher/main/images/caesar_cipher_left_shift_of_3.png\"\r\n         width=\"400\"\r\n         align=\"center\"\r\n         margin=\"100\"\r\n         alt=\"The action of a Caesar cipher is to replace each plaintext letter with a different one a fixed number of places down the alphabet. The cipher illustrated here uses a left shift of three, so that (for example) each occurrence of E in the plaintext becomes B in the ciphertext.\" \r\n         caption=\"The action of a Caesar cipher\"\r\n    />    \r\n    <div align=\"center\">The action of a Caesar cipher</div>\r\n</div>\r\nSource: <a href=\"https://upload.wikimedia.org/wikipedia/commons/thumb/4/4a/Caesar_cipher_left_shift_of_3.svg/220px-Caesar_cipher_left_shift_of_3.svg.png\">Wikipedia</a>\r\n\r\n\r\n### Caesar cipher disk was invented over a millemium after Julius Caesar\r\n#### But we would borrow Alberti's disc to also visualize the Caesar's Cipher\r\n\r\n<br />\r\n<div align=\"center\">\r\n    <!-- <img src=\"/images/alberti_cipher_disk.png\"  -->\r\n    <img src=\"https://raw.githubusercontent.com/statogale/caesar-cipher/main/images/alberti_cipher_disk.png\" \r\n         width=\"400\"\r\n         align=\"center\"\r\n         margin=\"100\"\r\n         alt=\"CipherDisk2000\" \r\n         caption=\"Cipher disc for substitution cipher, manufacturer: Linge, Pleidelsheim (Germany)\"\r\n    />    \r\n    <div align=\"center\"><br>CipherDisk2000 invented by <a href=\"https://en.wikipedia.org/wiki/Leon_Battista_Alberti\">Leon Battista Alberti</a>&nbsp<i>1404 - 1472</i></div>\r\n</div>\r\n \r\nSource: <a href=\"https://upload.wikimedia.org/wikipedia/commons/b/b5/CipherDisk2000.jpg\">Wikipedia</a>\r\n\r\n\r\n### Caesar cipher using a left rotation of three places\r\n##### With a left shift of 3, D would be replaced by A, E would become B, and so on. \r\n#### The cipher disk illustration was inspired by Alberti's cipher disk, although his disk had the outer disk as the rotating disk and it was also in the reverse order compared to the inner disk.\r\n\r\n<div align=\"center\">\r\n    <br>\r\n    <!-- <img src=\"/images/cipher_disk_shift_0.png\" -->\r\n    <img src=\"https://raw.githubusercontent.com/statogale/caesar-cipher/main/images/cipher_disk_shift_0.png\"\r\n         width=\"300\"\r\n         align=\"center\"\r\n         margin=\"100\"\r\n         alt=\"CipherDisk in 0 position 0 Shift\" \r\n         caption=\"Cipher disc default position\"\r\n    />\r\n    <div align=\"center\">CipherDisk in 0 position 0 Shift</div>\r\n    <br>\r\n    <img src=\"https://raw.githubusercontent.com/statogale/caesar-cipher/main/images/cipher_disk_shift_3.png\"\r\n         width=\"300\"\r\n         align=\"center\"\r\n         margin=\"100\"\r\n         alt=\"CipherDisk with 3 left rotations or -3 Shift\" \r\n         caption=\"Cipher disc 3 left rotations\"\r\n    />\r\n    <div align=\"center\">Cipher disc 3 left rotations</div>\r\n</div>\r\n\r\n# Focus\r\n### This caesar cipher program encrypts only uppercase letters and no other characters. Modelled closely to the caesar cipher used before common era.\r\n\r\n\r\n# Install\r\n```bash\r\npip install jc-cipher\r\n``` \r\n\r\n# Run in command/terminal\r\n```bash\r\njc-cipher\r\n```\r\n\r\n# Import modules\r\n```bash\r\nfrom caesar_cipher import encryption as ce\r\nfrom caesar_cipher import decryption as de\r\n```\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Preserving History Through Code- Caesar Cipher",
    "version": "0.0.9",
    "project_urls": {
        "Homepage": "https://github.com/statogale/caesar-cipher"
    },
    "split_keywords": [
        "python",
        "caesar cipher",
        "julius caesar",
        "history"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7aefd38e76fbb77d0bc536386ca8dcb1a2249ece2440181310c83c79297f0248",
                "md5": "92909628adbc7abac521f16e83d520de",
                "sha256": "4e53ee8b976b9acc10b5dc2ae14aea3e92325fb6abee20c7e72b7d7fe2899e7b"
            },
            "downloads": -1,
            "filename": "jc_cipher-0.0.9-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "92909628adbc7abac521f16e83d520de",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 10734,
            "upload_time": "2023-12-21T12:14:15",
            "upload_time_iso_8601": "2023-12-21T12:14:15.408230Z",
            "url": "https://files.pythonhosted.org/packages/7a/ef/d38e76fbb77d0bc536386ca8dcb1a2249ece2440181310c83c79297f0248/jc_cipher-0.0.9-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8d192a3d93484f593830e809c3428b640c2001afe97e67ce9819ace55e93e38a",
                "md5": "2f60a1c9a0380e845760e542f0f53cc3",
                "sha256": "2c65bb36e42f0b85a85cf409cd6d7d4fea827f91f4c5faf937a94f7aa4fe3c12"
            },
            "downloads": -1,
            "filename": "jc-cipher-0.0.9.tar.gz",
            "has_sig": false,
            "md5_digest": "2f60a1c9a0380e845760e542f0f53cc3",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 10553,
            "upload_time": "2023-12-21T12:14:16",
            "upload_time_iso_8601": "2023-12-21T12:14:16.566729Z",
            "url": "https://files.pythonhosted.org/packages/8d/19/2a3d93484f593830e809c3428b640c2001afe97e67ce9819ace55e93e38a/jc-cipher-0.0.9.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-21 12:14:16",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "statogale",
    "github_project": "caesar-cipher",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "jc-cipher"
}
        
Elapsed time: 0.15295s