Skip to content

Instantly share code, notes, and snippets.

View nmathewson's full-sized avatar

Nick Mathewson nmathewson

View GitHub Profile
Ban every "Nicholas" called "Nick", each Susan self-called "Sue":
For Google know your real name much better than you do.
Rob Zimmerman and David Jones and "Lady" Germanotta:
Let's go report each profile; you aren't persona grata!
Has Shake-speare made a profile as "honest Will'm Shaxberd"?
He's banned! So's Will the Conquerer -- we call him "Will the Bastard".
Make Wendy Carlos go as "Walt," and Berry go by "Dan":
For outside Mountain View you're you, but there, "A man's a man."
Make Douglass "Bailey"; Truth "Baumfree"; and Malcolm go as "Little":
import binascii
bad_keys = set()
for line in open("vk.txt"):
fp = line.split(",")[2].strip()
bad_keys.add(binascii.a2b_hex(fp.lower()))
bad = None
@nmathewson
nmathewson / keygen.c
Created April 8, 2014 21:15
brute-force ed25519 key generator
/* I release this code into the public domain under the terms of the creative
commons cc0 license/dedication. - Nick Mathewson*/
#include <stdint.h>
#include <openssl/rand.h>
#include <openssl/sha.h>
#include <stdio.h>
#include "ed25519.h"
/* XXXXXXXX
@nmathewson
nmathewson / gist:8869955
Created February 7, 2014 19:25
sketch for part of constant-time random double algorithm.
#include <stdio.h>
#include <stdint.h>
/*
* "See https://github.com/zackw/stegotorus/blob/master/src/rng.cc#L86 and the
* paper at http://allendowney.com/research/rand/ " -- zackw.
*
*/
/* Here's what Zack's code does: */
#if 0
cc-3970 c99: WARNING File = event.c, Line = 168
conversion from pointer to same-sized integral type (potential portability
problem)
unsigned u = (unsigned) ((ev_uintptr_t) e->ptr);
^
cc-1185 c99: WARNING File = event.c, Line = 937
An enumerated type is mixed with another type.