{"id":19060318,"url":"https://github.com/sgiath/noise-protocol","last_synced_at":"2026-06-19T04:31:14.249Z","repository":{"id":214682397,"uuid":"737100732","full_name":"sgiath/noise-protocol","owner":"sgiath","description":"Elixir implementation of Noise protocol specification","archived":false,"fork":false,"pushed_at":"2025-11-24T22:31:35.000Z","size":1823,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-05-29T04:09:38.936Z","etag":null,"topics":["elixir","noise-protocol-framework"],"latest_commit_sha":null,"homepage":"https://sgiath.dev/libraries#noise","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sgiath.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2023-12-29T20:24:49.000Z","updated_at":"2025-11-24T22:31:00.000Z","dependencies_parsed_at":"2024-01-03T00:46:27.817Z","dependency_job_id":null,"html_url":"https://github.com/sgiath/noise-protocol","commit_stats":null,"previous_names":["sgiath/noise-protocol"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sgiath/noise-protocol","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgiath%2Fnoise-protocol","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgiath%2Fnoise-protocol/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgiath%2Fnoise-protocol/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgiath%2Fnoise-protocol/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sgiath","download_url":"https://codeload.github.com/sgiath/noise-protocol/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgiath%2Fnoise-protocol/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34517748,"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-19T02:00:06.005Z","response_time":61,"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":["elixir","noise-protocol-framework"],"created_at":"2024-11-09T00:14:36.719Z","updated_at":"2026-06-19T04:31:14.244Z","avatar_url":"https://github.com/sgiath.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Noise Protocol\n\n[![Hex.pm](https://img.shields.io/hexpm/v/noise_protocol.svg?style=flat\u0026color=blue)](https://hex.pm/packages/noise_protocol)\n[![Docs](https://img.shields.io/badge/api-docs-green.svg?style=flat)](https://hexdocs.pm/noise_protocol)\n\nElixir implementation of [Noise Protocol Framework](https://noiseprotocol.org/noise.html).\n\n## Project Goals\n\nThe main goal of this project is to provide a complete and correct implementation of the Noise Protocol Framework in Elixir. It aims to:\n\n- Follow the [Noise Protocol Specification](https://noiseprotocol.org/noise.html) precisely.\n- Offer a flexible and easy-to-use API for building secure network protocols.\n- Support a wide range of cryptographic primitives as defined in the spec.\n\n## Project Status\n\nThe project currently implements the core Noise protocol framework with support for the following primitives:\n\n- **Cipher Functions**: AESGCM, ChaChaPoly\n- **Diffie-Hellman Functions**: X25519, X448, Secp256k1\n- **Hash Functions**: SHA256, SHA512, BLAKE2s, BLAKE2b\n\nIt supports the standard handshake patterns and can be used to establish secure channels.\n\n## Quick Installation\n\nAdd `noise_protocol` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [\n    {:noise_protocol, \"~\u003e 0.2.0\"}\n  ]\nend\n```\n\n## Usage Guide\n\nHere is a basic example of how to perform a handshake using the `Noise_IK_25519_ChaChaPoly_BLAKE2s` protocol.\n\n### Initiator\n\n```elixir\n# 1. Select the protocol\nprotocol = Noise.protocol(\"Noise_IK_25519_ChaChaPoly_BLAKE2s\")\n\n# 2. Generate keys (or load them)\nkp_i = Noise.generate_keypair(protocol)\n# Assuming we know the responder's static public key `kp_r_pub`\n\n# 3. Initialize handshake state\n# :s  -\u003e Local static keypair\n# :rs -\u003e Remote static public key\nstate_i = Noise.handshake(protocol, true, \u003c\u003c\u003e\u003e, s: kp_i, rs: kp_r_pub)\n\n# 4. Perform handshake step (Initiator starts in IK pattern)\n# Write the first message\n{:ok, msg1, state_i} = Noise.handshake_step(state_i, \"payload1\")\n\n# Send `msg1` to the responder...\n```\n\n### Responder\n\n```elixir\n# 1. Select the protocol\nprotocol = Noise.protocol(\"Noise_IK_25519_ChaChaPoly_BLAKE2s\")\n\n# 2. Load keys\n# `kp_r` is the responder's static keypair\n\n# 3. Initialize handshake state\n# responder is `false` for initiator param\nstate_r = Noise.handshake(protocol, false, \u003c\u003c\u003e\u003e, s: kp_r)\n\n# 4. Receive message and process it\n# `msg1` received from network\n{:ok, \"payload1\", state_r} = Noise.handshake_step(state_r, msg1)\n```\n\nOnce the handshake is complete (which depends on the specific pattern), `Noise.handshake_step/2` will return `{:complete, message, {cipher_state_1, cipher_state_2}}`. You can then use these cipher states to encrypt and decrypt transport messages.\n\n```elixir\n# Encrypting data\n{ciphertext, new_cs1} = Noise.encrypt(cipher_state_1, \"Hello World\")\n\n# Decrypting data\n{plaintext, new_cs2} = Noise.decrypt(cipher_state_2, ciphertext)\n```\n\nFor detailed documentation, refer to the [API Docs](https://hexdocs.pm/noise_protocol).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsgiath%2Fnoise-protocol","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsgiath%2Fnoise-protocol","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsgiath%2Fnoise-protocol/lists"}