All challenges
Code AnalysisBeginner 60s

Trace: Diffie-Hellman

Do both parties compute the same shared secret?
Starter code
const g=5n,p=23n;
const a=6n,A=g**a%p;
const b=15n,B=g**b%p;
const sharedA=B**a%p;
const sharedB=A**b%p;
console.log(sharedA===sharedB)

Think you can answer under pressure?

Get matched and answer live questions in 3-minute 1v1 battles. Elo ranking, badge tiers and bragging rights on the line.

Play this in a 3-minute battle