{"id":20402158,"url":"https://github.com/exploide/ulpcrypt","last_synced_at":"2025-09-06T15:35:20.798Z","repository":{"id":20459237,"uuid":"23736507","full_name":"exploide/ulpcrypt","owner":"exploide","description":"Implementation of the U-LP Cryptosystem","archived":false,"fork":false,"pushed_at":"2018-08-18T10:13:29.000Z","size":194,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-05T01:44:25.057Z","etag":null,"topics":["cryptography","cryptography-library"],"latest_commit_sha":null,"homepage":null,"language":"C","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/exploide.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}},"created_at":"2014-09-06T14:32:54.000Z","updated_at":"2024-10-25T15:57:52.000Z","dependencies_parsed_at":"2022-07-31T20:38:05.762Z","dependency_job_id":null,"html_url":"https://github.com/exploide/ulpcrypt","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/exploide/ulpcrypt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exploide%2Fulpcrypt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exploide%2Fulpcrypt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exploide%2Fulpcrypt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exploide%2Fulpcrypt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/exploide","download_url":"https://codeload.github.com/exploide/ulpcrypt/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exploide%2Fulpcrypt/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273926012,"owners_count":25192313,"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","status":"online","status_checked_at":"2025-09-06T02:00:13.247Z","response_time":2576,"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","cryptography-library"],"created_at":"2024-11-15T04:53:13.431Z","updated_at":"2025-09-06T15:35:20.763Z","avatar_url":"https://github.com/exploide.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ulpcrypt\n\nImplementation of the U-LP Cryptosystem\n\nThis library is an implementation of the U-LP cryptosystem as described by Cabarcas, Göpfert, and Weiden in *Provably Secure LWE Encryption with Smallish Uniform Noise and Secret*. The library provides functions for key generation, encryption, and decryption, for the standard variant of U-LP, as well as for the ring-LWE variant.\n\nU-LP is a provably secure (post-quantum) encryption scheme, based on the *learning with errors* problem.\n\nWarning: Note that this cryptosystem is very young and not very extensively researched, yet. The purpose of this library is mainly for academic purposes. So take care when considering this for use in practice.\n\n\n## Building ulpcrypt\n\nulpcrypt is built using the CMake build system. Primarily it is configured for the use with the gcc compiler, but should also work with clang. ulpcrypt should compile on Linux, Windows, and Mac OS X. The following shows the steps required for compilation, exemplary on Linux:\n\n```\n$ mkdir build\n$ cd build\n$ cmake ..\n$ make\n```\n\nThis should build both, a static and a shared version of ulpcrypt.\n\n\n## Testing ulpcrypt\n\nThis library comes with a test suite, powered by CTest, the testing tool which is shipped with CMake. To run the test suite, just execute in the build folder:\n\n```\n$ make test\n```\n\nAll the test should pass before continuing using the library.\n\n\n## Using ulpcrypt\n\nulpcrypt compiles to a shared and a static library. To make the function definitions available, just include the\nheader `ulpcrypt.h`. Most functions return the value 0 on success and a negative value, otherwise. Exceptions\nare the functions for allocating structures, which return a pointer, and the functions for deallocating structures,\nwhich return nothing.\n\nAn API documentation including structures and functions is available in the `doc/` directory.\n\nExemplary usage:\n\n```c\n#include \u003cstdlib.h\u003e\n\n#include \"ulpcrypt.h\"\n\nint main() {\n\n    size_t n = 192;\n    size_t l = 96;\n    uint64_t sk;\n    uint64_t se;\n    uint64_t q;\n\n    ulp_generate_parameters(n, l, \u0026sk, \u0026se, \u0026q);\n\n    ulp_public_key* pub_key;\n    ulp_private_key* priv_key;\n    ulp_generate_key_pair(n, l, sk, se, q, \u0026pub_key, \u0026priv_key);\n\n    uint8_t msg[] = {'H', 'e', 'l', 'l', 'o', ' ', 'W', 'o', 'r', 'l', 'd', '!'};\n\n    ulp_ciphertext* ciphertext;\n    ulp_encrypt(msg, pub_key, \u0026ciphertext);\n\n    uint8_t* decrypted;\n    ulp_decrypt(ciphertext, priv_key, \u0026decrypted);\n\n    ulp_free_public_key(pub_key);\n    ulp_free_private_key(priv_key);\n    ulp_free_ciphertext(ciphertext);\n    free(decrypted);\n    return 0;\n\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexploide%2Fulpcrypt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fexploide%2Fulpcrypt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexploide%2Fulpcrypt/lists"}