Skip to content

Commit

Permalink
Merge pull request #53 from zkcrypto/base-type
Browse files Browse the repository at this point in the history
Add `jubjub::Base` type alias
  • Loading branch information
str4d committed Aug 11, 2021
2 parents 53c4895 + 1feb5f4 commit ab1f764
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions RELEASES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Unreleased
## Added
- `jubjub::Base`, as an alias for `jubjub::Fq`.
- `jubjub::AffinePoint::batch_from_bytes`, which enables the inversion inside
`jubjub::AffinePoint::from_bytes` to be batched.

Expand Down
7 changes: 6 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,12 @@ mod fr;
pub use bls12_381::Scalar as Fq;
pub use fr::Fr;

/// A better name than Fr.
/// Represents an element of the base field $\mathbb{F}_q$ of the Jubjub elliptic curve
/// construction.
pub type Base = Fq;

/// Represents an element of the scalar field $\mathbb{F}_r$ of the Jubjub elliptic curve
/// construction.
pub type Scalar = Fr;

const FR_MODULUS_BYTES: [u8; 32] = [
Expand Down

0 comments on commit ab1f764

Please sign in to comment.