mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 12:19:24 +00:00
Simplify Monero key image handling
This commit is contained in:
@@ -15,7 +15,6 @@ use monero::util::key::H;
|
||||
#[cfg(feature = "multisig")]
|
||||
pub mod frost;
|
||||
|
||||
pub mod key_image;
|
||||
pub mod bulletproofs;
|
||||
pub mod clsag;
|
||||
|
||||
@@ -76,3 +75,7 @@ pub fn hash_to_point(point: &EdwardsPoint) -> EdwardsPoint {
|
||||
unsafe { c_hash_to_point(bytes.as_mut_ptr()); }
|
||||
CompressedEdwardsY::from_slice(&bytes).decompress().unwrap()
|
||||
}
|
||||
|
||||
pub fn generate_key_image(secret: &Scalar) -> EdwardsPoint {
|
||||
secret * hash_to_point(&(secret * &ED25519_BASEPOINT_TABLE))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user