CRYSTALS-Dilithium(ML-DSA, NIST FIPS 204) 학습 자료 및 Python 데모 코드입니다.
👉 https://mvlchain.github.io/dilithium-study/
양자내성암호 개념부터 Dilithium의 수학적 토대, 블록체인 적용까지 다룹니다.
키 생성, 서명/검증, Ethereum/Cosmos 주소 도출, 파라미터별 크기 비교를 직접 실행해볼 수 있습니다.
- Python 3.9+
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install dilithium-py pycryptodomepython main.pyCRYSTALS-Dilithium / ML-DSA 데모
NIST FIPS 204 표준 (2024)
============================================================
ML-DSA-44 (Dilithium2)
============================================================
[키 크기]
공개키: 1312 bytes
비밀키: 2528 bytes
[공개키 구조]
rho (A 시드): 32 bytes 3f2a1b...
t1 (A·s1+s2): 1280 bytes 9c4e7d...
[비밀키 구조]
rho (A 시드): 32 bytes 3f2a1b...
K (서명 시드): 32 bytes a1c3e5...
tr (pk 해시): 64 bytes 8f2b4d...
s1 (비밀 벡터): 384 bytes 010200...
s2 (비밀 벡터): 384 bytes 020100...
t0 (t 하위비트):1632 bytes 4a2f1e...
[지갑 주소]
Ethereum (Keccak256[-20B]): 0x...
Cosmos (SHA256→RIPE160): cosmos1...
[서명]
서명 크기: 2420 bytes
검증 결과: OK
위조 서명 검증: FAIL (정상)
============================================================
ECDSA 대비 요약
============================================================
ECDSA ML-DSA-44 ML-DSA-65 ML-DSA-87
공개키 33B 1312B 1952B 2592B
비밀키 32B 2528B 4000B 4864B
서명 64B 2420B 3309B 4627B
보안 레벨 128bit 128bit 192bit 256bit
양자 안전 X O O O