{"id":22031899,"url":"https://github.com/chmuhammadasim/encryption-decryption-masm615","last_synced_at":"2025-10-06T11:18:56.412Z","repository":{"id":136571446,"uuid":"581437787","full_name":"chmuhammadasim/Encryption-Decryption-masm615","owner":"chmuhammadasim","description":"A comprehensive encryption and decryption program developed entirely in Assembly Language using XOR bitwise operations. This project demonstrates secure data handling, file I/O operations, and low-level programming concepts in a user-friendly console interface.","archived":false,"fork":false,"pushed_at":"2025-09-19T06:00:03.000Z","size":12,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-19T07:43:29.571Z","etag":null,"topics":["assembly","encryption-decryption","masm615"],"latest_commit_sha":null,"homepage":"","language":"Assembly","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chmuhammadasim.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-12-23T07:24:22.000Z","updated_at":"2025-09-19T06:01:11.000Z","dependencies_parsed_at":"2023-11-21T09:44:18.178Z","dependency_job_id":null,"html_url":"https://github.com/chmuhammadasim/Encryption-Decryption-masm615","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/chmuhammadasim/Encryption-Decryption-masm615","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chmuhammadasim%2FEncryption-Decryption-masm615","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chmuhammadasim%2FEncryption-Decryption-masm615/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chmuhammadasim%2FEncryption-Decryption-masm615/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chmuhammadasim%2FEncryption-Decryption-masm615/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chmuhammadasim","download_url":"https://codeload.github.com/chmuhammadasim/Encryption-Decryption-masm615/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chmuhammadasim%2FEncryption-Decryption-masm615/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278599586,"owners_count":26013510,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-06T02:00:05.630Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["assembly","encryption-decryption","masm615"],"created_at":"2024-11-30T08:24:06.959Z","updated_at":"2025-10-06T11:18:56.407Z","avatar_url":"https://github.com/chmuhammadasim.png","language":"Assembly","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Encryption-Decryption MASM615\n\nA comprehensive encryption and decryption program developed entirely in Assembly Language using XOR bitwise operations. This project demonstrates secure data handling, file I/O operations, and low-level programming concepts in a user-friendly console interface.\n\n## Table of Contents\n\n- [Overview](#overview)\n- [Features](#features)\n- [Technical Specifications](#technical-specifications)\n- [Program Functionality](#program-functionality)\n- [Installation \u0026 Setup](#installation--setup)\n- [Usage Guide](#usage-guide)\n- [File Structure](#file-structure)\n- [Technical Implementation](#technical-implementation)\n- [Deployment](#deployment)\n- [Troubleshooting](#troubleshooting)\n- [Contributing](#contributing)\n- [License](#license)\n- [Author](#author)\n- [Acknowledgments](#acknowledgments)\n\n## Overview\n\nThe Encryption-Decryption project is a semester project that showcases the power of Assembly Language in implementing cryptographic operations. Built using MASM615, this program provides a complete solution for encrypting text data using XOR operations and storing it securely in files.\n\n### Key Highlights\n\n- **Pure Assembly Language Implementation**: Demonstrates low-level programming expertise\n- **XOR Encryption Algorithm**: Simple yet effective symmetric encryption\n- **File-based Data Persistence**: Secure storage and retrieval of encrypted data\n- **Interactive Menu System**: User-friendly console interface\n- **Educational Value**: Perfect for understanding encryption concepts and Assembly programming\n\n## Features\n\n- **🔐 Data Encryption**: Encrypt text strings using XOR bitwise operations\n- **🔓 Data Decryption**: Decrypt and view original data seamlessly  \n- **💾 File Operations**: Store encrypted data in files (`MICHU.txt`)\n- **👁️ Data Visualization**: Display encrypted data in its raw form\n- **🗑️ Data Management**: Delete stored encrypted data\n- **📋 Menu-Driven Interface**: Easy-to-use console navigation\n- **⚡ Fast Processing**: Optimized Assembly code for efficient execution\n- **🔄 Session Management**: Continue operations until user exits\n\n## Technical Specifications\n\n| Specification | Details |\n|---------------|---------|\n| **Language** | Assembly Language (MASM615) |\n| **Architecture** | x86 (16-bit) |\n| **Memory Model** | Small Model |\n| **Stack Size** | 100h bytes |\n| **Encryption Method** | XOR Bitwise Operation |\n| **File Format** | Plain text (.txt) |\n| **Platform** | DOSBox recommended |\n| **Assembler** | MASM615 |\n\n## Program Functionality\n\nThe program offers five main operations through an interactive menu:\n\n### Menu Options\n\n```\n----------------------------------\n1-ADD Data in Encrypted file\n2-Read decrypted data\n3-show Data from Encrypted file\n4-Delete Data from Encrypted file\n5-Exit Program\n----------------------------------\n```\n\n### Detailed Operation Descriptions\n\n#### 1. ADD Data in Encrypted File\n- Prompts user to enter a string\n- Applies XOR encryption (key: 1)\n- Stores encrypted data in `MICHU.txt`\n- Confirms successful encryption\n\n#### 2. Read Decrypted Data\n- Reads encrypted data from file\n- Applies XOR decryption to restore original text\n- Displays the decrypted string on screen\n\n#### 3. Show Data from Encrypted File\n- Reads and displays raw encrypted data\n- Shows the actual encrypted bytes stored in file\n- Useful for understanding encryption results\n\n#### 4. Delete Data from Encrypted File\n- Allows user to specify file for deletion\n- Creates user-defined files for data management\n- Provides file creation confirmation\n\n#### 5. Exit Program\n- Safely terminates the application\n- Cleans up resources and memory\n\n## Installation \u0026 Setup\n\n### Prerequisites\n\n1. **DOSBox Emulator**\n   - Download from [dosbox.com](https://www.dosbox.com/)\n   - Install and configure DOSBox on your system\n\n2. **MASM615 Assembler**\n   - Ensure MASM615 is available in your DOSBox environment\n   - Set up proper PATH variables for MASM tools\n\n### Setup Instructions\n\n1. **Clone the Repository**\n   ```bash\n   git clone https://github.com/chmuhammadasim/Encryption-Decryption-masm615.git\n   cd Encryption-Decryption-masm615\n   ```\n\n2. **Mount Directory in DOSBox**\n   ```dos\n   mount c: /path/to/project/directory\n   c:\n   ```\n\n3. **Compile the Program**\n   ```dos\n   masm asim.asm\n   link asim.obj\n   ```\n\n4. **Run the Executable**\n   ```dos\n   asim.exe\n   ```\n\n## Usage Guide\n\n### Starting the Program\n\n1. Launch the compiled executable\n2. The program displays a welcome screen with menu options\n3. Enter your choice (1-5) when prompted\n\n### Example Workflow\n\n1. **Encrypt Data**:\n   - Select option `1`\n   - Enter your text string\n   - Program encrypts and saves to file\n\n2. **View Encrypted Data**:\n   - Select option `3`\n   - View the raw encrypted content\n\n3. **Decrypt Data**:\n   - Select option `2`\n   - See your original text restored\n\n4. **Exit**:\n   - Select option `5` to terminate\n\n### Sample Session\n```\nEnter Option : 1\nEnter String 1: Hello World\nYour data has been encrypted!\n\nEnter Option : 3\nencrypted Data: Ifmmp!Xpsme\n\nEnter Option : 2\ndecryption: Hello World\n```\n\n## File Structure\n\n```\nEncryption-Decryption-masm615/\n├── asim.asm          # Main assembly source code\n├── asimlib.lib       # Assembly library file\n├── README.md         # Project documentation\n├── LICENSE          # MIT License file\n├── MICHU.txt        # Generated encrypted data file (runtime)\n└── .gitattributes   # Git configuration\n```\n\n### File Descriptions\n\n- **`asim.asm`**: Core implementation containing all procedures and program logic\n- **`asimlib.lib`**: External library providing additional assembly functions\n- **`MICHU.txt`**: Default output file for storing encrypted data (created at runtime)\n\n## Technical Implementation\n\n### Encryption Algorithm\n\nThe program uses a simple XOR cipher with key value `1`:\n\n```assembly\nencryption proc near\n    mov dx,offset mybuf1\n    mov ah, 3Fh\n    int 21h\n    mov cx,lengthof mybuf1\n    mov bx,0\n    l1:\n    xor mybuf1[bx],1    ; XOR each byte with 1\n    inc bx\n    loop l1\n    ret\nencryption endp\n```\n\n### Key Components\n\n1. **Data Structures**:\n   - Menu strings for user interface\n   - Input/output buffers (100 bytes)\n   - File handle management\n   - User choice storage\n\n2. **File Operations**:\n   - File creation and opening\n   - Reading and writing encrypted data\n   - Proper file handle management\n\n3. **Memory Management**:\n   - Register clearing procedures\n   - Stack and data segment setup\n   - Buffer management\n\n### Security Considerations\n\n- **XOR with key `1`**: Simple encryption suitable for educational purposes\n- **File-based storage**: Data persists between program sessions\n- **Memory clearing**: Registers are cleared after operations\n\n## Deployment\n\n### Production Environment\n\nFor optimal deployment and execution:\n\n1. **Recommended Platform**: DOSBox v0.74 or higher\n2. **Assembler**: MASM615 (Microsoft Macro Assembler)\n3. **Memory Requirements**: Minimal (16-bit addressing)\n4. **Storage**: Small footprint (~10KB for source files)\n\n### Compilation Steps\n\n```dos\n# Step 1: Assemble source code\nmasm asim.asm;\n\n# Step 2: Link object file\nlink asim.obj;\n\n# Step 3: Run executable\nasim.exe\n```\n\n### Distribution\n\nThe compiled executable (`asim.exe`) can be distributed independently with DOSBox for cross-platform compatibility.\n\n## Troubleshooting\n\n### Common Issues\n\n1. **\"File not found\" error**\n   - Ensure `asimlib.lib` is in the same directory\n   - Check file permissions\n\n2. **Compilation errors**\n   - Verify MASM615 is properly installed\n   - Check syntax and include paths\n\n3. **Runtime crashes**\n   - Ensure sufficient memory in DOSBox\n   - Check stack size configuration\n\n4. **File access issues**\n   - Verify write permissions in directory\n   - Check if `MICHU.txt` is locked by another process\n\n### Debug Tips\n\n- Use DOSBox's debug mode for step-by-step execution\n- Check register values during encryption/decryption\n- Verify file contents with hex editor\n\n## Contributing\n\nContributions are welcome! Here's how you can help:\n\n### How to Contribute\n\n1. **Fork the Repository**\n2. **Create a Feature Branch**\n   ```bash\n   git checkout -b feature/amazing-feature\n   ```\n3. **Make Your Changes**\n   - Follow assembly coding conventions\n   - Add comments for complex operations\n   - Test thoroughly in DOSBox\n4. **Commit Your Changes**\n   ```bash\n   git commit -m 'Add amazing feature'\n   ```\n5. **Push to Branch**\n   ```bash\n   git push origin feature/amazing-feature\n   ```\n6. **Open a Pull Request**\n\n### Contribution Guidelines\n\n- Maintain code readability and documentation\n- Test all changes in DOSBox environment\n- Follow existing code style and structure\n- Update README if adding new features\n\n## Badges\n\n[![MIT License](https://img.shields.io/badge/License-MIT-green.svg)](https://choosealicense.com/licenses/mit/)\n[![Assembly](https://img.shields.io/badge/Language-Assembly-blue.svg)](https://github.com/chmuhammadasim/Encryption-Decryption-masm615)\n[![Platform](https://img.shields.io/badge/Platform-DOSBox-orange.svg)](https://www.dosbox.com/)\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Author\n\n**Muhammad Asim Chattha**\n- GitHub: [@chmuhammadasim](https://www.github.com/chmuhammadasim)\n- Institution: Air University, Islamabad, Pakistan\n- Field: Computer Science Student\n\n### 🚀 About Me\n\nHello, I'm Muhammad Asim Chattha, a dedicated Computer Science student currently pursuing my studies at Air University in Islamabad, Pakistan. This Encryption-Decryption project represents my semester work, showcasing expertise in Assembly Language programming and cryptographic concepts.\n\nThis project is not just a coding exercise but a journey into the realm of secure data handling through the ingenious use of XOR bitwise operations, demonstrating the power and precision of low-level programming.\n\n## Acknowledgments\n\n- **Air University** - For providing the educational foundation\n- **Assembly Language Community** - For continuous learning resources\n- **DOSBox Development Team** - For maintaining compatibility\n- **Open Source Community** - For inspiration and collaboration opportunities\n\n---\n\nFeel free to explore, contribute, and delve into the fascinating world of assembly language and encryption! ⚡🔐","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchmuhammadasim%2Fencryption-decryption-masm615","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchmuhammadasim%2Fencryption-decryption-masm615","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchmuhammadasim%2Fencryption-decryption-masm615/lists"}