ringct: add a version of addKeys which returns the result

This commit is contained in:
moneromooo-monero 2017-11-21 14:13:20 +00:00
parent 7ff07928ad
commit d43eef6def
No known key found for this signature in database
GPG Key ID: 686F07454D6CEFC3
2 changed files with 6 additions and 0 deletions

View File

@ -220,6 +220,11 @@ namespace rct {
ge_p3_tobytes(AB.bytes, &A2); ge_p3_tobytes(AB.bytes, &A2);
} }
rct::key addKeys(const key &A, const key &B) {
key k;
addKeys(k, A, B);
return k;
}
//addKeys1 //addKeys1
//aGB = aG + B where a is a scalar, G is the basepoint, and B is a point //aGB = aG + B where a is a scalar, G is the basepoint, and B is a point

View File

@ -123,6 +123,7 @@ namespace rct {
//for curve points: AB = A + B //for curve points: AB = A + B
void addKeys(key &AB, const key &A, const key &B); void addKeys(key &AB, const key &A, const key &B);
rct::key addKeys(const key &A, const key &B);
//aGB = aG + B where a is a scalar, G is the basepoint, and B is a point //aGB = aG + B where a is a scalar, G is the basepoint, and B is a point
void addKeys1(key &aGB, const key &a, const key & B); void addKeys1(key &aGB, const key &a, const key & B);
//aGbB = aG + bB where a, b are scalars, G is the basepoint and B is a point //aGbB = aG + bB where a, b are scalars, G is the basepoint and B is a point