Skip to content

Instantly share code, notes, and snippets.

View bwesterb's full-sized avatar
⚛️

Bas Westerbaan bwesterb

⚛️
View GitHub Profile
-- vif-route 2014-09-02 08:20:19.000000000 +0200
+++ our-vif-route 2016-01-26 08:57:14.557343864 +0100
@@ -23,11 +23,37 @@
dir=$(dirname "$0")
. "${dir}/vif-common.sh"
+ip6_of()
+{
+ ip -6 addr show "$1" | perl -wane '/scope global/ && /inet6 (([0-9a-f]+:*)+)/ && print $1;'
+}
Conditionally mitigated
136.243.176.81; 136.243.176.126;
Our investigation has determined that the above IP(s) qualify for
conditional mitigation. These IP(s) have been unblocked, but may be
subject to low daily email limits until they have established a good
reputation.
Please note that mitigating this issue does not guarantee that your
email will be delivered to a user’s inbox.
import timeit
print timeit.timeit('PasswordHasher(time_cost=1).hash("")',
setup='from argon2 import PasswordHasher',
number=1000) * 2
print timeit.timeit('PasswordHasher(time_cost=2).hash("")',
setup='from argon2 import PasswordHasher',
number=1000)
@bwesterb
bwesterb / Gatecount for circuit in original gate set
Last active September 12, 2016 19:12
Gatecount of the circuit to break example instance of binary MQ (using the first oracle) compared to the gate count of the circuit automatically translated to Clifford+T. Note that this translation is not optimal: it can be done better by hand.
-----------------------------------------------------------
81: "H, arity 1"
81: "Init0"
1221250362838: Subroutine: grover-iteration, shape ([Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q,Q],())
Total gates: 1221250363000
Inputs: 0
Outputs: 81
Qubits in circuit: 81
Subroutine: "grover-iteration"

Keybase proof

I hereby claim:

  • I am bwesterb on github.
  • I am bwesterb (https://keybase.io/bwesterb) on keybase.
  • I have a public key ASBVVTirqo8sdlMvu6UNw0G6ezPiVkTX5LjALk1J_20Dbgo

To claim this, I am signing this object:

./xmssmt algs
+------------------------+-----+-------+---------+----+------------+
| NAME | OID | #SIGS | SIGSIZE | W | CACHE SIZE |
+------------------------+-----+-------+---------+----+------------+
| XMSSMT-SHA2_20/2_256 | 1 | 2^20 | 5.0 kB | 16 | 98 kB |
| XMSSMT-SHA2_20/4_256 | 2 | 2^20 | 9.3 kB | 16 | 5.1 kB |
| XMSSMT-SHA2_40/2_256 | 3 | 2^40 | 5.6 kB | 16 | 101 MB |
| XMSSMT-SHA2_40/4_256 | 4 | 2^40 | 9.9 kB | 16 | 164 kB |
| XMSSMT-SHA2_40/8_256 | 5 | 2^40 | 18 kB | 16 | 9.2 kB |
| XMSSMT-SHA2_60/3_256 | 6 | 2^60 | 8.4 kB | 16 | 134 MB |
go-xmssmt benchmark ("xmssmt speed") on a AMD Ryzen 5 1600.
XMSSMT-SHA2_20/2_256
keygen: 441.180712 ms 150141 B/op 2284 allocs/op
sign: 688.293 µs 11136 B/op 23 allocs/op
verify: 1.258767 ms 7878 B/op 14 allocs/op
XMSSMT-SHA2_20/4_256
keygen: 170.966166 ms 158162 B/op 470 allocs/op
.section __TEXT,__text,regular,pure_instructions
.macosx_version_min 10, 13
.intel_syntax noprefix
.section __TEXT,__literal8,8byte_literals
.p2align 3 ## -- Begin function Sha256Init8x
LCPI0_0:
.quad 7640891574645810791 ## 0x6a09e6676a09e667
LCPI0_1:
.quad -4942790176617812347 ## 0xbb67ae85bb67ae85
LCPI0_2:
@bwesterb
bwesterb / gist:7159ea3147736b978ff9976c493648e1
Created July 28, 2018 18:03
java -jar openapi-generator-cli.jar generate -i https://bunq.com/swagger.json -g go -o go
This file has been truncated, but you can view the full file.
[main] INFO o.o.c.ignore.CodegenIgnoreProcessor - No .openapi-generator-ignore file found.
[main] WARN o.o.codegen.DefaultCodegen - Unknown type found in the schema: object
[main] WARN o.o.codegen.DefaultCodegen - Unknown type found in the schema: object
[main] WARN o.o.codegen.DefaultCodegen - Unknown type found in the schema: object
[main] WARN o.o.codegen.DefaultCodegen - Unknown type found in the schema: object
[main] WARN o.o.codegen.DefaultCodegen - Unknown type found in the schema: object
[main] WARN o.o.codegen.DefaultCodegen - Unknown type found in the schema: object
[main] WARN o.o.codegen.DefaultCodegen - Unknown type found in the schema: object
[main] WARN o.o.codegen.DefaultCodegen - Unknown type found in the schema: object
[main] WARN o.o.codegen.DefaultCodegen - Unknown type found in the schema: object
import yaml
import json
with open('swagger.json') as f:
d = json.load(f)
for obj in d['components']['schemas'].values():
if 'required' in obj and not obj['required']:
del(obj['required'])
if 'properties' in obj and not obj['properties']: