{"id":29189939,"url":"https://github.com/malisha4065/javap2pfiletransfer","last_synced_at":"2026-06-09T16:31:20.761Z","repository":{"id":301779451,"uuid":"1010270326","full_name":"Malisha4065/JavaP2PFileTransfer","owner":"Malisha4065","description":"Java P2P Secure File Transfer","archived":false,"fork":false,"pushed_at":"2025-06-28T19:08:21.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-28T19:49:02.256Z","etag":null,"topics":["cryptography","java","p2p"],"latest_commit_sha":null,"homepage":"","language":"Java","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/Malisha4065.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,"zenodo":null}},"created_at":"2025-06-28T17:59:34.000Z","updated_at":"2025-06-28T19:15:58.000Z","dependencies_parsed_at":"2025-06-28T19:49:04.307Z","dependency_job_id":"98375694-6d28-42c8-8921-fa597c362c2a","html_url":"https://github.com/Malisha4065/JavaP2PFileTransfer","commit_stats":null,"previous_names":["malisha4065/javap2pfiletransfer"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Malisha4065/JavaP2PFileTransfer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Malisha4065%2FJavaP2PFileTransfer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Malisha4065%2FJavaP2PFileTransfer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Malisha4065%2FJavaP2PFileTransfer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Malisha4065%2FJavaP2PFileTransfer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Malisha4065","download_url":"https://codeload.github.com/Malisha4065/JavaP2PFileTransfer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Malisha4065%2FJavaP2PFileTransfer/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263047686,"owners_count":23405280,"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","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":["cryptography","java","p2p"],"created_at":"2025-07-01T23:18:23.053Z","updated_at":"2026-06-09T16:31:20.728Z","avatar_url":"https://github.com/Malisha4065.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Java P2P File Transfer\n\nThis projeWhen launched, you'll see a menu:\n\n**Basic Version:**\n```\nSelect an option:\n 1) Receive a file\n 2) Send a file\n 0) Exit\nEnter choice:\n```\n\n**Secure Version:**\n```\n=== SECURE P2P FILE TRANSFER ===\nSelect an option:\n 1) Receive a file (secure)\n 2) Send a file (secure)\n 0) Exit\nEnter choice:\n```\n\n**Receive** mode (choice `1`): you'll be prompted for the listening port; the incoming file will be saved in the current directory. In secure mode, files are prefixed with \"secure_\" and are encrypted during transfer.\n\n**Send** mode (choice `2`): you'll be prompted for the target host, port, and file path; the chosen file will be sent to the receiver.  \nPaths beginning with `~` are automatically expanded to your home directory.\n\nChoose `0` to exit the application.\n\n## Security Features (SecurePeer)\n\nThe secure version implements a comprehensive cryptographic protocol:\n\n1. **RSA Key Exchange**: Each peer generates a 2048-bit RSA key pair for authentication and key exchange\n2. **Nonce Challenge**: Sender creates and signs a nonce for identity verification\n3. **AES Session Key**: Receiver generates a 128-bit AES session key and IV for file encryption\n4. **Digital Signatures**: All critical data (nonces, keys, file hashes, timestamps) are signed with RSA\n5. **File Integrity**: SHA-256 hashing ensures file integrity during transfer\n6. **Timestamp Protection**: Prevents replay attacks with signed timestamps\n7. **End-to-End Encryption**: Files are encrypted with AES-128-CBC before transmission\n\n### Security Protocol Flow:\n1. Peer authentication via RSA public key exchange\n2. Nonce challenge for identity verification\n3. Secure AES session key establishment\n4. File encryption and digital signing\n5. Integrity verification upon receipt\n\nAll cryptographic operations use industry-standard algorithms (RSA-2048, AES-128, SHA-256) ensuring robust security for file transfers. a simple peer-to-peer file transfer application and a secure version with end-to-end encryption.\n\n## Prerequisites\n\n- Java 8 or higher\n\n## Compile\n\n### Basic Version\n```bash\njavac -d bin src/Peer.java\n```\n\n### Secure Version\n```bash\njavac -d bin src/SecurePeer.java src/SecureFileTransferProtocol.java\n```\n\n## Usage\n\n### Basic P2P Transfer\nAfter compilation, simply run the peer without arguments; it will prompt for actions:\n\n```bash\njava -cp bin Peer\n```\n\n### Secure P2P Transfer\nFor encrypted file transfers with digital signatures:\n\n```bash\njava -cp bin SecurePeer\n```\n\nWhen launched, you’ll see a menu:\n\n```\nSelect an option:\n 1) Receive a file\n 2) Send a file\n 0) Exit\nEnter choice:\n```\n\n**Receive** mode (choice `1`): you’ll be prompted for the listening port; the incoming file will be saved in the current directory under its original name.  \n\n**Send** mode (choice `2`): you’ll be prompted for the target host, port, and file path; the chosen file will be sent to the receiver.  \nPaths beginning with `~` are automatically expanded to your home directory.\n\nChoose `0` to exit the application.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmalisha4065%2Fjavap2pfiletransfer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmalisha4065%2Fjavap2pfiletransfer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmalisha4065%2Fjavap2pfiletransfer/lists"}