This commit is contained in:
Michael Vines
2021-09-30 12:13:02 -07:00
parent f227504ea7
commit 48047b55ba

View File

@ -68,7 +68,7 @@ mod target_arch {
amount_as_ct[..32].copy_from_slice(RISTRETTO_BASEPOINT_COMPRESSED.as_bytes()); amount_as_ct[..32].copy_from_slice(RISTRETTO_BASEPOINT_COMPRESSED.as_bytes());
add_ciphertexts( add_ciphertexts(
Scalar::one(), Scalar::one(),
ct, &ct,
Scalar::from(amount), Scalar::from(amount),
&pod::ElGamalCiphertext(amount_as_ct), &pod::ElGamalCiphertext(amount_as_ct),
) )
@ -82,7 +82,7 @@ mod target_arch {
amount_as_ct[..32].copy_from_slice(RISTRETTO_BASEPOINT_COMPRESSED.as_bytes()); amount_as_ct[..32].copy_from_slice(RISTRETTO_BASEPOINT_COMPRESSED.as_bytes());
add_ciphertexts( add_ciphertexts(
Scalar::one(), Scalar::one(),
ct, &ct,
-Scalar::from(amount), -Scalar::from(amount),
&pod::ElGamalCiphertext(amount_as_ct), &pod::ElGamalCiphertext(amount_as_ct),
) )