Mbed TLS is now part of TrustedFirmware.org.

Parse raw RSA key

Nov 13, 2015 14:35
Max Wahler

Hello there,

first at all thank you very much for this great library!

I need a method to parse PKCS#1 encoded private RSA key and found pk_parse_key_pkcs1_der. Unfortunately, it's static so I cannot simply access it. It would be nice if it was non-static, because I assume I'm not the only one who needs this and why reinventing the wheel?

Thank you very much!


Nov 13, 2015 17:36
Manuel Pégourié-Gonnard

Hi! The public function is pk_parse_key(), which will end up calling pk_parse_key_pkcs1_der() internal if the key is indeed a PKCS#1 key that is DER-encoded.