Skip to content

Instantly share code, notes, and snippets.

View LLFourn's full-sized avatar

Lloyd Fournier LLFourn

View GitHub Profile

Blind Diffie-Hellman Key Exchange (blind ecash)

The goal of this protocol is for Bob to get Alice to perform a Diffie-Hellman key exchange blindly, such that when the unblinded value is returned, Alice recognizes it as her own, but can’t distinguish it from others (i.e. similar to a blind signature).

Alice:
A = a*G
return A

Bob:
Y = hash_to_curve(secret_message)
r = random blinding factor
@sipa
sipa / covert_ecdh.md
Last active January 4, 2023 10:31
Covert ECDH over secp256k1
#!/usr/bin/env perl6
use v6.c;
role Distribution::Directory {
has IO::Path $.path;
has %!meta;
method meta() {
%!meta ||= from-json slurp ('META6.json', 'META.info').map({$.path.child($_)}).first: {$_ ~~ :f};
}
@willurd
willurd / web-servers.md
Last active February 28, 2025 17:17
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@mooz
mooz / magit-blame-ignore-whitespace.el
Created November 28, 2012 03:13
Ignore coding-style related changes in magit-blame
(defadvice magit-blame-file-on (around magit-blame-ignore-whitespace activate)
(let ((buffer (ad-get-arg 0)))
(save-excursion
(with-current-buffer buffer
(save-restriction
(with-temp-buffer
(magit-git-insert (list "blame"
"-w" ; ignore coding-style related changes
"--porcelain" "--"
(file-name-nondirectory
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = [email protected]:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this: