This repo contains the code I wrote on a whim to solve the above deceptively difficult problem. The aim of the exercise was to solve this problem using only library methods that I could execute by hand, which is why I did not use the extensive library for elliptic curves available in Sage.
The code is written in Sage 9.3.