8th program RSA
8th program RSA
#include <openssl/rsa.h>
#include <openssl/pem.h>
#include <openssl/err.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
void handle_errors(const char *msg) {
fprintf(stderr, "%s\n", msg);
ERR_print_errors_fp(stderr);
exit(1);
}
RSA* generate_rsa_keypair(int bits) {
RSA *rsa = RSA_new();
BIGNUM *bn = BN_new();
OUTPUT
LIBRARIES: