{"id":27598099,"url":"https://github.com/shaina-gh/dss","last_synced_at":"2025-04-22T14:10:53.771Z","repository":{"id":288743340,"uuid":"969058623","full_name":"shaina-gh/DSS","owner":"shaina-gh","description":"Java implementation of the Digital Signature Standard (DSS) for message integrity and authenticity verification.","archived":false,"fork":false,"pushed_at":"2025-04-19T09:45:14.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-19T15:39:00.786Z","etag":null,"topics":["cryptography","cryptography-algorithms","digital-signature-algorithm","digital-signature-authentication","dss","java","signature-verification"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shaina-gh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-04-19T09:39:59.000Z","updated_at":"2025-04-19T09:48:12.000Z","dependencies_parsed_at":"2025-04-19T15:42:39.900Z","dependency_job_id":null,"html_url":"https://github.com/shaina-gh/DSS","commit_stats":null,"previous_names":["shaina-gh/dss"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shaina-gh%2FDSS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shaina-gh%2FDSS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shaina-gh%2FDSS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shaina-gh%2FDSS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shaina-gh","download_url":"https://codeload.github.com/shaina-gh/DSS/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250255700,"owners_count":21400410,"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","cryptography-algorithms","digital-signature-algorithm","digital-signature-authentication","dss","java","signature-verification"],"created_at":"2025-04-22T14:10:52.972Z","updated_at":"2025-04-22T14:10:53.766Z","avatar_url":"https://github.com/shaina-gh.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🛡️ Digital Signature Standard (DSS) in Java\n\n\u003e Java implementation of the Digital Signature Standard (DSS) for message integrity and authenticity verification.\n\n---\n\n### Author: Shaina\n\n---\n\n## 🎯 Aim\n\nTo implement the Digital Signature Standard (DSS) to generate and verify digital signatures, ensuring the authenticity and integrity of communicated messages.\n\n---\n\n## ⚙️ How It Works\n\nThe Digital Signature Standard is implemented in the following phases:\n\n1. **Hashing the Message:**\n   - A custom hash function simulates a SHA-like hashing mechanism to generate a digest from the input message.\n\n2. **Key Generation:**\n   - Generate a private key `x`.\n   - Calculate the public key `y = g^x mod p`, where `g` is the generator.\n\n3. **Signature Generation:**\n   - Use the private key to compute the signature components `r` and `s` using a fixed ephemeral key `k`.\n   - These values are derived through modular exponentiation and inversion operations.\n\n4. **Signature Verification:**\n   - Using the public key, message hash, and the signature, the verifier computes a value `v`.\n   - The signature is valid if `v == r`.\n\n---\n\n## 🔑 Key Components\n\n- `modularExponentiation`: Computes (base^exponent) mod modulus.\n- `extendedEuclidean`: Finds GCD and the Bézout coefficients for modular inverse.\n- `findModularInverse`: Used for computing modular multiplicative inverses.\n- `customHash`: A deterministic hash function simulating SHA behavior.\n- `generateDSSKeys`: Generates the private and public keys.\n- `createDigitalSignature`: Computes the digital signature for a message.\n- `verifyDigitalSignature`: Validates the authenticity of the digital signature.\n\n---\n\n## 🚀 Steps to Run\n\n1. **Clone the repo**  \n   ```bash\n   git clone https://github.com/shaina-gh/DSS.git\n   cd DSS\n   ```\n\n2. **Compile and Run the Java File**\n\n    ```bash\n    javac DSS.java\n    java DSS\n    ```\n3. **Expected Output**\n\n   Signature creation and verification results for both an original and a tampered message.\n\n---\n\n## 🧪 Sample Output\n\n``` yaml\nCreated Private Key: 3\nCreated Public Key: 18\nMessage Digest: 138972264302481705700123578240310737814155524\nEphemeral Value k: 1\nSignature Component r\nSignature Component s: 5\nVerification Value v: 4\nSignature Verification Result: True\nVerification Value v: 1\nTampered Message Verification Result: False\n```\n\n---\n\n## 📚 Observation\nSignature verification succeeds for valid, untampered messages.\n\nSignature verification fails for tampered messages, proving the integrity of DSS.\n\n---\n\n## ✅ Result\nThe DSS algorithm for digital signature generation and verification was successfully implemented in Java.\n\n---\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshaina-gh%2Fdss","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshaina-gh%2Fdss","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshaina-gh%2Fdss/lists"}