ZKP16 Hardware Acceleration of ZKP

ZKP学习笔记

ZK-Learning MOOC课程笔记

Lecture 16: Hardware Acceleration of ZKP (Guest Lecturer: Kelly Olson)

  • The What and Why of Hardware Acceleration

    • Hardware acceleration is the use of dedicated hardware to accelerate an operation so that it runs faster and/or more efficiently.
    • Hardware acceleration can involve optimizing functions and code to use existing hardware (COTS) or it may involve the development of new hardware designed for a specific task.
      • COTS (commercially available off-the-shelf) hardware includes CPUs, GPUs, and FPGAS
      • Custom hardware is often referred to as an ASIC
    • Examples
  • Hardware acceleration for crytpo

  • Why HW acceleration for ZKP

    • ZK (and non-ZK) proof generation has high overheads relative to native computation
  • Goals of HW acceleration for ZKP

    • Throughput: increase the number of operations per system
    • Cost: reduce the cost of operation e.g. Bitcoin mining rigs are designed to reduce capital expenses ($/hash) and operational expenses (watts/hash)
    • Latency: reduce the time of an individual operation e.g. 2kBridges may want to reduce the proof generation time for faster finality
  • Key Computational Primitives of ZKP

    • Each proof system, and associated implementation will have slightly different computational requirements.

    • Across a variety of proof systems these are three of the most computationally expensive operations

      • Multiscalar Multiplication (MSM)
        • A 'dot product' of elliptic curve points and scalars

        • Easily paralledizable

        • Optimization

          • When performing a MSM off of the host device, the scalars and sometimes points must be moved to the accelerator. The available communication bandwidth limits the maximum possible performance of the accelerator.
      • Number Theoretic Transformation (NTT)
        • Common algorithms like Cooley-Tukey reduce complexity from O ( N 2 ) O(N^2) O(N2) to O ( N I o g N ) O(NIogN) O(NIogN)
        • Not Easily paralledizable
        • Furthermore, these elements must be kept in memory to be operated on, imposing high memory requirements
      • Arithmetic Hashes (e.g., Poseidon)
    • SNARK V.S. STARK

      • The MSM, NTT and Hashes take 2/3 or more time in the proving system
    • Foundational Primitive: Finite Field Arithmetic (especially ModMul)

  • Hardware Resources Required

    • Determining Computational Cost

    • Selecting the Right Hardware

      • Given that these workload are driven predominately by modular multiplication, we should look for platforms can perform a large number of multiplications, quickly and cheaply
      • Estimated HW performance can be evaluated by looking at # of hardware multipliers, size of hardware multipliers, and speed/frequency of each instruction
      • Examples
    • Two Key Components to HW Acceleration

      • 'HW friendly' Algorithm
      • Efficient Implementation
  • Limits of Acceleration

    • Acceleration Pitfalls

    • Production Examples: Filecoin

  • Current Status of Hardware Acceleration

  • Future Directions for Hardware Acceleration

相关推荐
逸模41 分钟前
多业态连锁,如何同步铺开各类门店
大数据·人工智能·笔记·工程·公装·连锁店
乐橙开放平台2 小时前
明厨亮灶笔记:乐橙轻应用 H5 + 小程序插件,一套 BFF 出两张播放凭证
人工智能·笔记·物联网·小程序·音视频·notepad++
左左右右左右摇晃3 小时前
手写Tomcat原理整理
java·开发语言·笔记·tomcat
.Hypocritical.3 小时前
Maven笔记——2
java·笔记·maven
乐橙开放平台3 小时前
养殖 SaaS 笔记:乐橙 IoT 物模型管环境,视频 OpenAPI 管回看
数据库·笔记·物联网·mysql·音视频
love530love12 小时前
【笔记】AutoClaw NSIS 安装器卡死、进程杀不掉、目录删不了?我是这么解决的
人工智能·windows·笔记·agent
谙弆悕博士14 小时前
系统集成项目管理工程师教程(第3版)笔记——第2章:信息技术发展
笔记·计算机网络·信息安全·学习方法·业界资讯·软考·系统分析师
吃着火锅x唱着歌15 小时前
Effective C++ 学习笔记 条款37 绝不重新定义继承而来的缺省参数值
c++·笔记·学习
风曦Kisaki15 小时前
# Linux笔记:操作系统优化与资源管理
linux·运维·服务器·笔记
阿米亚波16 小时前
【C++】流式数据输入处理(不完全整理)
开发语言·c++·笔记