Skip to content

Commit

Permalink
Improve safety docs for NoInvalidPoints trait
Browse files Browse the repository at this point in the history
Signed-off-by: maurges <[email protected]>
  • Loading branch information
maurges committed Jan 13, 2025
1 parent c3d187e commit fafa3ed
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions generic-ec-core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,8 @@ pub trait Reduce<const N: usize> {
/// Marker trait for curves whose underlying implementation doesn't allow
/// representing invalid points.
/// # Safety
/// Safe to implement when the checks in `generic_ec::TryFromRaw` would always
/// return 1 for any point. Those checks are:
/// - `point.is_on_curve()`
/// - `point.is_torsion_free()`
/// Safe to implement when the checks for invalid points always return `true`.
/// Those checks are:
/// - [`OnCurve::is_on_curve`]
/// - [`SmallFactor::is_torsion_free`]
pub unsafe trait NoInvalidPoints {}

0 comments on commit fafa3ed

Please sign in to comment.