{"id":13832738,"url":"https://github.com/vnuge/noscrypt","last_synced_at":"2025-07-09T19:31:09.981Z","repository":{"id":220246087,"uuid":"749577312","full_name":"VnUgE/noscrypt","owner":"VnUgE","description":"A nostr specific cryptography library written in C","archived":false,"fork":false,"pushed_at":"2024-09-07T01:59:12.000Z","size":1165,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-09-07T20:58:09.091Z","etag":null,"topics":["cryptography","noscrypt","nostr"],"latest_commit_sha":null,"homepage":"https://www.vaughnnugent.com/resources/software/modules/noscrypt","language":"C","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/VnUgE.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}},"created_at":"2024-01-29T00:30:32.000Z","updated_at":"2024-09-07T01:47:51.000Z","dependencies_parsed_at":"2024-10-20T19:36:57.709Z","dependency_job_id":null,"html_url":"https://github.com/VnUgE/noscrypt","commit_stats":null,"previous_names":["vnuge/noscrypt"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VnUgE%2Fnoscrypt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VnUgE%2Fnoscrypt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VnUgE%2Fnoscrypt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VnUgE%2Fnoscrypt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/VnUgE","download_url":"https://codeload.github.com/VnUgE/noscrypt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225581825,"owners_count":17491794,"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","noscrypt","nostr"],"created_at":"2024-08-04T11:00:29.175Z","updated_at":"2025-07-09T19:31:09.958Z","avatar_url":"https://github.com/VnUgE.png","language":"C","funding_links":[],"categories":["Libraries"],"sub_categories":["Client reviews and/or comparisons"],"readme":"﻿\n# noscrypt  \n\n\u003ch4 align=\"left\"\u003e\n  \u003ca href=\"https://github.com/VnUgE/noscrypt/blob/master/LICENSE\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/license-LGPL2.1-green.svg\" alt=\"LGPL2.1\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://www.vaughnnugent.com/Resources/Software/Modules/noscrypt-issues\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fwww.vaughnnugent.com%2Fapi%2Fgit%2Fissues%3Fmodule%3Dnoscrypt\u0026query=%24%5B'result'%5D.length\u0026label=all%20issues\" alt=\"Issues\"/\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/VnUgE/noscrypt/tags\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/v/tag/vnuge/noscrypt\" alt=\"Latest tag\"/\u003e\n  \u003c/a\u003e\n\u003c/h4\u003e\n\n*A compact, C90 cross-platform, cryptography library built specifically for nostr*\n\n## What is noscrypt?\nA high-level C utility library built specifically for nostr cryptography operations such as those defined in NIP-01 and the new NIP-44 (NIP-04 [coming soon](https://www.vaughnnugent.com/Resources/Software/Modules/noscrypt-issues?id=42)). Noscrypt simplifies key generation, note signing \u0026 verification, NIP-44 data encryption, NIP-44 private message encryption, and much more. Noscrypt has very low dependency requirements with a focus on portability and performance for desktop and (eventually) embedded systems alike.\n\n## API Example\n```C\nNCValidateSecretKey()\nNCGetPublicKey()\nNCSignData()\nNCVerifyData()\nNCEncrypt()\nNCDecrypt()\nNCComputeMac()\nNCVerifyMac()\n... extended functions\n```\n\n## Motivation\nAt the time of building this project I have not come across any C-only libraries that exposed functionality for nostr specific cryptography. IMO it is easy to use the secp256k1 library [incorrectly](https://www.vaughnnugent.com/blog/d9ab8a46cfa8d6bd59cf048fec8d73ffc44f881c). In the process of building [NVault](https://www.vaughnnugent.com/resources/software/modules/nvault) NIP-44 came out in December and I realized my libraries were falling short for my needs for proper and safe nostr cryptographic operations, and I needed to start over and start with a good base that has all the basic functionality built with trusted and tested libraries. I also really care about performance and resource requirements that many other nostr projects seem to completely ignore, if you follow me on nostr, you know I can be quite the pest.\n\n### Testing\nTesting is an will be important to a cryptography library, I take that responsibility seriously. My goal is to achieve enterprise level testing and security. There are some basic api validation and correctness tests that can be built into an executable called nctest. Alongside that test, a fully automated testing suite is done using the [C# interop](wrappers/dotnet/VNLib.Utils.Cryptography.Noscrypt/tests/). This includes testing against the official NIP-44 [vector file](https://github.com/paulmillr/nip44/blob/main/nip44.vectors.json). I'm very dependency adverse so native C90 testing using only stdlibs can get gross in a hurry. It will likely happen in the future but not right now. \n\n### Hardness\n- Time sensitive verification always uses fixed time comparison\n- No explicit/dynamic memory allocations (in core library)\n- Valgrind is used to check for runtime memory leaks and overflows\n- CI Requires %100 test pass before merging\n- Public API function input validation is on by default\n- All stack allocated structures are securely zeroed before return\n- Stack protection is enabled by default for GCC and MSVC compilers\n- Schnorr signatures are validated before the signing function returns\n- Carefully selected, widley used, tested, and audited dependencies\n\n## Platform Support\nThe following table lists the supported platforms and cryptography libraries that noscrypt supports. This will expand in the future. You are free to choose and specify the location of these libraries if you desire during build time, otherwise safe defaults are attempted on your platform.\n\n| Arch | Support | Notes | Tested |\n| ----- | ---------- | ------- | ------- |\n| Windows | OpenSSL (3.0+), Mbed-TLS, BCrypt | NT 6.1 + | ✅ |\n| Linux   | OpenSSL (3.0+), Mbed-TLS         | GCC only | ✅ |\n| FreeBSD | OpenSSL (3.0+), Mbed-TLS         | GCC Only |    |\n\n## Security Policy\nPlease see the [SECURITY.md](SECURITY.md) file for more information on how to report security issues.\n\n## Getting started\nPlease use the following links to obtain packages and extended documentation.\n\n[__Project homepage__](https://www.vaughnnugent.com/resources/software/modules/noscrypt)  \n[__Startup \u0026 Install Guide__](https://www.vaughnnugent.com/resources/software/articles/62ca932f68b8e0b1b99dca6e1c9ffe5538205efb)  \n[__Extended Documentation__](https://www.vaughnnugent.com/resources/software/articles?tags=docs,_noscrypt)  \n\n### Super quick start\nIf you are in a hurry to try out noscrypt these steps will get you by. Otherwise website documentation is authoritative and I encourage you read it.\n\n#### Prerequisites\n- Supported operating system and compiler from table above\n- [CMake](https://cmake.org/download) build system\n- [Taskfile.dev](https://taskfile.dev) to execute build recipes\n\nTo build and install noscrypt:\n```shell\nmkdir noscrypt/ \u0026\u0026 cd noscrypt/\nwget https://www.vaughnnugent.com/public/resources/software/builds/noscrypt/\u003cmaster-git-hash\u003e/noscrypt/noscrypt-src.tgz\ntar -xzf noscrypt-src.tgz\ntask\nsudo task install\n```\n\n## Notes\n#### Builds\nBuild packages on my website are now fully automated and signed with my PGP key.\n\n#### Branches\nI use two main branches for development. *master* is considered as stable as a release tag, *develop* is a staging branch for all changes before they are merged into master. When submitting PRs please target and use the latest develop branch. Feature branches are created as necessary and merged into develop when ready for staging.\n\n#### Windows Dlls\nmsvc pre-compiled packages available for download on the website package page. I have not compatibility tested them yet so they should only support Windows NT version 1904 (10/Server 2016 and later) running amd64 processors. \n\n## License\nThe software in this repository is licensed to you under the GNU Lesser GPL v2.1 or later. `SPDX-License-Identifier: LGPL-2.1-or-later` see the [LICENSE](LICENSE) file for more details.  \n\n## Donations\nIf you feel so inclined to support me an this project, donations are welcome and much appreciated.\n\nBitcoin: `bc1qgj4fk6gdu8lnhd4zqzgxgcts0vlwcv3rqznxn9`  \nLightning: ChipTuner@coinos.io\n\nI am also a member of [GitCitadel](https://next.nostrudel.ninja/#/wiki/topic/gitcitadel-project) so feel free to [send some sats](https://geyser.fund/project/gitcitadel) that way too!\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvnuge%2Fnoscrypt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvnuge%2Fnoscrypt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvnuge%2Fnoscrypt/lists"}