{"id":13507695,"url":"https://github.com/alisinabh/ntru_elixir","last_synced_at":"2025-03-21T16:32:07.678Z","repository":{"id":62430135,"uuid":"114780781","full_name":"alisinabh/ntru_elixir","owner":"alisinabh","description":"a NIF for libntru. NTRU is a post quantum cryptography algorithm.","archived":false,"fork":false,"pushed_at":"2020-08-04T15:44:40.000Z","size":41,"stargazers_count":16,"open_issues_count":5,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-10-13T09:57:01.677Z","etag":null,"topics":["cryptography","elixir-library","encryption","hacktoberfest","key-cryptosystems","lattice-based-crypto","ntru","ntru-elixir","quantom-cryptography"],"latest_commit_sha":null,"homepage":"","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alisinabh.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":"2017-12-19T15:22:49.000Z","updated_at":"2024-07-20T06:45:44.000Z","dependencies_parsed_at":"2022-11-01T19:47:16.991Z","dependency_job_id":null,"html_url":"https://github.com/alisinabh/ntru_elixir","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alisinabh%2Fntru_elixir","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alisinabh%2Fntru_elixir/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alisinabh%2Fntru_elixir/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alisinabh%2Fntru_elixir/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alisinabh","download_url":"https://codeload.github.com/alisinabh/ntru_elixir/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221817062,"owners_count":16885455,"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","elixir-library","encryption","hacktoberfest","key-cryptosystems","lattice-based-crypto","ntru","ntru-elixir","quantom-cryptography"],"created_at":"2024-08-01T02:00:37.873Z","updated_at":"2024-10-28T10:29:33.183Z","avatar_url":"https://github.com/alisinabh.png","language":"Elixir","funding_links":[],"categories":["Cryptography"],"sub_categories":[],"readme":"# NtruElixir\n[![Build Status](https://travis-ci.org/alisinabh/ntru_elixir.svg?branch=master)](https://travis-ci.org/alisinabh/ntru_elixir) [![Coverage Status](https://coveralls.io/repos/github/alisinabh/ntru_elixir/badge.svg?branch=master)](https://coveralls.io/github/alisinabh/ntru_elixir?branch=master)\n\n\nA wrapper around [libntru](https://github.com/tbuktu/libntru) using NIFs.\n\n**WARNING:** This is a work in progress and shall not be used in production\nprojects yet.\n\n## What is NTRU?\n\nNTRU is a patented and open source public-key cryptosystem that uses lattice-based cryptography to encrypt and decrypt data. It consists of two algorithms: NTRUEncrypt, which is used for encryption, and NTRUSign, which is used for digital signatures. Unlike other popular public-key cryptosystems, it is resistant to attacks using Shor's algorithm and its performance has been shown to be significantly better\n\n[More on Wikipedia](https://en.wikipedia.org/wiki/NTRU)\n\n## Installation\n\nAdd `:ntru_elixir` to your deps.\n\n```elixir\ndef deps do\n  [\n    {:ntru_elixir, \"~\u003e 0.0.0\"}\n  ]\nend\n```\n\n## Documentation\n\nPlease visit [hexdocs.pm/ntru_elixir](https://hexdocs.pm/ntru_elixir/NtruElixir.html)\nfor complete documentations.\n\n### Creating KeyPairs\n\nIn NTRU each private key can have multiple public keys. However to decrypt the\nencrypted data the same public key which data was encrypted with is necessarry.\n\nTo Create a KeyPair:\n\n```elixir\nNtruElixir.generate_key_pair(pub_count, ntru_params(optional))\n{:ok,\n [%NtruElixir.KeyPair{ntru_params: :NTRU_DEFAULT_PARAMS_128_BITS,\n   priv_key: \u003c\u003c...\u003e\u003e,\n   pub_key: \u003c\u003c...\u003e\u003e}, ...]}\n```\n\nNote that if you specify `pub_count` you will get multiple KeyPair structs.\n\n### Encrypting\n\nBinaries can be encrypted with a keypair having the public key\n\n```elixir\nNtruElixir.encrypt(key_pair, binary_to_encrypt)\n{:ok, encrypted_binary}\n```\n\n### Decrypting\n\nEncrypted binaries can be decrypted with a keypair having BOTH public key and\nprivate key.\nNote that the public key should be the same as encryption public key.\n\n```elixir\nNtruElixir.decrypt(key_pair, binary_to_decrypt)\n{:ok, decrypted_binary}\n```\n\n## License\n\nThe `ntru_elixir` project is licensed under **GNU GPLv3** however\nit uses another libraries with different licenses.\n\n`libntru` is licensed under BSD-3-Clause\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falisinabh%2Fntru_elixir","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falisinabh%2Fntru_elixir","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falisinabh%2Fntru_elixir/lists"}