Extra cryptographic functions for Gerbil
  • Scheme 92.3%
  • C 7.3%
  • Nix 0.4%
Find a file
2025-06-19 19:45:49 -04:00
t Update for latest Gambit 2025-04-24 21:49:03 -04:00
.gitignore Work with Gerbil v0.18-35-g137852c7 2023-11-29 00:09:32 -05:00
blake2.ss Add BLAKE2B support 2020-11-12 19:05:56 -05:00
bls-ffi.ss feat: add BLST library support for BLS signatures 2024-11-22 10:49:58 -05:00
bls.ss feat: add BLST library support for BLS signatures 2024-11-22 10:49:58 -05:00
build.ss feat: add BLST library support for BLS signatures 2024-11-22 10:49:58 -05:00
default.nix Build with nix, too 2020-11-30 18:16:49 -05:00
ed25519-ffi.ss feat: implement ed25519 cryptographic signing with tests 2024-11-16 00:02:19 +00:00
ed25519.ss feat: implement ed25519 cryptographic signing with tests 2024-11-16 00:02:19 +00:00
gerbil.pkg Update gerbil.pkg 2023-09-24 10:19:17 -04:00
keccak-tiny-unrolled.c Import keccak & secp256k1 support from Glow 2020-06-16 19:11:17 -04:00
keccak.ss Update for Gerbil 0.17.0-282-geb2f4eb4 2023-09-22 13:02:46 -04:00
LICENSE Add README.md and LICENSE files. Apache 2.0. 2020-06-16 19:16:33 -04:00
password.ss Use POO, higher-level secp256k1 API 2021-02-16 20:29:42 -05:00
random.ss Work with Gerbil v0.18-35-g137852c7 2023-11-29 00:09:32 -05:00
README.md Merge pull request #5 from zbraiterman/update-license-info 2025-06-19 19:45:49 -04:00
secp256k1-ffi.ss Update for latest Gambit 2025-04-24 21:49:03 -04:00
secp256k1.ss Update for Gerbil 0.17.0-298-g01d7a9ee 2023-09-25 21:37:05 -04:00
TODO.md Add TODO 2021-02-21 11:28:27 -05:00
unit-tests.ss Update to gerbil-utils 2020-12-12 17:45:28 -05:00

Gerbil-Crypto

Gerbil-crypto is collection of cryptographic primitives that complement those included in Gerbil itself (as interfaced from OpenSSL).

Current primitives are sufficient to interface with Ethereum: keccak256 and secp256k1.

More primitives may be added in the future.

Copyright 2020 MuKn Inc All rights reserved. Gerbil-crypto is distributed under the Apache License, version 2.0. See the file LICENSE.

Installation instructions

Dependencies

You need to first install the Gerbil Scheme compiler. Gerbil depends on openssl so you'll have it installed.

Then you must install the Gerbil Clan utilities and the Gerbil-POO object system, which gxpkg may automatically download for you.

Finally, you need to install the following libraries:

  • libsecp256k1: On Debian/Ubuntu, install with apt install libsecp256k1-dev
  • libsodium: On Debian/Ubuntu, install with apt install libsodium-dev
  • libblst: You might have to install with git clone https://github.com/supranational/blst.git

The nix recipe for gerbil-crypto installs these dependencies automatically. YMMV on other Linux distributions.

If you need to install the blst library from git, you might proceed as follows:

# Clone the repository
git clone https://github.com/supranational/blst.git

# Build the library
cd blst && ./build.sh

# Copy the library and headers
sudo cp libblst.a /usr/local/lib/ && sudo cp bindings/blst.h bindings/blst_aux.h /usr/local/include/

# Clean up
cd .. && rm -rf blst

# Export paths for the library so GCC can find it, if not already in your environment
# You might want to edit your ~/.bashrc ~/.zshenv or some such to include these:
export C_INCLUDE_PATH=/usr/local/include
export LIBRARY_PATH=/usr/local/lib

Building

Once all dependencies are installed, you may build with:

./build.ss

Test with:

./unit-tests.ss