Skip to content

Instantly share code, notes, and snippets.

@akinovak
akinovak / pairing_puzzle.py
Created March 17, 2026 18:14
Find the discrete log of Q
def slope(P, Q, E):
if P == Q:
# tangent line
num = 3 * P[0]^2 + E.a4()
den = 2 * P[1]
else:
num = Q[1] - P[1]
den = Q[0] - P[0]
return num / den
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@akinovak
akinovak / bls-residue.ipynb
Created July 18, 2024 13:43
Auxiliary witness for BLS curves
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@akinovak
akinovak / semaphore-v4-ceremony_attestation.log
Created June 17, 2024 16:57
Attestation for Semaphore V4 Ceremony MPC Phase 2 Trusted Setup ceremony
Hey, I'm akinovak-28649205 and I have contributed to the Semaphore V4 Ceremony.
The following are my contribution signatures:
Circuit # 1 (semaphorev4-1)
Contributor # 153
Contribution Hash: 2aac2664 a629737f 735cad78 279135bd
ed59d191 eebfd4b7 3a079bf0 86dd4893
904a417d 48264a58 9abba2b6 88db747e
29dd3e67 fa0630f7 2c8a08d2 83a89110
#[cfg(test)]
mod grand_polys {
use std::{ops::{AddAssign, MulAssign}, time::Instant, iter};
use ark_bn254::{Fr as F, G1Affine, G1Projective};
use ark_ec::{VariableBaseMSM};
use ark_std::{test_rng, UniformRand};
use ark_ff::{Field, Zero, One, batch_inversion};
use num_bigint::BigUint;
@akinovak
akinovak / permute_for_lookup.rs
Last active October 21, 2022 17:05
Simplified permuting A(X) and S(X) for lookup argument
use std::collections::BTreeMap;
fn permute_for_lookup(
a: &[usize],
s: &[usize],
) -> (Vec<usize>, Vec<usize>) {
assert_eq!(a.len(), s.len());
let mut a_permuted = a[..].to_vec();
a_permuted.sort();
@akinovak
akinovak / attestation.txt
Created April 4, 2022 11:52
Attestation
I contributed to the Semaphore Trusted Setup Multi-Party Ceremony.
The following are my contribution signatures:
Circuit: semaphore16
Contributor # 17
Hash: fd197242 f740592b 5e1b135e 00e2863c
7c6267fd ae6d0ced d53fc94a e26438f4
267ab5bb 15529f6d 9fb244d6 ef00a45a
90bbc156 010599cc d5682100 99868e0d