Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,25 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Added

- Safe conversions between the arkworks wrappers and their inner types:
`into_inner()` plus `From` impls in both directions for
`ArkFr`/`ark_bn254::Fr`, `ArkG1`/`G1Projective`, and `ArkG2`/`G2Projective`.

### Changed

- Faster arkworks `DoryRoutines`: when MSM bases are not already normalized
(e.g. folded vectors mid reduce-round), `msm` converts them to affine with a
single batched inversion (`normalize_batch`) instead of one field inversion
per point; already-normalized bases (setup generators) keep the
inversion-free per-element path. `fixed_base_vector_scalar_mul`,
`fixed_scalar_mul_bases_then_add`, `fixed_scalar_mul_vs_then_add`, and
`fold_field_vectors` are parallelized under the `parallel` feature. Group
results are unchanged, so commitments and proofs are byte-identical.

## [0.4.0] - 2026-07-03

### Security
Expand Down
22 changes: 22 additions & 0 deletions src/backends/arkworks/ark_field.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,28 @@ use ark_std::ops::{Add, Mul, Neg, Sub};
#[repr(transparent)]
pub struct ArkFr(pub Fr);

impl ArkFr {
/// Returns the wrapped `ark_bn254::Fr`.
#[inline]
pub fn into_inner(self) -> Fr {
self.0
}
}

impl From<Fr> for ArkFr {
#[inline]
fn from(value: Fr) -> Self {
ArkFr(value)
}
}

impl From<ArkFr> for Fr {
#[inline]
fn from(value: ArkFr) -> Self {
value.0
}
}

impl Field for ArkFr {
fn zero() -> Self {
ArkFr(Fr::from(0u64))
Expand Down
Loading
Loading