openssl and base64 should be part of ruby core, so I doubt it will ever fail? 

From what I've read its pretty normal to have requires at the top, I've only put requires in methods where they are dynamic and the class isn't known in advance. I'd be interested as to your thoughts as to why it's better, always keen to learn from others