I'm currently working on an application that requires me to add two ECDSA private keys in order to make a new private key. The result has to have the property, that its corresponding public key is the same as one would sum the public keys corresponding to the first private keys.
I managed to get most of that going, but I have problems when the sum of the private keys gets so big that I need to mod it by the curve's $N$ parameter.
What are the correct steps I should take in order to ensure a proper private key sum is generated?