Skip to content

Instantly share code, notes, and snippets.

View RajeshRk18's full-sized avatar
🖥️
Building

Rajesh RajeshRk18

🖥️
Building
View GitHub Profile
@RajeshRk18
RajeshRk18 / semaphore-v4-ceremony_attestation.log
Created June 17, 2024 17:57
Attestation for Semaphore V4 Ceremony MPC Phase 2 Trusted Setup ceremony
Hey, I'm RajeshRk18-87425610 and I have contributed to the Semaphore V4 Ceremony.
The following are my contribution signatures:
Circuit # 1 (semaphorev4-1)
Contributor # 155
Contribution Hash:
441cb73b 31ce8bb4 31ce87fd b3ce38e2
5310378c a56e278b c0d8d173 534dca71
9104d1fc 8e43c81b ca3b086c ae9fce2d
1e1a8134 5765bbe0 07c57ce5 2033a169

Step1: Download prebuilt binaries

# Linux
wget   $(curl -s https://api.github.com/repos/bnb-chain/bsc/releases/latest |grep browser_ |grep geth_linux |cut -d\" -f4)
mv geth_linux geth
chmod -v u+x geth

Step2: Download config files (for mainnet)

#[derive(Clone, Debug)] // Cloneable
pub struct SecretKey {
scalar: [u64; 2] // Copyable
}
impl Drop for SecretKey {
fn drop(&mut self) {
unsafe {
core::ptr::write_volatile(&mut self.scalar, [0u64; 2]);
core::sync::atomic::compiler_fence(core::sync::atomic::Ordering::SeqCst);
use ark_ff::BigInt;
let (mut a, ptr) = {
let b = BigInt::<4>::new([12, 34, 56, 78]);
println!("Creation Address: {:?}", b.0.as_ptr());
(b, b.0.as_ptr())
};
println!("Value before dropping: {:?}", a);
use curve25519_dalek::Scalar;
let (mut a, ptr) = {
let b = Scalar::from_bytes_mod_order([
45, 34, 23, 78, 7, 12, 65, 4, 34, 12, 12, 45, 65, 45, 4, 54, 33, 26, 65, 44, 65, 44,
67, 86, 43, 66, 8, 56, 42, 67, 78, 94,
]);
println!("Creation Address: {:?}", b.bytes.as_ptr());
(b, b.bytes.as_ptr())
use cheetah::Scalar;
let (mut a, ptr) = {
let b = Scalar::new([12, 34, 56, 78]);
println!("Creation Address: {:?}", b.0.as_ptr());
(b, b.0.as_ptr())
};
println!("Value before dropping: {:?}", a.0);
use lambdaworks_math::unsigned_integer::element::UnsignedInteger;
fn main() {
let (mut a, ptr) = {
let b = UnsignedInteger::<4>::from_limbs([1234, 234, 567, 987]);
println!("Creation Address: {:?}", b.limbs.as_ptr());
(b, b.limbs.as_ptr())
};
use libsecp256k1::curve::Scalar;
fn main() {
let limbs: [u32; 8] = [23, 4, 55, 6, 7, 2, 4, 1];
let (mut b, ptr) = {
let a = Scalar(limbs);
println!("Creation Address: {:?}", a.0.as_ptr());
(a, a.0.as_ptr()) // a gets copied and returned
};