https://github.com/oxarbitrage/sinsemilla
Sinsemilla hash function haskell implementation
https://github.com/oxarbitrage/sinsemilla
crypto cryptography hash-function sinsemilla
Last synced: 8 days ago
JSON representation
Sinsemilla hash function haskell implementation
- Host: GitHub
- URL: https://github.com/oxarbitrage/sinsemilla
- Owner: oxarbitrage
- License: apache-2.0
- Created: 2023-12-29T20:21:38.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2025-02-04T22:19:26.000Z (about 1 year ago)
- Last Synced: 2025-07-11T04:39:35.962Z (7 months ago)
- Topics: crypto, cryptography, hash-function, sinsemilla
- Language: TLA
- Homepage:
- Size: 735 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
# Sinsemilla haskell implementation
A haskell sinsemilla hash function implementation using [PastaCurves](https://github.com/nccgroup/pasta-curves) and inspired by the [Zebra sinsemilla implementation in Rust](https://github.com/ZcashFoundation/zebra/blob/main/zebra-chain/src/orchard/sinsemilla.rs).
This is experimental/proof of concept code.
There is a [Sinsemilla TLA+ spec](https://github.com/oxarbitrage/sinsemilla/blob/main/spec/README.md) but this implementation is not following that specification yet as it was coded before the specification exist. The plan is to refactor the implementation to meet the spec. Progress for that will be tracked in https://github.com/oxarbitrage/sinsemilla/issues/1
## Demo
```bash
stack run
```
or
```bash
cabal run
```
### Example:
```bash
% stack run
---Sinsemilla hash function---
Insert a domain to be used:
test1
Insert message to be hashed:
this is a test
B64 encoded ciphertext:
VHCDjVMz9uY6bVLBE6/MM9vRZvxNRe3IIlyzVkky5Ro=
%
```
## Tests
```bash
stack test
```
or
```bash
cabal test
```