Skip to content

Commit

Permalink
feat: Falcon verification in MASM
Browse files Browse the repository at this point in the history
  • Loading branch information
Al-Kindi-0 authored and bobbinth committed Oct 5, 2023
1 parent 48b0eb0 commit 2cc5d95
Show file tree
Hide file tree
Showing 18 changed files with 740 additions and 6,176 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
4 changes: 4 additions & 0 deletions stdlib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ 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" }

Expand Down
278 changes: 0 additions & 278 deletions stdlib/asm/crypto/dsa/falcon.masm

This file was deleted.

Loading

0 comments on commit 2cc5d95

Please sign in to comment.