Skip to content

Instantly share code, notes, and snippets.

I contributed to the Semaphore Trusted Setup Multi-Party Ceremony.
The following are my contribution signatures:
Circuit: semaphore16
Contributor # 131
Hash: 8c70f5c3 84aa51d7 5ab67ff8 1696f93f
0a9a6aba be1fab05 76b41b2e 82264331
cfabb42f 58cd6da0 c36a3578 2e57720f
85bc2622 fce06238 ac94f299 a9e9b942
This post links my 3Box profile to my Github account! Web3 social profiles by 3Box.
✅ did:3:bafyreiars66xrq25q6x2bdb3icmoxyu4iliqchya3tignxtaisqkvi5yce ✅
Create your profile today to start building social connection and trust online at https://3Box.io/
@ZeframLou
ZeframLou / gadget-lattice-visualization.py
Created April 29, 2021 06:19
Visualization for the objective function in the gadget lattice optimization problem
import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits import mplot3d
from matplotlib import cm
# 2D
b = 4
def cost_func(z1, z2):
d1 = 2 * (b**2 + 1) * z1 - 2 * b * z2
@ZeframLou
ZeframLou / mckilliam-cvp.py
Created April 29, 2021 06:11
Implementation of the CVP algorithm for lattice of the Voronoi first kind from [Mckilliam 2014] in Python
import numpy as np
import graph_tool.all as gt
# B is the obtuse superbasis of a n-dimensional gadget lattice
# p is a (n+1)-dimensional vector
# returns t \in \{0,1\}^{n+1} such that ||B(p-t)||_2 is minimized
def next_step(B, p):
# construct adjacency matrix
n = B.shape[0]
Q = B.T @ B

Keybase proof

I hereby claim:

  • I am zeframlou on github.
  • I am zefram (https://keybase.io/zefram) on keybase.
  • I have a public key ASD30bUmofzNnjM5rUTtzW1D9vX4fQnp--DPEJjAg7FnAQo

To claim this, I am signing this object:

### Keybase proof
I hereby claim:
* I am zeframlou on github.
* I am zefram_l (https://keybase.io/zefram_l) on keybase.
* I have a public key ASAycCe1HxWJGD7JSujgEIlDfCZc81ehMAdLqftquO8Nowo
To claim this, I am signing this object: