parse_rsa_public_key(pem) reads one PEM-encoded RSA public key and returnsits modulus and public exponent, in that order. It accepts PKCS#1(RSA PUBLIC KEY) and SubjectPublicKeyInfo (PUBLIC KEY) with thersaEncryption algorithm identifier and NULL parameters. PEM lines can end with LF, CRLF, or CR.
The parser checks the key encoding. The caller owns RSA key policy, includingminimum modulus size and permitted exponents. Proton's updater applies thispolicy through moonbit-community/proton_rsa.