Skip to content

Instantly share code, notes, and snippets.

@karlgluck
karlgluck / Hash Ladders for Shorter Lamport Signatures.md
Last active March 31, 2024 17:53
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.

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?

@plentz
plentz / nginx.conf
Last active April 24, 2024 11:15
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@mloskot
mloskot / boost_property_tree_json_array.cpp
Created December 22, 2011 11:11
Simple example of parsing and consuming JSON array with boost::property_tree
#ifdef _MSC_VER
#include <boost/config/compiler/visualc.hpp>
#endif
#include <boost/property_tree/ptree.hpp>
#include <boost/property_tree/json_parser.hpp>
#include <boost/foreach.hpp>
#include <cassert>
#include <exception>
#include <iostream>
#include <sstream>
@calind
calind / agent_type.conf
Created October 12, 2011 17:44
nginx user agent type detection (requires nginx >= 1.0.4)
# agent type detection, based on idea from from http://notnotmobile.appspot.com/
map $http_user_agent $agent_type_phase1 {
default 'mobile';
'' 'unknown';
~*iphone|ipod|blackberry|palm|windows\s+ce 'mobile';
~*windows|linux|os\s+[x9]|solaris|bsd 'desktop';
~*spider|crawl|slurp|bot|feedburner 'bot';
}
map $http_x_skyfire_phone $agent_type_phase2 {
default 'mobile';