Just use subtle.ConstantTimeCompare() when validating the root.