Skip to content

Commit

Permalink
Merge pull request #15 from AbdelStark/main
Browse files Browse the repository at this point in the history
📝 init mdbook
  • Loading branch information
AbdelStark authored May 29, 2024
2 parents c57ddfd + 1d3863b commit eaecfc9
Show file tree
Hide file tree
Showing 6 changed files with 85 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/book.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Bitcoin Circle STARK Book

on:
push:
branches:
- main
pull_request:

jobs:
deploy:
runs-on: ubuntu-20.04
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- uses: actions/checkout@v2

- name: Setup mdBook
uses: peaceiris/actions-mdbook@v1
with:
mdbook-version: "0.4.10"

- name: Build mdBook
run: mdbook build
working-directory: ./book

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.ref == 'refs/heads/main' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./book/book
1 change: 1 addition & 0 deletions book/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
book
13 changes: 13 additions & 0 deletions book/book.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[book]
authors = ["Bitcoin-Wildlife-Sanctuary"]
language = "en"
multilingual = false
src = "src"
title = "Bitcoin Circle STARK"

[output.html]
git-repository-url = "https://github.com/Bitcoin-Wildlife-Sanctuary/bitcoin-circle-stark/"
edit-url-template = "https://github.com/Bitcoin-Wildlife-Sanctuary/bitcoin-circle-stark/book/{path}"

[output.html.playground]
runnable = false
8 changes: 8 additions & 0 deletions book/src/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

# Introduction

Bitcoin Circle STARK includes Bitcoin script implementations of various cryptographic primitives for STARK.

Essentially, it's a collection of building blocks of a Circle STARK verifier in Bitcoin script.

- [Circle STARKs paper](https://eprint.iacr.org/2024/278.pdf)
6 changes: 6 additions & 0 deletions book/src/SUMMARY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

# Summary

[Introduction](README.md)

- [Primitives](./primitives.md)
26 changes: 26 additions & 0 deletions book/src/primitives.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@

# Primitives

## M31, CM31, QM31, Circle Point

- Implementation of add, sub, mul of Mersenne-31 (M31), its complex extension (CM31), and its degree-4 extension (QM31), which is imported from [BitVM/rust-bitcoin-m31-or-babybear](https://github.com/BitVM/rust-bitcoin-m31-or-babybear).

## CirclePoint over QM31

- Implementation of doubling of a circle point over QM31.
- Implementation of drawing a random point on the circle over QM31, useful for Order-Optimal Data Structures (OODS).

## Fiat-Shamir Transcript

- Also known as "channel," which is the term used in Starkware's [stwo](https://github.com/starkware-libs/stwo) library.
- Absorbing commitments and QM31 elements through `OP_CAT + OP_SHA256`.
- Squeezing random elements for Fiat-Shamir transform using hints and `OP_CAT + OP_SHA256`.

## Proof-of-Work Check

- Calculating a proof-of-work nonce for the "channel", based on specified security bits.
- Verifying the proof-of-work nonce and computing the new "channel" state.

## Merkle Tree

- Implementation of Merkle path verification using hints and `OP_CAT + OP_SHA256`.

0 comments on commit eaecfc9

Please sign in to comment.