Add some timing instrumentation to the templates
Update phpseclib to a more recent version