https://github.com/denatajp/streamchiper
Implementation of the Stream Cipher algorithm, a symmetric encryption technique that encrypts data one bit or byte at a time. The project features both encryption and decryption functions, using a pseudorandom key stream combined with the plaintext through bitwise operations, typically XOR, to produce ciphertext and recover plaintext.
https://github.com/denatajp/streamchiper
python
Last synced: 2 months ago
JSON representation
Implementation of the Stream Cipher algorithm, a symmetric encryption technique that encrypts data one bit or byte at a time. The project features both encryption and decryption functions, using a pseudorandom key stream combined with the plaintext through bitwise operations, typically XOR, to produce ciphertext and recover plaintext.
- Host: GitHub
- URL: https://github.com/denatajp/streamchiper
- Owner: denatajp
- Created: 2024-08-24T04:16:16.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-08-24T04:37:16.000Z (10 months ago)
- Last Synced: 2025-04-04T05:19:10.840Z (2 months ago)
- Topics: python
- Language: Python
- Homepage:
- Size: 1.95 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README

# Introduction

Stream Cipher is a symmetric encryption algorithm that encrypts and decrypts data one bit or byte at a time. This technique uses a stream of pseudorandom keys that are combined with plaintext through bitwise operations, such as XOR, to produce ciphertext. The encryption process is reversible, so the ciphertext can be restored to plaintext using the same key.
# Pros
- Fast and Efficient: Stream Cipher is highly efficient for encrypting data in streams or long streams of data, making it ideal for applications that require low latency.
- Simple: The implementation is relatively simple as it only requires a bitwise XOR operation.
- Flexible: It can be used for data of varying lengths.# Cons
- Key Security: If the key is not randomized enough or used more than once, security may be compromised.
- Not Suitable for All Applications: While fast, it is not always ideal for applications that require a high level of security or in situations where the same data is encrypted with the same key repeatedly.# How it works
## Encryption:
- The user enters the text (plaintext) and the encryption key.
- The encrypt function combines the text with the key stream using a bitwise XOR operation to produce the ciphertext.
- The resultant ciphertext is displayed.## Decryption:
- Ciphertext encrypted with the same key can be decrypted again.
- The decrypt function returns the ciphertext to plaintext using the same key, as XOR is reversible.
- The decrypted plaintext result is displayed.