IronCoreLabs / recrypt-rs

A set of cryptographic primitives for building a multi-hop Proxy Re-encryption scheme, known as Transform Encryption.
https://crates.io/crates/recrypt
GNU Affero General Public License v3.0
144 stars 23 forks source link

Add augmentation for PrivateKey which will work correctly with PublicKey. #94

Closed coltfred closed 4 years ago

coltfred commented 5 years ago

If you take 2 private keys and add them together using +, it will not work with the public keys which are created from the resulting PrivateKey.

This is because the keys are cyclic in Fp, but the curve order is Fr. This means that when we want to augment PrivateKeys for Private Key Rotation, we need to instead rotate them in Fr instead of Fp.