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

相关推荐
hengcaib11 小时前
防封号电销外包公司怎么选合规线路与风控核查方法
笔记
六点_dn14 小时前
Linux学习笔记-shell运算符
linux·笔记·学习
降临-max15 小时前
软件测试基础---项目实战
软件测试·笔记·功能测试·测试用例
鱼子星_16 小时前
【C++】内存管理:内存分布,new/delete的使用及细节处理,new/delete的底层,定位new表达式
开发语言·c++·笔记
愚昧之山绝望之谷开悟之坡16 小时前
回购逆回购
笔记
鱼子星_16 小时前
【C++】string(上):string的基本使用
c++·笔记·字符串
AOwhisky16 小时前
Python 学习笔记(第四期)——字符串:格式化、操作与文本处理——核心知识点自测与详解
开发语言·笔记·python·学习·列表·元组·字典
chnyi6_ya16 小时前
论文阅读笔记 | VIDEOPHY: Evaluating Physical Commonsense for Video Generation
论文阅读·笔记
AOwhisky17 小时前
Python 学习笔记(第六期)——函数:定义、参数传递与作用域
笔记·python·学习·云原生·运维开发·函数·参数传递
玖玥拾17 小时前
Unity 3D 基础(一)Unity基础架构、物理系统、视觉渲染、空间变换与对象查询
笔记·游戏·3d·unity·游戏引擎