Workspace IndexMath › Day 52

Trusted Setup vs. Transparency (STARK vs. SNARK) TODO

Math · Day 52 / 52 · December — Cryptography & Information Theory (Day 44-52)

Concept

Many SNARKs require a trusted setup to generate public parameters before the proof system can be used, and if the secret value used in that process (often called "toxic waste") is not destroyed, forged proofs become possible. That's why an MPC ceremony is used to make the setup secure as long as just one participant is honest, and universal, updatable setups like KZG-based ones — which don't need to be redone per circuit — are preferred. STARKs rely only on hash functions and error-correcting codes, so they have no secret parameters at all, making them transparent and eliminating the setup trust assumption. The cost is proof size and verification cost: STARK proofs are generally larger than pairing-based SNARK proofs. Being hash-based is also often cited as giving STARKs a more conservative security assumption against quantum attacks.

Choosing a proof system is a question of trust assumptions before it's a question of performance — if the setup is compromised, everything verified on top of it becomes meaningless.

Code & Formula

# 신뢰된 셋업 vs 투명성(STARK vs SNARK) — 신뢰된 셋업이 있는 스킴은 "독성 폐기물"(toxic
# waste, 셋업에 쓰인 비밀 난수)이 새면 위조 증명이 가능해진다는 걸 토이 버전으로 보여준다.

import random


def trusted_setup():
    # 이 비밀(tau)을 아무도 몰라야 안전 — 만약 한 명이라도 저장해 두면 "독성 폐기물" 유출.
    tau = random.randint(1, 10**9)
    public_params = pow(2, tau, 10**9 + 7)   # 공개되는 건 tau 로 만든 파생값뿐
    return tau, public_params


def verify_honest_proof(public_params, claimed_value):
    return claimed_value == public_params


def forge_with_leaked_tau(tau):
    # tau 가 새어 나가면 검증자를 속이는 "증명"을 그냥 다시 계산해서 만들 수 있다.
    return pow(2, tau, 10**9 + 7)


tau, params = trusted_setup()
print(f"신뢰된 셋업 공개 파라미터 = {params}")
print("정직한 증명자:", verify_honest_proof(params, params), "(정상 검증 통과)")

forged = forge_with_leaked_tau(tau)   # tau 를 안다면 누구나 위조 가능
print("tau 유출 시 위조 증명도 검증 통과:", verify_honest_proof(params, forged))
print("\n반대로 STARK 류(투명성)는 이런 비밀 tau 자체가 없다 — 공개 무작위성(예: 해시)만")
print("쓰므로 '독성 폐기물'이 존재하지 않는다. 대가는 증명 크기가 더 크다는 것.")

Exercise

Prove the same simple circuit using both a library that needs a trusted setup and one that's transparent, then tabulate the presence/absence of setup artifacts, proof size, and verification time.

Practical Connection

When reviewing a validity proof for an L2 rollup, or privacy and off-chain computation verification for a prediction market, on-chain verification gas and setup trust assumptions are decided exactly on this trade-off.

Where it lands in Jayverse

Key expressions

Words and phrases from this page worth keeping, with the Korean meaning and the sentence they come from.

