let me introduce my problem, i have some *.crt file, which contains DER encoded x509 version 3 certificate. Using ASN1 DER(libtomcrypt) i decrypt data and save it to some structure called x509v3
.
I have some message M, encrypted signature of M -> S(RSA encrypted), and public key -> P which is located inside x509 certificate(subject public key field). First i must decrypt S using public key P, but problem is that i can't find any api which will do this?
I looked for libtomcrypt but seems there is no api which takes public key( which is unsigned char * ) and encrypted data (also unsigned char *) and gives the decrypted data( unsigned char *).
Thanks for help! p.s. sorry for my english;)