mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 12:19:24 +00:00
Implement hash_to_point in Rust
Closes https://github.com/serai-dex/serai/issues/32.
This commit is contained in:
@@ -1,13 +1,20 @@
|
||||
use curve25519_dalek::edwards::EdwardsPoint;
|
||||
use curve25519_dalek::{constants::ED25519_BASEPOINT_TABLE, scalar::Scalar, edwards::EdwardsPoint};
|
||||
|
||||
pub(crate) mod hash_to_point;
|
||||
pub use hash_to_point::hash_to_point;
|
||||
|
||||
pub mod bulletproofs;
|
||||
pub mod clsag;
|
||||
pub mod bulletproofs;
|
||||
|
||||
use crate::{
|
||||
serialize::*,
|
||||
ringct::{clsag::Clsag, bulletproofs::Bulletproofs}
|
||||
};
|
||||
|
||||
pub fn generate_key_image(secret: Scalar) -> EdwardsPoint {
|
||||
secret * hash_to_point(&secret * &ED25519_BASEPOINT_TABLE)
|
||||
}
|
||||
|
||||
#[derive(Clone, PartialEq, Debug)]
|
||||
pub struct RctBase {
|
||||
pub fee: u64,
|
||||
|
||||
Reference in New Issue
Block a user