Expression뜻 · 쓰이는 자리
toxic waste(신뢰 설정에서 파기해야 할) 독성 폐기물, 비밀값 · 트러스티드 세팅에서 반드시 파괴해야 하는 비밀 파라미터를 가리키는 비유. "often called toxic waste"
as long as~하기만 하면, ~인 한 · 조건 하나만 충족되면 성립하는 상황을 말할 때. "secure as long as just one participant is honest"
updatable갱신 가능한 · 한 번 만든 설정을 다시 쓸 수 있는 성질을 말할 때. "universal, updatable setups like KZG-based ones"
no ... at all전혀 ~이 없는 · 어떤 요소가 완전히 부재함을 강조할 때. "have no secret parameters at all"
the cost is대가는 ~이다, 치러야 하는 대가 · 이점을 얻는 대신 감수해야 하는 단점을 말할 때. "The cost is proof size and verification cost"
conservative보수적인, 안전을 더 따지는 · 위험을 덜 감수하는 가정·설계를 말할 때. "a more conservative security assumption"
eliminate the trust assumption신뢰 가정을 아예 없애버리다 · 특정 전제를 필요로 하지 않게 만들 때. "eliminating the setup trust assumption"
KZGKZG 다항식 커밋먼트(Kate-Zaverucha-Goldberg commitment) · 회로마다 다시 만들 필요 없는 범용 업데이터블 셋업 방식의 예. "universal, updatable setups like KZG-based ones"
MPC다자간 계산(Multi-Party Computation) · 트러스티드 세팅의 비밀값을 안전하게 생성하기 위한 세레모니 방식. "an MPC ceremony is used to make the setup secure"
SNARK축약 비대화형 지식논증(Succinct Non-interactive ARgument of Knowledge) · 트러스티드 세팅이 필요한 대표적 증명 시스템. "Many SNARKs require a trusted setup to generate public parameters"
STARK확장 가능한 투명 논증(Scalable Transparent ARgument of Knowledge) · 신뢰 설정 없이 해시 함수만으로 구성되는 증명 시스템. "STARKs rely only on hash functions and error-correcting codes"

If you study this on a given day, add a note link and a ✅ to this line in the source curriculum (docs/knowledge/math-50-curriculum.md) and this spot will lead straight to the note body. You can also write directly on this page — but regenerating overwrites it, so it's safer to keep anything you want to save as markdown under docs/algorithms/.


한국어

신뢰된 셋업 vs 투명성(STARK vs SNARK) TODO

Math · Day 52 / 52 · 12월 — 암호학·정보이론 (Day 44–52)

개념

많은 SNARK는 증명 시스템을 쓰기 전에 공개 파라미터를 생성하는 신뢰된 셋업을 요구하고, 이때 쓰인 비밀값(흔히 toxic waste라 부른다)이 폐기되지 않으면 거짓 증명을 만들 수 있다. 그래서 다자간 의식(MPC ceremony)으로 참가자 중 한 명만 정직하면 안전하도록 만들고, KZG 기반의 universal·updatable 셋업처럼 회로마다 다시 하지 않아도 되는 형태가 선호된다. STARK는 해시 함수와 오류정정부호에만 의존하는 구성이라 비밀 파라미터가 없고, 따라서 투명(transparent)하며 셋업 신뢰 가정이 사라진다. 대가는 증명 크기와 검증 비용으로, 일반적으로 STARK 증명이 페어링 기반 SNARK보다 크다. 또한 해시 기반이라는 성질 덕분에 STARK는 양자 공격에 대한 가정이 더 보수적이라는 점도 자주 언급되는 차이이다.

증명 시스템 선택은 성능 문제이기 이전에 신뢰 가정 문제이고, 셋업이 오염되면 그 위의 모든 검증이 무의미해진다.

코드 · 수식

# 신뢰된 셋업 vs 투명성(STARK vs SNARK) — 신뢰된 셋업이 있는 스킴은 "독성 폐기물"(toxic
# waste, 셋업에 쓰인 비밀 난수)이 새면 위조 증명이 가능해진다는 걸 토이 버전으로 보여준다.

import random


def trusted_setup():
    # 이 비밀(tau)을 아무도 몰라야 안전 — 만약 한 명이라도 저장해 두면 "독성 폐기물" 유출.
    tau = random.randint(1, 10**9)
    public_params = pow(2, tau, 10**9 + 7)   # 공개되는 건 tau 로 만든 파생값뿐
    return tau, public_params


def verify_honest_proof(public_params, claimed_value):
    return claimed_value == public_params


def forge_with_leaked_tau(tau):
    # tau 가 새어 나가면 검증자를 속이는 "증명"을 그냥 다시 계산해서 만들 수 있다.
    return pow(2, tau, 10**9 + 7)


