Skip to content

Instantly share code, notes, and snippets.

@frozeman
frozeman / isValidSignature.sol
Created June 25, 2020 11:39
Signature verification in solidity, taken from 0x
/// @dev Verifies that a hash has been signed by the given signer.
/// @param hash Any 32 byte hash.
/// @param signerAddress Address that should have signed the given hash.
/// @param signature Proof that the hash has been signed by signer.
/// @return True if the address recovered from the provided signature matches the input signer address.
function isValidSignature(
bytes32 hash,
address signerAddress,
bytes memory signature
)
@paulmillr
paulmillr / BLS_Signature.md
Last active March 2, 2024 14:44
BLS Signature for Busy People

BLS Signature for Busy People

Summary

  • 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.

@alext
alext / vpnc-script-aws
Last active July 12, 2018 12:54
vpnc script to route all AWS IP ranges over VPN.
#!/bin/bash
# vpnc-script wrapper for use with openconnect that routes all AWS IP ranges over the VPN.
# Pass any additional IP ranges to be routed as args to the script.
#
# Requirements: bash, curl and jq.
#
# Example usage:
# openconnect https://vpn.example.com/profile --script '/path/to/vpnc-script-aws'
#
@darktable
darktable / backup_helper.py
Created March 22, 2011 20:45
GAE: Script that will download a list of models from remote app engine server and insert them into the local dev_appserver.
import time
import os
import logging
import sys
from subprocess import call, PIPE
import time, os, logging
MODEL_CLASSES = ['list','of','models','to','backup']
email = 'admin@email.com'