https://github.com/marcosnicolau/almunecar
Cryptographic primitives in c
https://github.com/marcosnicolau/almunecar
Last synced: 3 months ago
JSON representation
Cryptographic primitives in c
- Host: GitHub
- URL: https://github.com/marcosnicolau/almunecar
- Owner: MarcosNicolau
- License: mit
- Created: 2025-01-04T16:29:39.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2025-03-01T23:11:58.000Z (3 months ago)
- Last Synced: 2025-03-02T00:19:57.327Z (3 months ago)
- Language: C
- Size: 93.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Almunecar
> [!Warning]
> This library is a work in progress[Almunecar](https://en.wikipedia.org/wiki/Almu%C3%B1%C3%A9car) is a cryptography library written in C, designed with simplicity in mind. It features a simple straightforward codebase and an intuitive API, making it accessible and easy to understand.
The primary goal of this library is not production use, but rather to provide clear and concise implementations of fundamental cryptographic protocols. It's an ideal resource for learning and exploring cryptographic concepts in a practical way.
## Libs
Glossary:
- ✅: Implemented
- 🚧: WIP
- 📝: Planned support| Libs | Desc | Status |
| ------------------------------------------------ | ----------------------- | ------ |
| [primitive-types](./libs/primitive-types/) | BigUint & UINTs | ✅ |
| [math](./libs/math/) | Math theorems and utils | ✅ |
| [hashes](./libs/hashes/) | SHA-256 | ✅ |
| [digital-signature](./libs/digital-signature/) | RSA, ECDSA | 🚧 |
| [elliptic-curves](./libs/elliptic-curves/) | secp256k1, BLS12-381 | 📝 |
| [snarks](./libs/snarks/) | groth, plonk | 📝 |
| [commitment schemes](./libs/pcs/) | Merkle tree, FRI, KZG | 📝 |> [!NOTE]
> This is just an initial roadmap to define the scope of the lib. They are not definitive and may vary in the future as we explore and work.## Installation
To install the library globally in your system run:
```shell
make install
```To uninstall:
```shell
make uninstall
```To install the CLI program in your system run:
```shell
make cli_install
almunecar --help
```To uninstall:
```shell
make cli_uninstall
```## Developers
To start developing, you'll need to compile the libs:
```shell
make build
```Whenever you make a change on a lib, you'll need to re-build to see its effects.
To build and run the cli program:
```shell
make cli_build
./build/almunecar --help
```To run tests:
```shell
make test
```To run test of a specific lib:
```shell
make test_
```for example:
```shell
make test_primitive-types
```See all available commands:
```shell
make help
```---
### References
These are the main resources that guided our learning and implementations:
- [Lambdaworks](https://github.com/Lambdaclass/lambdaworks)
- [Constantine](https://github.com/mratsim/constantine)
- [Moon math](https://leastauthority.com/community-matters/moonmath-manual/)
- [An Introduction to Pairing-Based Cryptography](https://www.math.uwaterloo.ca/~ajmeneze/publications/pairings.pdf)
- [Why and How zk-SNARK Works](https://arxiv.org/pdf/1906.07221)