Skip to content

Instantly share code, notes, and snippets.

View bergkvist's full-sized avatar

Tobias Bergkvist bergkvist

  • Software Engineer @ Ulvetanna
  • Oslo, Norway
View GitHub Profile
paulmillr /
Last active May 20, 2024 12:45
BLS Signature for Busy People

BLS Signature for Busy People


  • BLS stands for

    • Barreto-Lynn-Scott: BLS12, a Pairing Friendly Elliptic Curve.
    • Boneh-Lynn-Shacham: A Signature Scheme.
  • Signature Aggregation

  • It is possible to verify n aggregate signatures on the same message with just 2 pairings instead of n+1.

carlolars / gitkraken-wsl-bash.bat
Last active February 10, 2023 21:08
Use bash from WSL as sh.exe for GitKraken (5.0.4) for Windows
@echo off
REM Make sure that the path to the script is correct!
@bash -l -c "~/bin/ %*"
CMCDragonkai /
Last active June 27, 2024 21:33
Nix: String and Path Concatenation #nix #nixos

Nix String and Path Concatenation

From Bas van Dijk:

To understand these things I would recommend using nix-repl:

$ nix-repl
Welcome to Nix version 1.11.2. Type :? for help.
prokls / pysha2 sha2
Last active July 8, 2023 21:29
Pure python3 implementation of SHA256 based on @thomdixon's pysha2
__base__ = ''
__author__ = 'Lukas Prokop'
__license__ = 'MIT'
import copy
import struct
import binascii
GaelVaroquaux / 00README.rst
Last active September 15, 2023 03:58
Copy-less bindings of C-generated arrays with Cython

Cython example of exposing C-computed arrays in Python without data copies

The goal of this example is to show how an existing C codebase for numerical computing (here c_code.c) can be wrapped in Cython to be exposed in Python.

The meat of the example is that the data is allocated in C, but exposed in Python without a copy using the PyArray_SimpleNewFromData numpy