{"id":33935820,"url":"https://github.com/black-binary/snowstorm","last_synced_at":"2026-04-06T07:01:39.646Z","repository":{"id":45013081,"uuid":"440745363","full_name":"black-binary/snowstorm","owner":"black-binary","description":"A minimalistic encryption protocol for rust async streams/packets, based on noise protocol and snow.","archived":false,"fork":false,"pushed_at":"2022-05-20T15:00:07.000Z","size":68,"stargazers_count":45,"open_issues_count":0,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-12-14T01:48:51.082Z","etag":null,"topics":["cryptography","protocol","proxy","rust","tunnel"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/black-binary.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":"2021-12-22T05:38:27.000Z","updated_at":"2025-09-05T09:06:53.000Z","dependencies_parsed_at":"2022-09-10T16:00:50.217Z","dependency_job_id":null,"html_url":"https://github.com/black-binary/snowstorm","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/black-binary/snowstorm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/black-binary%2Fsnowstorm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/black-binary%2Fsnowstorm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/black-binary%2Fsnowstorm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/black-binary%2Fsnowstorm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/black-binary","download_url":"https://codeload.github.com/black-binary/snowstorm/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/black-binary%2Fsnowstorm/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31463015,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-05T21:22:52.476Z","status":"online","status_checked_at":"2026-04-06T02:00:07.287Z","response_time":112,"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","protocol","proxy","rust","tunnel"],"created_at":"2025-12-12T14:02:34.934Z","updated_at":"2026-04-06T07:01:39.640Z","avatar_url":"https://github.com/black-binary.png","language":"Rust","readme":"# Snowstorm\n\nA minimalistic encryption protocol for rust async streams / packets, based on [noise protocol](http://www.noiseprotocol.org/) and [snow](https://crates.io/crates/snow).\n\n## Quickstart\n\nSnowstorm allows you to secure any streams implemented `AsyncRead + AsyncWrite + Unpin`. For example, `TcpStream` in Tokio. Note that the underlying connections **need to be reliable**.\n\n### Create a Key Pair\n\n```rust\n// Noise protocol params, see: http://www.noiseprotocol.org/noise.html#protocol-names-and-modifiers\n// Use `KK` to enable bidirectional identity verification\nstatic PATTERN: \u0026str = \"Noise_KK_25519_ChaChaPoly_BLAKE2s\"; \n\n// Generate a private / public key pair\nlet key_pair = snowstorm::Builder::new(PATTERN.parse()?).generate_keypair().unwrap()\n```\n\n#### Client \n\n```rust\n\n// Connect to the peer\nlet stream = TcpStream::connect(\"127.0.0.1:12345\").await?;\n\n// The client should build an initiator to launch the handshake process\nlet initiator = snowstorm::Builder::new(PATTERN.parse()?)\n    .local_private_key(local_private_key)\n    .remote_public_key(remote_public_key)\n    .build_initiator()?;\n\n// Start handshaking\nlet mut secured_stream = NoiseStream::handshake(stream, initiator).await?;\n\n// A secured stream `NoiseStream\u003cT\u003e` will be return once the handshake is done\nsecured_stream.write_all(b\"hello world\").await?;\n```\n\n#### Server\n\n```rust\n\n// Accept a `TcpStream` from the listener\nlet listener = TcpListener::bind(\"127.0.0.1:12345\").await?;\nlet (stream, _) = listener.accept().await?;\n\n// The server needs a responder to handle handshake reqeusts from clients\nlet responder = snowstorm::Builder::new(PATTERN.parse()?)\n    .local_private_key(local_private_key)\n    .remote_public_key(remote_public_key)\n    .build_responder()?;\n\n// Start handshaking\nlet mut secured_stream = NoiseStream::handshake(stream, responder).await?;\n\nlet mut buf = [0; 1024];\nsecured_stream.read(\u0026mut buf).await?;\n\n```\n\n## Spec\n\n### Stream\n\n[ `length` (2 bytes, little endian) ] [ `noise message` (`length` bytes) ]\n\n### Packet\n\n[ `nonce` (8 bytes) ] [ `noise message` ]\n\n## Todo\n\n- [x] UDP Support\n- [ ] Documentation\n- [x] Benchmarks\n- [ ] Async-std support\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblack-binary%2Fsnowstorm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblack-binary%2Fsnowstorm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblack-binary%2Fsnowstorm/lists"}