Remove Monero torsion-free requirement and make output keys 32 bytes

Maintains the torsion-free requirement in the one place it's used (key 
images).

In the modern day, the output keys are checked to be points, yet in 
older protocol versions they were allowed to be arbitrary bytes.

Closes https://github.com/serai-dex/serai/issues/23 and 
https://github.com/serai-dex/serai/issues/25.
This commit is contained in:
Luke Parker
2022-08-30 01:02:55 -04:00
parent ee6316b26b
commit d620231530
5 changed files with 28 additions and 20 deletions

View File

@@ -199,7 +199,7 @@ impl Coin for Monero {
Ok((
tx.hash().to_vec(),
tx.prefix.outputs.iter().map(|output| output.key.compress().to_bytes()).collect(),
tx.prefix.outputs.iter().map(|output| output.key.to_bytes()).collect(),
))
}