Skip to content

Instantly share code, notes, and snippets.

View niooss-ledger's full-sized avatar

niooss-ledger

  • Deep into a Donjon. Our princess is in another castle.
View GitHub Profile
@niooss-ledger
niooss-ledger / README.md
Last active April 17, 2024 09:56
Short write-up for RWPQC CTF 2024

Short write-up for RWPQC CTF 2024

Subject: https://github.com/sandbox-quantum/CTF-RWPQC2024/tree/ea398c3e934cdb35198c4efa180fa6bd6e2f9670

Challenge 1

As the secret key $s$ is only 32-bit long, it is possible to brute-force it. As $t_1 = A_1 * s_1 + A_2 * s_2 + e$ with $e$ some error polynomials, we can speed things up by splitting the brute-force in two 16-bit enumerations with $s_1$ and $s_2$ and comparing $A_1 * s_1$ with $t_1 - A_2 * s_2$. If these two polynomials have coefficients which only differ by one, $(s_1, s_2)$ is likely to be the secret key.

@niooss-ledger
niooss-ledger / zkhack2024_IV_puzzleF3_writeup.md
Last active February 7, 2024 12:39
Write-up for ZK Hack IV puzzle F3: Chaos Theory
@niooss-ledger
niooss-ledger / zkhack2024_IV_puzzleF2_writeup.md
Created January 24, 2024 11:36
Write-up for ZK Hack IV puzzle F2: Supervillain
@niooss-ledger
niooss-ledger / zkhack2024_IV_puzzleF1_writeup.md
Last active February 7, 2024 04:31
Write-up for ZK Hack IV puzzle F1: Gamma Ray
@niooss-ledger
niooss-ledger / zkhack2022_III_puzzle3_writeup.md
Last active December 13, 2022 21:09
Write-up for ZK Hack III puzzle #3: Bigger is Better
@niooss-ledger
niooss-ledger / zkhack2022_III_puzzle2_writeup.md
Created December 5, 2022 11:43
Write-up for ZK Hack III puzzle #2: Power corrupts
@niooss-ledger
niooss-ledger / zkhack2022_III_puzzle1_writeup.md
Created November 28, 2022 18:46
Write-up for ZK Hack III puzzle #1: Zero-Sum Game

Write-up for zkHack puzzle #6: Soundness of Music

Subject

It is a well-known fact that 1+1=2. Recent work by Alice von Trapp (et al) suggests that under special conditions in the Swiss Alps, 1+1+1+1=1. Alice has been unable to prove this statement over the BLS12-381 scalar field. The primary difficulty appears to be the fact that 1 is not equal to 4. Alice's proving system can write a proof for every statement (x,y) where x and y are BLS12-381 scalars, and x+x+x+x=y. The proving system easily outputs a proof for the statement (1,4) showing 1+1+1+1=4, but seems unable to produce a proof for the statement (1,1) showing 1+1+1+1=1. >

Write-up for zkHack puzzle #5: To be Adaptive is to be Strong

1. Subject

Shallan recently found a proof system (see below) that enables proving that two Pedersen commitments commit to the same message (but with potentially different randomness). She employes this in her private cryptocurrency to show that two committed coins have the same value. However, soon after deployment, she receives a message from a self-proclaimed hacker. The message contains two Pedersen commitments and their openings, and a proof of message equality for these commitments. The proof is valid, but there's a twist: the openings contain different messages! How can this be? Reproduce the attack and help Shallan diagnose the problem in her system.