tau, params = trusted_setup()
print(f"신뢰된 셋업 공개 파라미터 = {params}")
print("정직한 증명자:", verify_honest_proof(params, params), "(정상 검증 통과)")

forged = forge_with_leaked_tau(tau)   # tau 를 안다면 누구나 위조 가능
print("tau 유출 시 위조 증명도 검증 통과:", verify_honest_proof(params, forged))
print("\n반대로 STARK 류(투명성)는 이런 비밀 tau 자체가 없다 — 공개 무작위성(예: 해시)만")
print("쓰므로 '독성 폐기물'이 존재하지 않는다. 대가는 증명 크기가 더 크다는 것.")

연습

같은 간단한 회로를 신뢰된 셋업이 필요한 시스템과 투명한 시스템 각각의 라이브러리로 증명해 보고, 셋업 산출물 유무·증명 크기·검증 시간을 표로 비교해 보기.

실무 · Verex 연결

L2 롤업의 유효성 증명이나 예측시장의 프라이버시·오프체인 계산 검증을 검토할 때, 온체인 검증 가스와 셋업 신뢰 가정이 정확히 이 트레이드오프 위에서 결정된다.

Jayverse에서의 위치

핵심 표현

이 페이지의 영어 본문에서 배울 만한 단어와 표현, 뜻과 나온 자리.

Expression뜻 · 쓰이는 자리
toxic waste(신뢰 설정에서 파기해야 할) 독성 폐기물, 비밀값 · 트러스티드 세팅에서 반드시 파괴해야 하는 비밀 파라미터를 가리키는 비유. "often called toxic waste"
as long as~하기만 하면, ~인 한 · 조건 하나만 충족되면 성립하는 상황을 말할 때. "secure as long as just one participant is honest"
updatable갱신 가능한 · 한 번 만든 설정을 다시 쓸 수 있는 성질을 말할 때. "universal, updatable setups like KZG-based ones"
no ... at all전혀 ~이 없는 · 어떤 요소가 완전히 부재함을 강조할 때. "have no secret parameters at all"
the cost is대가는 ~이다, 치러야 하는 대가 · 이점을 얻는 대신 감수해야 하는 단점을 말할 때. "The cost is proof size and verification cost"
conservative보수적인, 안전을 더 따지는 · 위험을 덜 감수하는 가정·설계를 말할 때. "a more conservative security assumption"
eliminate the trust assumption신뢰 가정을 아예 없애버리다 · 특정 전제를 필요로 하지 않게 만들 때. "eliminating the setup trust assumption"
KZGKZG 다항식 커밋먼트(Kate-Zaverucha-Goldberg commitment) · 회로마다 다시 만들 필요 없는 범용 업데이터블 셋업 방식의 예. "universal, updatable setups like KZG-based ones"
MPC다자간 계산(Multi-Party Computation) · 트러스티드 세팅의 비밀값을 안전하게 생성하기 위한 세레모니 방식. "an MPC ceremony is used to make the setup secure"
SNARK축약 비대화형 지식논증(Succinct Non-interactive ARgument of Knowledge) · 트러스티드 세팅이 필요한 대표적 증명 시스템. "Many SNARKs require a trusted setup to generate public parameters"
STARK확장 가능한 투명 논증(Scalable Transparent ARgument of Knowledge) · 신뢰 설정 없이 해시 함수만으로 구성되는 증명 시스템. "STARKs rely only on hash functions and error-correcting codes"

공부한 날 원본 커리큘럼(docs/knowledge/math-50-curriculum.md)의 이 줄에 노트 링크와 ✅ 를 붙이면, 이 자리는 노트 본문으로 바로 이어집니다. 노트 없이 이 페이지에 바로 적어도 됩니다 — 다만 다시 생성하면 덮어쓰이므로, 남길 글은 docs/algorithms/ 의 마크다운으로 쓰는 편이 안전합니다.

← 1055. 영지식 증명의 3성질(완전성·건전성·영지식)1057. 함수형 업데이트와 상태 diff →