mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-11 13:39:25 +00:00
Implement a CLSAG algorithm extension which also does key images
Practically, this should be mergeable. There's little reason to do a CLSAG and not also a key image. Keeps them isolated for now.
This commit is contained in:
@@ -32,16 +32,15 @@ pub fn verify_share(
|
||||
share: &[u8]
|
||||
) -> Result<(EdwardsPoint, Vec<u8>), MultisigError> {
|
||||
if share.len() < 96 {
|
||||
Err(MultisigError::InvalidDLEqProof(l))?;
|
||||
Err(MultisigError::InvalidDLEqProof)?;
|
||||
}
|
||||
let image = CompressedEdwardsY(
|
||||
share[0 .. 32].try_into().unwrap()
|
||||
).decompress().ok_or(MultisigError::InvalidKeyImage(l))?;
|
||||
let proof = DLEqProof::deserialize(
|
||||
&share[(share.len() - 64) .. share.len()]
|
||||
).ok_or(MultisigError::InvalidDLEqProof(l))?;
|
||||
).ok_or(MultisigError::InvalidDLEqProof)?;
|
||||
proof.verify(
|
||||
l,
|
||||
&hash_to_point(&view.group_key().0),
|
||||
&view.verification_share(l),
|
||||
&image
|
||||
|
||||
Reference in New Issue
Block a user