Skip to content

primus-labs/zktls-att-verification

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

69 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

zkTLS-Att-Verification

Overview

This repository provides functionality for verifying ECDSA signature and AES ciphertext against attestations generated by Primus.

For ECDSA signature, the underlying elliptic curve is Secp256k1. AES ciphertext is produced using AES-128-GCM.

Build

Compile in release mode:

cargo build --release

Examples

1. AES Ciphertext Verification

The example verification_example.rs demonstrates how to verify an AES ciphertext.

Build and run the example as follows:

cargo build --release --example verification_example
./target/release/examples/verification_example

2. Attestation Verification

Two other examples are provided: attestation_example.rs and partial_attestation_example.rs.

They demonstrate how to verify attestations generated by Primus, including the ECDSA signature, AES ciphertext, and the data source URL of the attestation.

Build and run them as follows:

cargo build --release --example attestation_example
./target/release/examples/attestation_example

or

cargo build --release --example partial_attestation_example
./target/release/examples/partial_attestation_example

Note:

  • attestation_example takes the full JSON ciphertext as input.

  • partial_attestation_example similar to attestation_example, but takes a trimmed JSON ciphertext (containing only the fields required for computation) as input, which is more computationally efficient.

Benchmark

The benchmark file is located in bench.

Build and run the benchmark as follows:

cargo bench --bench benchmark

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages