Skip to content

Instantly share code, notes, and snippets.

View znewman01's full-sized avatar

Zack Newman znewman01

  • Chainguard
  • Brooklyn, NY
View GitHub Profile
@znewman01
znewman01 / Hamster2.scala
Created October 22, 2012 21:48
Scala-Java Interop
class Hamster(var weight: Int)
@znewman01
znewman01 / Rat.scala
Created October 22, 2012 21:50
Java-Scala Interop Pt. 2
public class Rat extends Rodent {
public void gnaw() {
System.out.println("gnawsome");
}
}

Keybase proof

I hereby claim:

  • I am znewman01 on github.
  • I am znewman01 (https://keybase.io/znewman01) on keybase.
  • I have a public key whose fingerprint is 2018 0F9A 0FBD 7495 F640 9864 9D05 CCA4 245B 11E8

To claim this, I am signing this object:

(require 'json)
(require 'org-attach)
(defun zjn--format-iacr-org (region)
(let* ((id (if (string-empty-p region)
(read-string "IACR ePrint ID (ex. 2019/001)? ")
region))
(json-string (zjn--fetch-iacr-info id))
(json-object-type 'hash-table)
(json-array-type 'list)
@znewman01
znewman01 / nose2.log
Created August 29, 2019 19:05
nose2 issue
$ nose2
.
----------------------------------------------------------------------
Ran 1 test in 0.000s
OK
$ cd tests
$ nose2
E
======================================================================
DELETE FROM measurements
WHERE rowid IN (
SELECT m.rowid
FROM measurements m
INNER JOIN batches b ON (m.batch_id == b.id)
INNER JOIN relays r
ON (
b.relay1_fingerprint == r.fingerprint
OR b.relay2_fingerprint == r.fingerprint
)
def fast(rtts, relays):
rtts = np.asarray(rtts)
# firsthop[a][b][c] is the latency from a to b
firsthop = np.repeat(rtts.reshape((50, 50, 1)), len(relays), axis=2)
# secondhop[a][b][c] is the latency from a to c
secondhop = np.repeat(rtts.reshape((50, 1, 50)), len(relays), axis=1)
# secondhop[a][b][c] is the latency from b to c
# secondhop = np.repeat(initial.reshape((1, 50, 50), len(relays), axis=0))
data = firsthop + secondhop
df = pd.DataFrame(
import sys
import argparse
import sqlite3
import contextlib
import random
import time
from pathlib import Path
from typing import List
{ pkgs, ... }:
# $ sudo nixos-container create postgres --config-file $THIS_FILE
# $ sudo nixos-container start postgres
# $ curl people.csail.mit.edu/zjn/num-measurements.gz \
# | gunzip -c - \
# | grep -v "REFRESH MATERIALIZED VIEW public.triplet_latency_mv" \
# | psql -U shortor -h $(nixos-container show-ip postgres) shortor
#
# Source: https://inv.alid.pw/posts/nixos-container-postgres/
Component Cryptography Quantum Resistant Plan (after standardization)
Signing/verifying artifacts (short/long-lived keys) Digital signatures (currently ECDSA) Replace with PQ signature algorithms.
Rekor append-only log Merkle tree (currently SHA2 hash) ✔️
Fulcio/Rekor signatures on certificates, SETs, SCTs, and STHs Digital signatures (currently ECDSA) Replace with PQ signature algorithms.
TUF: distributing Sigstore root certificates Digital signatures (currently ECDSA) Add PQ signature algorithms to TUF implementation.
OIDC tokens for identity Digital signatures (currently RSA) OpenID Foundation should add (and require) PQ algorithms in OIDC.
TLS: secure point-to-point communication Key exchange (ECDHE, DHE) IETF should update TLS to support PQ key exchange and signature algorithms.
Signatures (RSA, ECDSA, EdDSA)
Encryption (AES, ChaCha20/Poly1305) ✔️