mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-11 21:49:26 +00:00
Remove verify_rct_* from Mlsag
Both methods were ports from Monero, overtly specific without clear documentation. They need to be added back in, with documentation, or included in a node which provides the necessary further context for them to be naturally understandable.
This commit is contained in:
@@ -32,39 +32,6 @@ impl Mlsag {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn verify_rct_full(
|
|
||||||
&self,
|
|
||||||
msg: &[u8; 32],
|
|
||||||
pubs: &[[EdwardsPoint; 2]],
|
|
||||||
out_pks: &[EdwardsPoint],
|
|
||||||
fee: &EdwardsPoint,
|
|
||||||
key_image: &EdwardsPoint,
|
|
||||||
) -> bool {
|
|
||||||
let sum_out_pk = out_pks.iter().sum::<EdwardsPoint>();
|
|
||||||
|
|
||||||
let mut ring_matrix = Vec::with_capacity(pubs.len());
|
|
||||||
for member in pubs.iter() {
|
|
||||||
ring_matrix.push([member[0], member[1] - sum_out_pk - fee])
|
|
||||||
}
|
|
||||||
|
|
||||||
self.verify(msg, &ring_matrix, key_image)
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn verify_rct_simple(
|
|
||||||
&self,
|
|
||||||
msg: &[u8; 32],
|
|
||||||
pubs: &[[EdwardsPoint; 2]],
|
|
||||||
pseudo_out: &EdwardsPoint,
|
|
||||||
key_image: &EdwardsPoint,
|
|
||||||
) -> bool {
|
|
||||||
let mut ring_matrix = Vec::with_capacity(pubs.len());
|
|
||||||
for member in pubs.iter() {
|
|
||||||
ring_matrix.push([member[0], member[1] - pseudo_out])
|
|
||||||
}
|
|
||||||
|
|
||||||
self.verify(msg, &ring_matrix, key_image)
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(feature = "experimental")]
|
#[cfg(feature = "experimental")]
|
||||||
pub fn verify(
|
pub fn verify(
|
||||||
&self,
|
&self,
|
||||||
|
|||||||
Reference in New Issue
Block a user