arnaucube
arnaucube/miden-cryptoPublic Self-hosted repository
chore: update crate versions, dependencies, and CHANGELOG
Bobbin Threadbare bobbinth@protonmail.com
Fri, 24 Mar 2023 14:58:19 -0700
commit

a58922756afe2aca9330a56a1f6df77baec07806

parent

bf15e1331ab75322300c9be9ac7e9fb9d1b203af

6 files changed, 17 insertions(+), 9 deletions(-)

jump to
M CHANGELOG.md → CHANGELOG.md

@@ -1,3 +1,10 @@

+## 0.2.0 (2023-03-24) + +- Implemented `MerkleStore` (#93, #94, #95, #107 #112). +- Added benchmarks for `MerkleStore` vs. other structs (#97). +- Added Merkle path containers (#99). +- Fixed depth handling in `MerklePathSet` (#110). + ## 0.1.4 (2023-02-22) - Re-export winter-crypto Hasher, Digest & ElementHasher (#72)
M Cargo.toml → Cargo.toml

@@ -1,12 +1,12 @@

[package] name = "miden-crypto" -version = "0.1.4" +version = "0.2.0" description = "Miden Cryptographic primitives" authors = ["miden contributors"] readme = "README.md" license = "MIT" repository = "https://github.com/0xPolygonMiden/crypto" -documentation = "https://docs.rs/miden-crypto/0.1.4" +documentation = "https://docs.rs/miden-crypto/0.2.0" categories = ["cryptography", "no-std"] keywords = ["miden", "crypto", "hash", "merkle"] edition = "2021"

@@ -30,11 +30,11 @@ std = ["blake3/std", "winter_crypto/std", "winter_math/std", "winter_utils/std"]

[dependencies] blake3 = { version = "1.3", default-features = false } -winter_crypto = { version = "0.5", package = "winter-crypto", default-features = false } -winter_math = { version = "0.5", package = "winter-math", default-features = false } -winter_utils = { version = "0.5", package = "winter-utils", default-features = false } +winter_crypto = { version = "0.6", package = "winter-crypto", default-features = false } +winter_math = { version = "0.6", package = "winter-math", default-features = false } +winter_utils = { version = "0.6", package = "winter-utils", default-features = false } [dev-dependencies] criterion = { version = "0.4", features = ["html_reports"] } proptest = "1.1.0" -rand_utils = { version = "0.5", package = "winter-rand-utils" } +rand_utils = { version = "0.6", package = "winter-rand-utils" }
M LICENSE → LICENSE

@@ -1,6 +1,6 @@

MIT License -Copyright (c) 2022 Polygon Miden +Copyright (c) 2023 Polygon Miden Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal
M README.md → README.md

@@ -15,6 +15,7 @@

* `MerkleTree`: a regular fully-balanced binary Merkle tree. The depth of this tree can be at most 64. * `SimpleSmt`: a Sparse Merkle Tree, mapping 63-bit keys to 4-element leaf values. * `MerklePathSet`: a collection of Merkle authentication paths all resolving to the same root. The length of the paths can be at most 64. +* `MerkleStore`: a collection of Merkle trees of different heights designed to efficiently store trees with common subtrees. The module also contains additional supporting components such as `NodeIndex`, `MerklePath`, and `MerkleError` to assist with tree indexation, opening proofs, and reporting inconsistent arguments/state.
M src/hash/blake/mod.rs → src/hash/blake/mod.rs

@@ -290,7 +290,7 @@ // this is a compile-time branch so it is for free

let digest = if Felt::IS_CANONICAL { blake3::hash(E::elements_as_bytes(elements)) } else { - let base_elements = E::as_base_elements(elements); + let base_elements = E::slice_as_base_elements(elements); let blen = base_elements.len() << 3; let mut bytes = unsafe { uninit_vector(blen) };
M src/hash/rpo/mod.rs → src/hash/rpo/mod.rs

@@ -212,7 +212,7 @@ type BaseField = Felt;

fn hash_elements<E: FieldElement<BaseField = Self::BaseField>>(elements: &[E]) -> Self::Digest { // convert the elements into a list of base field elements - let elements = E::as_base_elements(elements); + let elements = E::slice_as_base_elements(elements); // initialize state to all zeros, except for the first element of the capacity part, which // is set to 1 if the number of elements is not a multiple of RATE_WIDTH.