How to ensure that a cryptographic implementation is reasonably sound/robust?
One widely accepted standard for information protection is the ISO Common Criteria framework. This set of slides gives some sense of what a Common Criteria evaluation will ask in its analysis.
The US FIPS-140-3 standard also carries a lot of weight, it specifies certain NIST special publications that give criteria beyond ISO.