This repo demonstrates three simple OpenVM guest program examples along with some handy utilities for working with OpenVM programs.
It contains four crates:
openvm-example-fibonacci: an example Fibonacci program. See the book for more details.diffie-hellman-example: an example Diffie Hellman Key Exchange program. This program takes in two inputs as Alice's and Bob's private keys and generates a shared key hashed with SHA-256.polynomial_sha256: an example demonstrating polynomial evaluation with modular arithmetic and SHA256 hashing, showcasing multiple VM extensions.
openvm-example-utils: a set utility functions to generate OpenVM program inputs in the right format. Since the Fibonacci program takes au64as input, you can use thegenerate_input_from_u64function to generate the input.