There isn't one: the .NET Framework does not come with OpenSSL.
There is a wrapper for OpenSSL you can use from within .NET: http://openssl-net.sourceforge.net/ however it doesn't have a direct analog for openssl_public_decrypt
as it provides a close wrapper.
.NET comes with the rich System.Cryptography
namespace.
Looking at PHP's openssl source code (here: https://github.com/frice2014/php_source/blob/467ed5d6edff72219afd3e644516f131118ef48e/ext/openssl/php_openssl.c ) we see that openssl_public_decrypt
calls RSA_public_decrypt
, however this is an implementation detail. The documentation for PHP's openssl_public_decrypt
function does not specify what algorithm it uses, so you cannot depend on data being read by other implementations of RSA, such as .NET's.
I'm assuming you're trying to write C# that is interopable with PHP, rather than outright replacing it. In which case I suggest changing your PHP implementation so you know exactly what crypto algorithms are in use (complete with any IV and cipher-block-mode), because without those you cannot get the two to reliably work together.