Skip to content

Commit

Permalink
Merge pull request #1000 from 0xPolygonMiden/al-falcon
Browse files Browse the repository at this point in the history
Falcon verification inside Miden VM
  • Loading branch information
bobbinth authored Oct 5, 2023
2 parents 48b0eb0 + 71091b7 commit 5c57495
Show file tree
Hide file tree
Showing 19 changed files with 763 additions and 6,181 deletions.
4 changes: 2 additions & 2 deletions core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ doctest = false

[features]
default = ["std"]
std = ["math/std", "winter-utils/std"]
std = ["math/std", "winter-utils/std", "miden-crypto/std"]

[dependencies]
math = { package = "winter-math", version = "0.6", default-features = false }
crypto = { package = "miden-crypto", git = "https://github.com/0xPolygonMiden/crypto.git", branch = "next", default-features = false }
miden-crypto = { package = "miden-crypto", git = "https://github.com/0xPolygonMiden/crypto.git", branch = "next", default-features = false }
winter-crypto = { package = "winter-crypto", version = "0.6", default-features = false }
winter-utils = { package = "winter-utils", version = "0.6", default-features = false }

Expand Down
10 changes: 7 additions & 3 deletions core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@ extern crate alloc;
pub mod chiplets;
pub mod errors;

pub use ::crypto::{Word, EMPTY_WORD, ONE, WORD_SIZE, ZERO};
pub use miden_crypto::{Word, EMPTY_WORD, ONE, WORD_SIZE, ZERO};
pub mod crypto {
pub mod merkle {
pub use ::crypto::merkle::{
pub use miden_crypto::merkle::{
DefaultMerkleStore, EmptySubtreeRoots, InnerNodeInfo, MerkleError, MerklePath,
MerkleStore, MerkleTree, Mmr, MmrPeaks, NodeIndex, PartialMerkleTree,
RecordingMerkleStore, SimpleSmt, StoreNode, TieredSmt,
};
}

pub mod hash {
pub use ::crypto::hash::{
pub use miden_crypto::hash::{
blake::{Blake3Digest, Blake3_160, Blake3_192, Blake3_256},
rpo::{Rpo256, RpoDigest},
ElementHasher, Hasher,
Expand All @@ -28,6 +28,10 @@ pub mod crypto {
pub mod random {
pub use crate::random::*;
}

pub mod dsa {
pub use miden_crypto::dsa::rpo_falcon512;
}
}

pub use math::{
Expand Down
2 changes: 1 addition & 1 deletion core/src/random.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use super::{crypto::hash::Rpo256, utils::collections::Vec, Felt, FieldElement};
use crypto::{hash::rpo::RpoDigest, Word, ZERO};
use math::StarkField;
use miden_crypto::{hash::rpo::RpoDigest, Word, ZERO};

// RE-EXPORTS
// ================================================================================================
Expand Down
2 changes: 1 addition & 1 deletion core/src/utils/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ pub use winter_utils::{
ByteWriter, Deserializable, DeserializationError, Serializable, SliceReader,
};

pub use crypto::utils::collections;
pub use miden_crypto::utils::collections;

pub mod math {
pub use math::{batch_inversion, log2};
Expand Down
14 changes: 9 additions & 5 deletions stdlib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,21 @@ doctest = false
name = "stdlib"
path = "tests/main.rs"

[features]
default = ["std"]
std = ["test-utils/std"]

[dependencies]
assembly = { package = "miden-assembly", default-features = false, path = "../assembly", version = "0.7" }

[dev-dependencies]
blake3 = "1.3.3"
blake3 = "1.4"
miden-air = { package = "miden-air", path = "../air", version = "0.7", default-features = false }
num-bigint = "0.4.3"
num-bigint = "0.4"
processor = { package = "miden-processor", path = "../processor", version = "0.7", features = ["internals"], default-features = false }
serde_json = "1.0.94"
sha2 = "0.10.6"
sha3 = "0.10.6"
serde_json = "1.0"
sha2 = "0.10"
sha3 = "0.10"
test-utils = { package = "miden-test-utils", path = "../test-utils" }
winter-air = { package = "winter-air", version = "0.6" }
winter-fri = { package = "winter-fri", version = "0.6" }
Expand Down
278 changes: 0 additions & 278 deletions stdlib/asm/crypto/dsa/falcon.masm

This file was deleted.

Loading

0 comments on commit 5c57495

Please sign in to comment.