summaryrefslogtreecommitdiffstats
path: root/vendor/elliptic-curve/src/point.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-19 09:25:56 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-19 09:25:56 +0000
commit018c4950b9406055dec02ef0fb52f132e2bb1e2c (patch)
treea835ebdf2088ef88fa681f8fad45f09922c1ae9a /vendor/elliptic-curve/src/point.rs
parentAdding debian version 1.75.0+dfsg1-5. (diff)
downloadrustc-018c4950b9406055dec02ef0fb52f132e2bb1e2c.tar.xz
rustc-018c4950b9406055dec02ef0fb52f132e2bb1e2c.zip
Merging upstream version 1.76.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/elliptic-curve/src/point.rs')
-rw-r--r--vendor/elliptic-curve/src/point.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/vendor/elliptic-curve/src/point.rs b/vendor/elliptic-curve/src/point.rs
index 25b872a0e..ee4eded44 100644
--- a/vendor/elliptic-curve/src/point.rs
+++ b/vendor/elliptic-curve/src/point.rs
@@ -32,6 +32,18 @@ pub trait AffineCoordinates {
fn y_is_odd(&self) -> Choice;
}
+/// Normalize point(s) in projective representation by converting them to their affine ones.
+#[cfg(feature = "arithmetic")]
+pub trait BatchNormalize<Points: ?Sized>: group::Curve {
+ /// The output of the batch normalization; a container of affine points.
+ type Output: AsRef<[Self::AffineRepr]>;
+
+ /// Perform a batched conversion to affine representation on a sequence of projective points
+ /// at an amortized cost that should be practically as efficient as a single conversion.
+ /// Internally, implementors should rely upon `InvertBatch`.
+ fn batch_normalize(points: &Points) -> <Self as BatchNormalize<Points>>::Output;
+}
+
/// Double a point (i.e. add it to itself)
pub trait Double {
/// Double this point.