Skip to content
Merged
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
1 change: 1 addition & 0 deletions elliptic-curve/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
extern crate std;

pub mod error;
pub mod ops;
pub mod secret_key;

// TODO(tarcieri): other curve forms
Expand Down
12 changes: 12 additions & 0 deletions elliptic-curve/src/ops.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
//! Traits for arithmetic operations on elliptic curve field elements

use subtle::CtOption;

/// Perform an inversion on a field element (i.e. base field element or scalar)
pub trait Invert {
/// Field element type
type Output;

/// Invert a field element.
fn invert(&self) -> CtOption<Self::Output>;
}