Skip to content

Instantly share code, notes, and snippets.

@conduition
conduition / tlstest.go
Created August 3, 2026 22:38
Test a TLS server by dumping basic handshake metadata: version number, key-exchange/cipher algos, certificate chains, ECH use, etc.
package main
import (
"crypto/tls"
"crypto/x509"
"encoding/pem"
"flag"
"fmt"
"os"
"strings"
@conduition
conduition / wots+c.py
Last active May 24, 2026 23:06
An investigation into WOTS+C counter size and its effects on signing failure probability
from math import factorial, log2, inf
# n-choose-k, AKA the binomial coefficient.
def binomial(n, k):
return factorial(n) // (factorial(k) * factorial(n - k))
# Multiply two vectors of polynomial coefficients in O(n^2) time.
# Coefficients are ordered from lowest to highest degree.
def multiply_polynomials(p1, p2):
deg1 = (len(p1) - 1)
@conduition
conduition / README.md
Last active December 28, 2025 06:53
SLH-DSA parameters search script

SLH-DSA Parameter Search

A python port of the SPHINCS+ team's outdated parameter exploration script available here.

This revised version of the script uses the same math, but improves on ergonomics:

  • ✅ works out of the box on any machine with a python3 runtime
  • ✅ uses no dependencies
  • ✅ runs faster than the default script
  • ✅ provides additional CLI-driven filtering options
@conduition
conduition / winternitz.ts
Last active July 8, 2025 07:03
WInternitz One-time Signatures on Bitcoin using OP_CAT
// input witness stack:
// <h1> <b1>
// ...
// <h64> <b64>
// <ec_signature>
OP_DUP OP_TOALTSTACK // copy EC signature to alt stack
<G> OP_CHECKSIGVERIFY // verify EC signature matches TX