Question: Hi can you post annotations and comments line by line for this code I have had to make for decrypting? Thank you :) X X
Hi can you post annotations and comments line by line for this code I have had to make for decrypting? Thank you :)
X X *Encrypt.c *Decrypt.c #define NBITS 256 void printBN(char*msg, BIGNUM *a) { char *number_str = BN_bn2hex(a); printf("%s %5 ", msg, number_str); OPENSSL_free(number_str); } int main() { BN_CTX *ctx = BN_CTX_new(); BIGNUM *e = BN_new(); BIGNUM *n = BN_new(); BIGNUM *m BN_new(); BIGNUM *d BN_new(); BIGNUM *C = BN_new(); BN_hex2bn(&n, "DCBFFE3E51F62E09CE7032E2677478946A849DC4CDDE3A4DOCB81629242FB1A5"); BN_hex2bn(&d, "740806F9F3A62BAE331FFE3F0A68AFE35B3D2E4794148AACBC26AA381CD7D300"); BN_hex 2bn(&e, "010001"); BN_hex2bn(&c, "8C0F971DF2F3672B28811407E2DABBE1DAOFEBBBDFC7DCB67396567EA1E2493F"); BN_mod_exp(m,c,d, n,ctx); printBN("m= ",m); BN_CTX_free(ctx); return 0; } C Tab Width: 8 Ln 23, Col 18 INS
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
