{"id":17880380,"url":"https://github.com/brainstorm/crypt4gh-rustcrypto","last_synced_at":"2025-04-03T01:17:15.263Z","repository":{"id":176757952,"uuid":"659519266","full_name":"brainstorm/crypt4gh-rustcrypto","owner":"brainstorm","description":"Experiments migrating away from sodiumoxide on crypt4gh-rust","archived":false,"fork":false,"pushed_at":"2023-07-03T01:53:45.000Z","size":68,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-08T15:25:15.728Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/brainstorm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-06-28T02:38:46.000Z","updated_at":"2023-06-28T02:39:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"ab8a0eeb-5d75-4fb6-b3b6-ba5bcb045fa3","html_url":"https://github.com/brainstorm/crypt4gh-rustcrypto","commit_stats":null,"previous_names":["brainstorm/crypt4gh-rustcrypto"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brainstorm%2Fcrypt4gh-rustcrypto","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brainstorm%2Fcrypt4gh-rustcrypto/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brainstorm%2Fcrypt4gh-rustcrypto/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brainstorm%2Fcrypt4gh-rustcrypto/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brainstorm","download_url":"https://codeload.github.com/brainstorm/crypt4gh-rustcrypto/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246916762,"owners_count":20854514,"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-28T12:14:19.420Z","updated_at":"2025-04-03T01:17:15.244Z","avatar_url":"https://github.com/brainstorm.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Purpose\n\nThis is an experimentation area for an eventual removal of [libsodium-sys][libsodium-sys] and [sodiumoxide][sodiumoxide] crypto crates from [crypt4gh-rust][crypt4gh-rust], with the goal of making the latter safer and not deprecated (the former crates are marked as deprecated, unmantained and vulnerable on various sources).\n\n# Quickstart\n\n```shell\n$ RUST_LOG=debug cargo run\n```\n\nIf all goes well you should see the following output:\n\n```\n    Finished dev [unoptimized + debuginfo] target(s) in 0.14s\n     Running `target/debug/crypt4gh-de-sodiumoxide`\nEncrypting...\n DEBUG crypt4gh_de_sodiumoxide::rustcrypto \u003e    RustCrypto encrypt() packed data(131): Iter([be, 07, 5f, c5, 3c, 81, f2, d5, cf, 14, 13, 16, eb, eb, 0c, 7b, 52, 28, c5, 2a, 4c, 62, cb, d4, 4b, 66, 84, 9b, 64, 24, 4f, fc, e5, ec, ba, af, 33, bd, 75, 1a, 1a, c7, 28, d4, 5e, 6c, 61, 29, 6c, dc, 3c, 01, 23, 35, 61, f4, 1d, b6, 6c, ce, 31, 4a, db, 31, 0e, 3b, e8, 25, 0c, 46, f0, 6d, ce, ea, 3a, 7f, a1, 34, 80, 57, e2, f6, 55, 6a, d6, b1, 31, 8a, 02, 4a, 83, 8f, 21, af, 1f, de, 04, 89, 77, eb, 48, f5, 9f, fd, 49, 24, ca, 1c, 60, 90, 2e, 52, f0, a0, 89, bc, 76, 89, 70, 40, e0, 82, f9, 37, 76, 38, 48, 64, 5e, 07, 05])\n DEBUG crypt4gh_de_sodiumoxide::rustcrypto \u003e    RustCrypto encrypt() public key(32): Iter([ac, 3a, 70, ba, 35, df, 3c, 3f, ae, 42, 7a, 7c, 72, 02, 1d, 68, f2, c1, e0, 44, 04, 0b, 75, f1, 73, 13, c0, c8, b5, d4, 24, 1d])\n DEBUG crypt4gh_de_sodiumoxide::rustcrypto \u003e    RustCrypto encrypt() private key(32): Iter([68, f2, 08, 41, 2d, 8d, d5, db, 9d, 0c, 6d, 18, 51, 2e, 86, f0, ec, 75, 66, 5a, b8, 41, 37, 2d, 57, b0, 42, b2, 7e, f8, 9d, 4c])\n DEBUG crypt4gh_de_sodiumoxide::rustcrypto \u003e    RustCrypto encrypt() recipient public key(32): Iter([e8, 98, 0c, 86, e0, 32, f1, eb, 29, 75, 05, 2e, 8d, 65, bd, dd, 15, c3, b5, 96, 41, 17, 4e, c9, 67, 8a, 53, 78, 9d, 92, c7, 54])\n DEBUG crypt4gh_de_sodiumoxide::rustcrypto \u003e    RustCrypto encrypt() shared key: [74, aa, eb, 90, a3, 1d, a2, 9a, b7, c6, c7, 59, 59, ca, 1b, af, 35, 04, a8, d8, 88, a2, d8, 59, 91, ca, ce, 12, 5a, ee, 8e, 4f]\n DEBUG crypt4gh_de_sodiumoxide::crypt4gh   \u003e    Crypt4GH encrypt() packed data(131): Iter([be, 07, 5f, c5, 3c, 81, f2, d5, cf, 14, 13, 16, eb, eb, 0c, 7b, 52, 28, c5, 2a, 4c, 62, cb, d4, 4b, 66, 84, 9b, 64, 24, 4f, fc, e5, ec, ba, af, 33, bd, 75, 1a, 1a, c7, 28, d4, 5e, 6c, 61, 29, 6c, dc, 3c, 01, 23, 35, 61, f4, 1d, b6, 6c, ce, 31, 4a, db, 31, 0e, 3b, e8, 25, 0c, 46, f0, 6d, ce, ea, 3a, 7f, a1, 34, 80, 57, e2, f6, 55, 6a, d6, b1, 31, 8a, 02, 4a, 83, 8f, 21, af, 1f, de, 04, 89, 77, eb, 48, f5, 9f, fd, 49, 24, ca, 1c, 60, 90, 2e, 52, f0, a0, 89, bc, 76, 89, 70, 40, e0, 82, f9, 37, 76, 38, 48, 64, 5e, 07, 05])\n DEBUG crypt4gh_de_sodiumoxide::crypt4gh   \u003e    Crypt4GH encrypt() public key(32): Iter([ac, 3a, 70, ba, 35, df, 3c, 3f, ae, 42, 7a, 7c, 72, 02, 1d, 68, f2, c1, e0, 44, 04, 0b, 75, f1, 73, 13, c0, c8, b5, d4, 24, 1d])\n DEBUG crypt4gh_de_sodiumoxide::crypt4gh   \u003e    Crypt4GH encrypt() private key(32): Iter([68, f2, 08, 41, 2d, 8d, d5, db, 9d, 0c, 6d, 18, 51, 2e, 86, f0, ec, 75, 66, 5a, b8, 41, 37, 2d, 57, b0, 42, b2, 7e, f8, 9d, 4c])\n DEBUG crypt4gh_de_sodiumoxide::crypt4gh   \u003e    Crypt4GH encrypt() recipient public key(32): Iter([e8, 98, 0c, 86, e0, 32, f1, eb, 29, 75, 05, 2e, 8d, 65, bd, dd, 15, c3, b5, 96, 41, 17, 4e, c9, 67, 8a, 53, 78, 9d, 92, c7, 54])\n DEBUG crypt4gh_de_sodiumoxide::crypt4gh   \u003e    Crypt4GH encrypt() shared key: Iter([74, aa, eb, 90, a3, 1d, a2, 9a, b7, c6, c7, 59, 59, ca, 1b, af, 35, 04, a8, d8, 88, a2, d8, 59, 91, ca, ce, 12, 5a, ee, 8e, 4f])\nDecrypting...\n DEBUG crypt4gh_de_sodiumoxide::crypt4gh   \u003e Header Packet Encryption Method: 0\n DEBUG crypt4gh_de_sodiumoxide::crypt4gh   \u003e    Crypt4GH secret key: Iter([b5, 81, fb, 5a, e1, 82, a1, 6f, 60, 3f, 39, 27, 0d, 4e, 3b, 95, bc, 00, 83, 10, b7, 27, a1, 1d, d4, e7, 84, a0, 04, 4d, 46, 1b])\n DEBUG crypt4gh_de_sodiumoxide::crypt4gh   \u003e    Crypt4GH decrypt() peer_pubkey(32): Iter([ac, 3a, 70, ba, 35, df, 3c, 3f, ae, 42, 7a, 7c, 72, 02, 1d, 68, f2, c1, e0, 44, 04, 0b, 75, f1, 73, 13, c0, c8, b5, d4, 24, 1d])\n DEBUG crypt4gh_de_sodiumoxide::crypt4gh   \u003e     Crypt4GH peer pubkey: Iter([ac, 3a, 70, ba, 35, df, 3c, 3f, ae, 42, 7a, 7c, 72, 02, 1d, 68, f2, c1, e0, 44, 04, 0b, 75, f1, 73, 13, c0, c8, b5, d4, 24, 1d])\n DEBUG crypt4gh_de_sodiumoxide::crypt4gh   \u003e     Crypt4GH nonce: Iter([01, 02, 03, 04, 05, 06, 07, 08, 09, 0a, 0b, 0c])\n DEBUG crypt4gh_de_sodiumoxide::crypt4gh   \u003e     Crypt4GH encrypted data (147): Iter([0c, 9a, 1b, fa, 07, 05, 85, ae, b8, cb, dd, 80, f3, 5d, b1, 55, 8b, 14, a9, a2, 11, c5, 28, 18, c0, 78, 69, 90, da, 61, 84, 63, db, 80, 9d, 3a, 93, 94, 76, 48, d1, 4b, 9f, a9, 17, 9a, f7, 8f, 20, 33, ef, 0f, 2a, e5, 8a, cf, 7f, 4b, 3d, 5e, 8e, 05, 9e, 96, 31, e3, c8, 86, 7d, 94, 3e, 90, 79, fa, 88, 87, ed, 01, 3c, b6, ba, 0a, 1a, ed, cb, 79, 5c, 65, 6b, fa, e5, b7, e4, f8, 65, 60, 5d, e3, 93, 12, 4b, 63, 18, e2, 61, c3, 94, 88, f3, 46, fc, a9, f9, e1, 9d, 34, b3, aa, b0, 56, 44, 3c, a5, dc, e2, 9a, f1, ba, f5, af, d2, 16, 34, 36, d8, 65, c7, 34, c5, 79, 4c, 4e, 7e, be, 88, e3, df])\n DEBUG crypt4gh_de_sodiumoxide::crypt4gh   \u003e shared key: Iter([74, aa, eb, 90, a3, 1d, a2, 9a, b7, c6, c7, 59, 59, ca, 1b, af, 35, 04, a8, d8, 88, a2, d8, 59, 91, ca, ce, 12, 5a, ee, 8e, 4f])\n DEBUG crypt4gh_de_sodiumoxide::rustcrypto \u003e    RustCrypto decrypt() peer_pubkey(32): Iter([ac, 3a, 70, ba, 35, df, 3c, 3f, ae, 42, 7a, 7c, 72, 02, 1d, 68, f2, c1, e0, 44, 04, 0b, 75, f1, 73, 13, c0, c8, b5, d4, 24, 1d])\n DEBUG crypt4gh_de_sodiumoxide::rustcrypto \u003e    RustCrypto decrypt() sender_pubkey(32): Iter { inner: Item { opt: Some([ac, 3a, 70, ba, 35, df, 3c, 3f, ae, 42, 7a, 7c, 72, 02, 1d, 68, f2, c1, e0, 44, 04, 0b, 75, f1, 73, 13, c0, c8, b5, d4, 24, 1d]) } }\n DEBUG crypt4gh_de_sodiumoxide::rustcrypto \u003e     RustCrypto peer pubkey: Iter([ac, 3a, 70, ba, 35, df, 3c, 3f, ae, 42, 7a, 7c, 72, 02, 1d, 68, f2, c1, e0, 44, 04, 0b, 75, f1, 73, 13, c0, c8, b5, d4, 24, 1d])\n DEBUG crypt4gh_de_sodiumoxide::rustcrypto \u003e     RustCrypto nonce: Iter([01, 02, 03, 04, 05, 06, 07, 08, 09, 0a, 0b, 0c])\n DEBUG crypt4gh_de_sodiumoxide::rustcrypto \u003e     RustCrypto encrypted data (147): Iter([0c, 9a, 1b, fa, 07, 05, 85, ae, b8, cb, dd, 80, f3, 5d, b1, 55, 8b, 14, a9, a2, 11, c5, 28, 18, c0, 78, 69, 90, da, 61, 84, 63, db, 80, 9d, 3a, 93, 94, 76, 48, d1, 4b, 9f, a9, 17, 9a, f7, 8f, 20, 33, ef, 0f, 2a, e5, 8a, cf, 7f, 4b, 3d, 5e, 8e, 05, 9e, 96, 31, e3, c8, 86, 7d, 94, 3e, 90, 79, fa, 88, 87, ed, 01, 3c, b6, ba, 0a, 1a, ed, cb, 79, 5c, 65, 6b, fa, e5, b7, e4, f8, 65, 60, 5d, e3, 93, 12, 4b, 63, 18, e2, 61, c3, 94, 88, f3, 46, fc, a9, f9, e1, 9d, 34, b3, aa, b0, 56, 44, 3c, a5, dc, e2, 9a, f1, ba, f5, af, d2, 16, 34, 36, d8, 65, c7, 34, c5, 79, 4c, 4e, 7e, be, 88, e3, df])\nAll clear!\n```\n\n[libsodium-sys]: https://github.com/sodiumoxide/sodiumoxide/tree/master/libsodium-sys\n[sodiumoxide]: https://github.com/sodiumoxide/sodiumoxide/tree/master\n[crypt4gh-rust]: https://github.com/EGA-archive/crypt4gh-rust/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrainstorm%2Fcrypt4gh-rustcrypto","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrainstorm%2Fcrypt4gh-rustcrypto","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrainstorm%2Fcrypt4gh-rustcrypto/lists"}