Hi all, as I need to generate RSA key by modulus and exponent. I have used the OPENSSL before, is it any other choice to do these operation? (NOT OPENSSL)
Type: Posts; User: homoon
Hi all, as I need to generate RSA key by modulus and exponent. I have used the OPENSSL before, is it any other choice to do these operation? (NOT OPENSSL)
I have tried to call a static library, and it has a function like this:
exp=010001
why the result is even number? It go into the "IF" condition
int checking(char* exp)
{
int x;
...
How can I do this kind of operation, I want to assign value to the charater pointer
Error occur in free(out);
Yes, SIGABRT is occur...
Hi All, I want to ask about how to assign charater to charater pointer in specify location, is it any problem when I do like this?
char* out = NULL;
out= malloc(11);
for(int i=0; i<5;...
Thanks qny and Salam, the problem have been solved.
I want to ask Salam one more question:
Why the variable c, I don't need to use malloc to allocate the memory?
thanks qny, I have modified the code like this, and the memory leak still occur.
char* a=NULL;
char* b=NULL;
char* c=NULL;
a=malloc(2);
b=malloc(2);
I have created a concate function for pointer:
char* sc(char* left, char* right)
{
int totallen=strlen(left)+strlen(right);
char* output= malloc(totallen+1);
strcpy(output,...
Hi All, I want to change HEX String to Byte Array, but I can't get the expected result.
//Hex String
char* HEXStr="A4505D0B0F6AEDAA";
unsigned char* tmpByte=malloc(9);
for(int i=0; i<16;...
thx all, you all solved my problem, many thanks!!!
Hi All, when I use "free" pointer in C, I got Sigabrt.
char* output=malloc(8*sizeof(char));
output="abcdefg";
printf("%s", output);
free(output); //<----SIGABRT error
Hi All, I want to get the length of char array, but the char array may contain NULL Terminator 0x00, many thanks!!
For Example:
char t1[5];
t1[0]=0x45;
t1[1]=0x46;
t1[2]='\0';
t1[3]=0x47;
Hi all, when I use the function to concat the pointer, the warning message is come out (Incompatible integer to pointer conversion assigning to 'char *' to 'int'), how can I fix this, many thanks!!
...
I just want do "get" "set" like C#, what can I do...
Hi all,
As I want to store data where running a function, then I need to use the data again.
for e.g, when runfunction run only once, it work fine, when it run more than one, the printf will...
Oh, I have passed the char arrary to the RSA function, and the return is that:
out[0]= 41
out[1]= 79
....
that's mean each of the char array store the oct number; therefore, when I...
Hi All,
I have used openssl rsa encrypt function, and the result is in
'unsigned char'. I have tried to display it and check the values, and it also get the expected result.
for(int i=0;...
Hi All, how to get/set char array in C, many thanks!!
Oh,...yes, there is some mistake, and I have modifed it...
I want to ask a question, the plain text pass in to the
DES_ecb3_encrypt function, is it a "hex string"? or I need to change it to ascii...
Here is the key valuekey1, key3= 1313232323231313key2 = 6789678967896789===============================
des_cblock key1,key3,seed = {0x13,0x13,0x23,0x23,0x23,0x23,0x13,0x13}; des_cblock key2 = ...
please help
Hi, whole code as below, _k1,_k2, _k3 change to key1, key2, key3
please give me some hints, many thanks!!
unsigned char out[8];
const char *temp="0592789FFFEDCBA9";
des_cblock...
Hi All,
I am using the OPENSSL to encrypt the plain text, but the output is wrong, can anyone give me hints or solution, many thanks!!
unsigned char out[8];
char...
I have used the stupid method....solved the problem
LOGIC TABLE (HEX)