Lookup "elastic curve matching". You task will be complicated by the fact that the curves are self-crossing and it can be difficult to follow them in the right path. Also the curve geometry and topology can wildly vary from one sample to another.
My guess is that you will spend a hard time before you can come up with a reliable solution, especially if you have to detect counterfeit signatures.