Add RSA DER encoding and decoding functions for public keys

Does buf outlive the BIO being freed? (I do not know this API)