{"id":47444078,"url":"https://github.com/PeaceFounder/OpenSSLGroups.jl","last_synced_at":"2026-04-06T13:00:56.180Z","repository":{"id":260185103,"uuid":"876410717","full_name":"PeaceFounder/OpenSSLGroups.jl","owner":"PeaceFounder","description":"OpenSSL elliptic curve wrapper for CryptoGroups","archived":false,"fork":false,"pushed_at":"2025-02-11T23:02:24.000Z","size":33,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-02-18T12:41:46.644Z","etag":null,"topics":["cryptography","elliptic-curves","openssl"],"latest_commit_sha":null,"homepage":"","language":"Julia","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/PeaceFounder.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-10-21T23:28:54.000Z","updated_at":"2025-07-06T16:27:53.000Z","dependencies_parsed_at":null,"dependency_job_id":"a618fcbb-ff8b-4860-90fb-3d917dfbbfeb","html_url":"https://github.com/PeaceFounder/OpenSSLGroups.jl","commit_stats":null,"previous_names":["peacefounder/opensslgroups.jl"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/PeaceFounder/OpenSSLGroups.jl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PeaceFounder%2FOpenSSLGroups.jl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PeaceFounder%2FOpenSSLGroups.jl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PeaceFounder%2FOpenSSLGroups.jl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PeaceFounder%2FOpenSSLGroups.jl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PeaceFounder","download_url":"https://codeload.github.com/PeaceFounder/OpenSSLGroups.jl/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PeaceFounder%2FOpenSSLGroups.jl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31473271,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-06T08:36:52.050Z","status":"ssl_error","status_checked_at":"2026-04-06T08:36:51.267Z","response_time":112,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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","elliptic-curves","openssl"],"created_at":"2026-03-23T06:00:59.902Z","updated_at":"2026-04-06T13:00:56.173Z","avatar_url":"https://github.com/PeaceFounder.png","language":"Julia","funding_links":[],"categories":["Cryptography"],"sub_categories":["Elliptic Curve Cryptography"],"readme":"# OpenSSLGroups.jl\n\n[![codecov](https://codecov.io/gh/PeaceFounder/OpenSSLGroups.jl/graph/badge.svg?token=566UV5TQ24)](https://codecov.io/gh/PeaceFounder/OpenSSLGroups.jl)\n\nOpenSSLGroups.jl provides high-performance cryptographic group operations by wrapping OpenSSL implementations while maintaining full compatibility with the [CryptoGroups.jl](https://github.com/PeaceFounder/CryptoGroups.jl) interface. This package offers a 50-130x performance improvement for exponentiations over CryptoGroups implementations while preserving type safety and ease of use.\n\n## Features\n\n- **Full CryptoGroups.jl Compatibility**: Seamlessly construct `@ECPoint` and `@ECGroup` types\n- **Zero-Cost Abstractions**: Group operations are optimized to spend time only in core OpenSSL functions (`EC_POINT_add` and `EC_POINT_mul`)\n- **Efficient Resource Management**: Reuses contexts and group pointers for optimal performance\n- **Robust Multithreading Support**: Parallel processing for batch operations\n- **Type Safety**: Maintains all type safety guarantees from CryptoGroups.jl\n- **Comprehensive Curve Support**: Includes all standard curves available in OpenSSL\n\n## Installation\n\n```julia\nusing Pkg\nPkg.add(\"OpenSSLGroups\")\n```\n\n## Basic Usage\n\n```julia\nusing OpenSSLGroups\n\nP = OpenSSLGroups.SecP256k1\npoint = P()\n\npoint * 3 == point + 2 * point\nP(octet(point)) == point\nP(octet(point; mode=:compressed)) == point\nP(value(point)) == point\n```\n\n## Integration with CryptoGroups.jl\n\nOpenSSLGroups.jl can be used as a drop-in replacement for CryptoGroups.jl:\n\n```julia\nusing OpenSSLGroups\nusing CryptoGroups\n\n# Using with ECGroup macro\nG = @ECGroup{OpenSSLGroups.SecP256k1}\ng = G()\n\n# Basic group operations work identically\ng^3 * g^5 / g^2 == (g^3)^2 == g^6\ng^(order(G) - 1) * g == one(G)\n```\n\n## Supported Curves\n\n### Prime Field Curves\n\n#### NIST Curves (SECG)\n| Curve Name | OpenSSLGroups Type | Alternate Names |\n|------------|-------------------|-----------------|\n| P-192 | `Prime192v1` | (secp192r1, prime192v1) |\n| P-224 | `SecP224r1` | (secp224r1) |\n| P-256 | `Prime256v1` | (secp256r1, prime256v1) |\n| P-384 | `SecP384r1` | (secp384r1) |\n| P-521 | `SecP521r1` | (secp521r1) |\n\n#### Koblitz Curves (SECG)\n| Curve Name | OpenSSLGroups Type | Alternate Names |\n|------------|-------------------|-----------------|\n| secp160k1 | `SecP160k1` | |\n| secp192k1 | `SecP192k1` | |\n| secp224k1 | `SecP224k1` | |\n| secp256k1 | `SecP256k1` | (Bitcoin curve) |\n\n#### Brainpool Curves\n| Curve Name | OpenSSLGroups Type | Notes |\n|------------|-------------------|--------|\n| brainpoolP160r1 | `BrainpoolP160r1` | Random curve |\n| brainpoolP192r1 | `BrainpoolP192r1` | Random curve |\n| brainpoolP224r1 | `BrainpoolP224r1` | Random curve |\n| brainpoolP256r1 | `BrainpoolP256r1` | Random curve |\n| brainpoolP320r1 | `BrainpoolP320r1` | Random curve |\n| brainpoolP384r1 | `BrainpoolP384r1` | Random curve |\n| brainpoolP512r1 | `BrainpoolP512r1` | Random curve |\n\n### Binary Field Curves\n\n#### NIST Koblitz Curves\n| Curve Name | OpenSSLGroups Type | Alternate Names |\n|------------|-------------------|-----------------|\n| K-163 | `SecT163k1` | (sect163k1) |\n| K-233 | `SecT233k1` | (sect233k1) |\n| K-283 | `SecT283k1` | (sect283k1) |\n| K-409 | `SecT409k1` | (sect409k1) |\n| K-571 | `SecT571k1` | (sect571k1) |\n\n#### NIST Pseudorandom Curves\n| Curve Name | OpenSSLGroups Type | Alternate Names |\n|------------|-------------------|-----------------|\n| B-163 | `SecT163r2` | (sect163r2) |\n| B-233 | `SecT233r1` | (sect233r1) |\n| B-283 | `SecT283r1` | (sect283r1) |\n| B-409 | `SecT409r1` | (sect409r1) |\n| B-571 | `SecT571r1` | (sect571r1) |\n\n#### Other Notable Curves\n| Curve Name | OpenSSLGroups Type | Notes |\n|------------|-------------------|--------|\n| SM2 | `SM2` | Chinese standard curve |\n| WTLS | `WtlsCurve1` through `WtlsCurve12` | WAP/TLS specific curves |\n| IPSec | `IpsecCurve3`, `IpsecCurve4` | IPSec specific curves |\n\nAdditional curves (c2pnb/c2tnb series) are also implemented but are less commonly used in modern cryptographic applications.\n\n## Integration with Higher-Level Protocols\n\nThe package works seamlessly with cryptographic protocol implementations:\n\n```julia\nusing CryptoGroups\nusing OpenSSLGroups\nusing ShuffleProofs: shuffle, verify\nusing SigmaProofs.ElGamal: Enc\nusing SigmaProofs.Verificatum: ProtocolSpec\n\n# Set up ElGamal encryption with OpenSSL curve\ng = @ECGroup{OpenSSLGroups.Prime256v1}()\nsk = 123\npk = g^sk\n\n# Create encryption helper\nenc = Enc(pk, g)\n\n# Example encryption and shuffle proof\nplaintexts = [g^4, g^2, g^3] .|\u003e tuple\nciphertexts = enc(plaintexts, [2, 3, 4]) \n\nverifier = ProtocolSpec(; g)\nsimulator = shuffle(ciphertexts, g, pk, verifier)\n@assert verify(simulator)\n```\n\n## Multithreading Example\n\n```julia\nusing CryptoGroups\nusing OpenSSLGroups\nusing Base.Threads\n\n# Create a group and base point\nG = @ECGroup{OpenSSLGroups.SecP256k1}\ng = G()\n\n# Parallel scalar multiplications\nfunction parallel_scalarmul(g, scalars)\n    n = length(scalars)\n    results = Vector{typeof(g)}(undef, n)\n    \n    @threads for i in 1:n\n        results[i] = g^scalars[i]\n    end\n    \n    return results\nend\n\n# Example usage\nscalars = rand(1:order(G), 1000)\npoints = parallel_scalarmul(g, scalars)\n\n# Verify results\n@assert all(points[i] == g^scalars[i] for i in 1:length(scalars))\n```\n\n## Performance Comparison\n\nHere's a simple benchmark comparing OpenSSLGroups with CryptoGroups:\n\n```julia\nusing BenchmarkTools\nusing OpenSSLGroups\nusing CryptoGroups\n\n# OpenSSL implementation\np1 = @ECGroup{OpenSSLGroups.Prime256v1}()\np2 = p1^123\n@btime $p1 ^ (order(p1) - 1)\n@btime $p1 * $p2\n\n# Pure Julia implementation\nq1 = @ECGroup{P_256}()\nq2 = q1^123\n@btime $q1 ^ (order(q1) - 1)\n@btime $q1 * $q2\n\n# Results show ~10-20x speedup for typical operations\n```\nPreliminary results show that exponentiations are 50x faster, and multiplications are 130x faster than that implemented in CryptoGroups.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPeaceFounder%2FOpenSSLGroups.jl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FPeaceFounder%2FOpenSSLGroups.jl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPeaceFounder%2FOpenSSLGroups.jl/lists"}