1 - Where exactly the base-point G is defined? for example the function ge_scalarmult_base should multiply by G, but in the implementation I don't see any reference, where G is initlized.

2- Where can I find helpers functions that give the following abilities:

  1. Convert an Int to scalar (ge/fe).
  2. Multiplication of two points over the curve.
  3. Print ECC point from the type RCT::key.
  4. Print scalar from the type RCT::key.

Thanks a lot!

  1. https://github.com/monero-project/monero/blob/master/src/crypto/crypto-ops-data.c

  2. There are 2 places these ops are found, firstly https://github.com/monero-project/monero/blob/master/src/crypto/crypto-ops.c which has the lower level c code and https://github.com/monero-project/monero/tree/master/src/ringct which has some c++ wrappers.

| improve this answer | |
  • could you be more specific (function names/inputs/outputs)? the second reference you mentioned lack documentation and I don't seem to be able to understand them properly. – Shak Aug 8 '18 at 7:44
  • 1
    Converting an into to a scalar is just copying the bytes to a char array (as that is the data type for a scalar, an array of bytes). Multiplication of 2 points is an odd request as you would normally multiply a point by a scalar. Printing an rct::key is just printing the key.bytes field (which you'd likely want to print as hex using printf). – jtgrassie Aug 8 '18 at 10:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.