Skip to content

Instantly share code, notes, and snippets.


Oleg Andreev oleganza

View GitHub Profile
kac- / blind_oleg.go
Last active May 8, 2019
Blind signatures for Bitcoin transactions
View blind_oleg.go
package main
import (
View Gitbox restart
Please try this:
1. Quit Gitbox.
2. Delete ~/Library/Preferences/com.oleganza.gitbox.plist
3. Run in Terminal: defaults delete com.oleganza.gitbox
4. Run in Terminal: git config --global push.default matching
5. Open Gitbox.
karlgluck / Hash Ladders for Shorter Lamport
Last active Dec 20, 2020
I describe a method for making Lamport signatures take up less space. I haven't seen anyone use hash chains this way before, so I think it's pretty cool.
View Hash Ladders for Shorter Lamport

What's this all about?

Digital cryptography! This is a subject I've been interested in since taking a class with Prof. Fred Schneider back in college. Articles pop up on Hacker News fairly often that pique my interest and this technique is the result of one of them.

Specifically, this is about Lamport signatures. There are many signature algorithms (ECDSA and RSA are the most commonly used) but Lamport signatures are unique because they are formed using a hash function. Many cryptographers believe that this makes them resistant to attacks made possible by quantum computers.

How does a Lamport Signature work?

oleganza / NSObject+OASelectorNotifications.h
Created Aug 25, 2011
View NSObject+OASelectorNotifications.h
Oleg Andreev <>
January 25, 2011
With NSNotificationCenter you post notifications with a name like MyNotification.
Observer subscribes to this name with some selector like myNotification:
To make things easier and less verbose, we won't declare notification names, but only the selectors.
oleganza / NSData+OADataHelpers.m
Last active Jul 2, 2020
Creating NSString from NSData by fixing invalid UTF8 characters
View NSData+OADataHelpers.m
// Author: Oleg Andreev <>
// May 28, 2011
// Do What The Fuck You Want Public License <>
#import "NSData+OADataHelpers.h"
#if !__has_feature(objc_arc)
#error ARC must be enabled!
View NSData+OADataHelpers.m
#import "NSData+OADataHelpers.h"
@implementation NSData (OADataHelpers)
- (NSString*) UTF8String
return [[[NSString alloc] initWithData:[self dataByHealingUTF8Stream] encoding:NSUTF8StringEncoding] autorelease];
// Replaces all broken sequences by � character and returns NSData with valid UTF-8 bytes.
View htmlescape.rb
require 'strscan'
require 'cgi'
module HTMLEscaper
"<" => "&lt;",
">" => "&gt;",
'"' => "&quot;",
'&' => "&amp;"