Skip to content

Instantly share code, notes, and snippets.

View bwesterb's full-sized avatar
⚛️

Bas Westerbaan bwesterb

⚛️
View GitHub Profile
@bwesterb
bwesterb / pq-caddy.md
Last active August 28, 2024 10:03
Compile Caddy with support for post-quantum key agreement (X25519+Kyber)

Post-quantum Caddy

Caddy now supports post-quantum key agreement, when you compile it with Go 1.23 or later, such that visitors whose browser supports it (such as Chrome on Desktop and Edge), will be secure against the threat of store-now/decrypt-later.

Instructions

import pprint
from math import sqrt
import scipy.stats
def parse(x):
def c(x):
try:
return int(x.split('cycles')[0].replace(',',''))
except:
return None
// Adapted from
// https://github.com/lemire/Code-used-on-Daniel-Lemire-s-blog/blob/master/2021/03/24/
#include <dlfcn.h>
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#define KPERF_LIST \
F(int, kpc_force_all_ctrs_set, int) \
#!/bin/bash
#============================================================================
# ${XEN_SCRIPT_DIR}/vif-route
#
# Script for configuring a vif in routed mode.
# The hotplugging system will call this script if it is specified either in
# the device configuration given to Xend, or the default Xend configuration
# in ${XEN_CONFIG_DIR}/xend-config.sxp. If the script is specified in
# neither of those places, then vif-bridge is the default.
#
import cairo
import math
import sys
class State:
def __init__(self, name, groupSize=1024):
self.surface = cairo.SVGSurface (name+".svg", 1040, 1040)
self.name = name
self.ctx = cairo.Context (self.surface)
We couldn’t find that file to show.
package main
import (
"bytes"
"circl/sign"
"crypto/rand"
"crypto/tls"
"crypto/x509"
"crypto/x509/pkix"
"encoding/pem"
package main
var data uint32 = 1234
func test(p *uint32)
func main() {
test(&data)
}
@bwesterb
bwesterb / patch
Created December 25, 2019 11:26
prover9 make -j patch
diff --git a/apps.src/Makefile b/apps.src/Makefile
index 35558ca..b69c41f 100644
--- a/apps.src/Makefile
+++ b/apps.src/Makefile
@@ -24,7 +24,7 @@ clean:
realclean:
/bin/rm -f *.o $(PROGRAMS)
-install:
+install: apps
test_symbol_namespace.py::test_symbol_namespaces[avx2 implementation of dilithium4] FAILED [ 95%]
============================================================ FAILURES ============================================================
___________________________________ test_symbol_namespaces[avx2 implementation of dilithium4] ____________________________________
implementation = <Implementation(dilithium4, avx2)>
impl_path = '/Users/bas/src/pqclean/testcases/test_symbol_ns_zzd3cdk6/crypto_bla/scheme/impl'
test_dir = '/Users/bas/src/pqclean/testcases/test_symbol_ns_zzd3cdk6'
init = <function isolate_test_files.<locals>.initializer at 0x10d1a93b0>
destr = <function isolate_test_files.<locals>.destructor at 0x10d1a9440>