Function EncryptWithR lets to specify randomness r explicitly. For
some ZKPs based on the Paillier scheme, it's required to use the same r for encryption and construction of ZKP. It wasn't possible previously,
because r was generated internally and never returned.
I did not want to modify Encrypt to return r because it would break
existing code using this API, as well as, I wanted to make sure person
using the specific r and using it somewhere else really knows what
he's doing.
Function `EncryptWithR` lets to specify randomness `r` explicitly. For
some ZKPs based on the Paillier scheme, it's required to use the same
`r` for encryption and construction of ZKP. It wasn't possible previously,
because `r` was generated internally and never returned.
I did not want to modify `Encrypt` to return `r` because it would break
existing code using this API, as well as, I wanted to make sure person
using the specific `r` and using it somewhere else really knows what
he's doing.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Function
EncryptWithRlets to specify randomnessrexplicitly. Forsome ZKPs based on the Paillier scheme, it's required to use the same
rfor encryption and construction of ZKP. It wasn't possible previously,because
rwas generated internally and never returned.I did not want to modify
Encryptto returnrbecause it would breakexisting code using this API, as well as, I wanted to make sure person
using the specific
rand using it somewhere else really knows whathe's doing.
Sorry, my bad, was to eager with opening the PR. Want to pass it through review and merge internally first.
Pull request closed