{"id":17871056,"url":"https://github.com/seresistvanandras/hashingtoclassgroups","last_synced_at":"2025-08-14T18:31:57.757Z","repository":{"id":216445394,"uuid":"712955773","full_name":"seresistvanandras/hashingToClassGroups","owner":"seresistvanandras","description":"How (not) to hash into class groups of imaginary quadratic fields?","archived":false,"fork":false,"pushed_at":"2024-01-10T08:18:58.000Z","size":6046,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-10-28T11:31:28.994Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Jupyter Notebook","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/seresistvanandras.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":"2023-11-01T14:49:20.000Z","updated_at":"2024-06-10T12:27:22.000Z","dependencies_parsed_at":null,"dependency_job_id":"161d6650-da69-496f-9b45-b91651598123","html_url":"https://github.com/seresistvanandras/hashingToClassGroups","commit_stats":null,"previous_names":["seresistvanandras/hashingtoclassgroups"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seresistvanandras%2FhashingToClassGroups","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seresistvanandras%2FhashingToClassGroups/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seresistvanandras%2FhashingToClassGroups/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seresistvanandras%2FhashingToClassGroups/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/seresistvanandras","download_url":"https://codeload.github.com/seresistvanandras/hashingToClassGroups/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229854497,"owners_count":18134787,"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":[],"created_at":"2024-10-28T10:22:44.444Z","updated_at":"2024-12-15T17:40:20.683Z","avatar_url":"https://github.com/seresistvanandras.png","language":"Jupyter Notebook","readme":"# How (\u003cem\u003enot\u003c/em\u003e) to hash into class groups of imaginary quadratic fields?\n\nThis repository contains the open-source code of the following pre-print paper:\n\nTitle: How (\u003cem\u003enot\u003c/em\u003e) to hash into class groups of imaginary quadratic fields?\n\nCurrently available at the following links:\n* IACR [eprint link](https://eprint.iacr.org/2024/034.pdf).\n* Researchgate [link](https://www.researchgate.net/publication/377241277_How_not_to_hash_into_class_groups_of_imaginary_quadratic_fields).\n\n The Python3 code investigates two main questions:\n* How (\u003cem\u003enot\u003c/em\u003e) to hash into class groups of imaginary quadratic fields?\n* How to hash into class groups of imaginary quadratic fields?\n\n  It mostly contains a Jupyter Notebook with the following measurements, illustrations, and visualizations.\n\n## Insecure hash-to-class group functions\n\n### SageMath's random form solution\nWe show that selecting a random binary quadratic form and reducing it in a certain interval results in a codomain with a skewed, power-law distribution. We also show, that if a VDF was deployed with this hash function, then the deployment would be completely insecure.\n### Uniformly random b\nIt might be tempting to sample a uniformly random coefficient \"b\" and then choose the coefficient \"a\" of the reduced form accordingly. We show that the distribution of coefficient \"b\" is not uniform. Hence, this strategy cannot yield a uniform codomain in a class group.\n## Secure hash-to-class group functions\nWe propose and implement two families of hash functions with a class group codomain.\n### CSIDH hash\nThis hash function is reminiscent of the key generation algorithm of CSIDH. The main idea is that one precomputes a set of generating ideals with small prime norms and then composes these ideals according to another hash function output. \n### Wesolowski hash\nWesolowski's original construction samples a uniformly random prime and generates a corresponding \"b\" coefficient. This function has two major downsides: 1) it must generate large primes, and 2) it is not surjective. We propose an extension to this function that deals with these issues.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseresistvanandras%2Fhashingtoclassgroups","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fseresistvanandras%2Fhashingtoclassgroups","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseresistvanandras%2Fhashingtoclassgroups/lists"}