{"id":25887944,"url":"https://github.com/dexcompiler/curves","last_synced_at":"2026-06-04T13:31:24.773Z","repository":{"id":279157100,"uuid":"937886235","full_name":"dexcompiler/curves","owner":"dexcompiler","description":"Elliptic curve operations over finite fields","archived":false,"fork":false,"pushed_at":"2025-02-24T06:30:31.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-05-23T22:06:49.590Z","etag":null,"topics":["cryptography","csharp","elliptic-curve-cryptography","finite-fields","high-performance","prime-numbers"],"latest_commit_sha":null,"homepage":"","language":"C#","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/dexcompiler.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}},"created_at":"2025-02-24T04:22:17.000Z","updated_at":"2025-02-24T06:30:34.000Z","dependencies_parsed_at":"2025-02-24T05:28:21.527Z","dependency_job_id":"98ed3a73-eb4a-42bd-b467-b42efe646c35","html_url":"https://github.com/dexcompiler/curves","commit_stats":null,"previous_names":["dexcompiler/curves"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dexcompiler/curves","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dexcompiler%2Fcurves","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dexcompiler%2Fcurves/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dexcompiler%2Fcurves/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dexcompiler%2Fcurves/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dexcompiler","download_url":"https://codeload.github.com/dexcompiler/curves/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dexcompiler%2Fcurves/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33907693,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-04T02:00:06.755Z","response_time":64,"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":["cryptography","csharp","elliptic-curve-cryptography","finite-fields","high-performance","prime-numbers"],"created_at":"2025-03-02T18:29:15.238Z","updated_at":"2026-06-04T13:31:24.753Z","avatar_url":"https://github.com/dexcompiler.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Elliptic Curve Implementation\n\nA C# implementation of elliptic curve arithmetic operations over finite fields, primarily focused on the mathematical fundamentals that underpin elliptic curve cryptography (ECC).\n\n## Overview\n\nThis project provides a generic implementation of elliptic curves using the Weierstrass form: y² = x³ + ax + b over a finite field of prime characteristic p. It includes core operations like:\n\n- Point addition\n- Point doubling\n- Scalar multiplication\n- Point validation\n- Point negation\n\n## Usage Example\n\n```csharp\n// Create an elliptic curve y² = x³ + 2x + 3 (mod 17)\nvar curve = new EllipticCurve(\n    a: 2,\n    b: 3, \n    prime: 17,\n    basePoint: new Point\u003cEllipticCurve\u003e(3, 6),\n    order: 19\n);\n\n// Verify if a point lies on the curve\nvar point = new Point\u003cEllipticCurve\u003e(3, 6);\nbool isValid = curve.IsOnCurve(point); // true\n\n// Perform point addition\nvar sum = EllipticCurve.Add(curve, point1, point2);\n\n// Scalar multiplication \nvar result = EllipticCurve.ScalarMultiply(curve, point, k);\n```\n\n## Features\n\n- **Generic Implementation**: Supports different curve types through the `IEllipticCurve` interface\n- **Core Operations**:\n    - Point addition and doubling\n    - Scalar multiplication using double-and-add algorithm\n    - Point validation\n    - Point negation\n- **Mathematical Utilities**:\n    - Modular arithmetic operations\n    - Extended Euclidean algorithm for modular inverse\n- **Test Coverage**: Comprehensive test suite verifying curve operations\n\n## Mathematical Background\n\nThe implementation uses the standard formulas for elliptic curve arithmetic:\n\n- **Point Addition**: When P₁ = (x₁, y₁) ≠ ±P₂ = (x₂, y₂):\n    - λ = (y₂ - y₁)/(x₂ - x₁)\n    - x₃ = λ² - x₁ - x₂\n    - y₃ = λ(x₁ - x₃) - y₁\n\n- **Point Doubling**: When P = (x, y) and P is doubled:\n    - λ = (3x² + a)/(2y)\n    - x₃ = λ² - 2x\n    - y₃ = λ(x - x₃) - y\n\nAll operations are performed modulo the prime characteristic p.\n\n## Security Note\n\nThis implementation is primarily for educational purposes and demonstrates the mathematical concepts behind ECC. For production cryptographic purposes, use established cryptographic libraries.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdexcompiler%2Fcurves","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdexcompiler%2Fcurves","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdexcompiler%2Fcurves/lists"}