GitXplorerGitXplorer
z

bounty-ecdsa-signature

public
3 stars
1 forks
0 issues

Commits

List of commits on branch master.
Verified
d8140c9d3aa3d0bfbdf19caf536d3094a832ce33

test: add randomized test for ecdsa

yy-pakorn committed a year ago
Verified
61dd8b9c96243f5fb38349f601730d7e17830279

test: add signature validity test on example

yy-pakorn committed a year ago
Unverified
d32a729a9e85a766b9aa1c4946de73229c70fddf

add some comment

yyoyoismee committed a year ago
Verified
66e1acacff11b4175eec2ce892ee4c8fdb919660

test: add ecdsa verify against test

yy-pakorn committed a year ago
Verified
0fcd607ee9c9a5df3ad7a51e8f47acaf0b59555a

test: add randomized tests

yy-pakorn committed a year ago
Verified
7f4be26ea255696e12ccd949c7782426616228f7

feat: remove verify algo

yy-pakorn committed a year ago

README

The README file for this repository.

TFHECDSA (TFHE ECDSA)

This repo is a tutorial/experiment/technical-report on implementing Fully Homomorphic Encrypted Elliptic Curve Digital Signature Algorithm (ECDSA) for using TFHE. I'm try to give some intro to each key concept. feel free to skip ahead.

YOLO run

if you just want to run the experiment now.

  • install rust
  • clone this repo.
  • update Cargo.toml to fit your machine. see TFHE Supported platforms for more info.
  • (optional) open tmux or equivalence if you're on a remote server.
  • run cargo run --release --example ecdsa.
  • now you have ~1-2 days to read this doc if you're on a 64-cores machine.

Logging

There's 3 level of logging built-in in the crates: Info, Debug, Traces. Default value is configured to Debug.

  • Info - High level operation logging: all ECDSA operation, all group operation, scalar mul bit operation.
  • Debug - Low level operation logging: all field operation.
  • Trace - Auxilary, loop, and super low level logging: inverse mod bit, pow mod bit, selector, modular reduction,etc.

Custom Logging Level

Use RUST_LOG="level" and then cargo command to force Rust to use that level of logging. For example,

RUST_LOG="info" cargo test --release -- --nocapture correct_inverse

Tweak Loggin

We use logging_timer to automatically log our function runtime.

To remove/add timer, find these 2 patterns of code.

  • Function macros - #[time("info", "Group Projective Add")] decorated on top of function will print out the timer when the function ends
  • Inline macros
    • let cal_bits_tmr = timer!(Level::Debug; "Calculating bits"); - timer! will print out timer when the timer object was dropped
    • let _tmr = stimer!(Level::Info; "Scalar Mul", "Bits {:?}", _ic); - stimer! will print out timer when the timer object was initialized and dropped