justify"> {
cout << KeyFile not open. ;
return 1;
}
if ((stat = fopen ( stat.txt , wt )) == NULL)
{
cout << stat.txt not open. ;
return 1;
}
if ((X_file = fopen (argv [3], rb )) == NULL)
{
cout < not open. ;
return 1;
}
if ((Y_file = fopen (argv [4], rb )) == NULL)
{
cout < not open. ;
return 1;
}
if ((T_file = fopen (argv [5], rb )) == NULL)
{
cout < not open. ;
return 1;
}
unsigned key1 [8] = {0,};
unsigned key2 [8] = {0,};
unsigned X [17] = {0,};
unsigned Y [17] = {0,};
// ======================================== =============
unsigned R1 [N] = {0,};
unsigned R2 [N] = {0,};
unsigned T [N] [N] = {0,};
GenerateR (R1, Num1);
GenerateR (R2, Num2);
for (В© = 0; В© <8; В© + +)
{
fread (T, sizeof (unsigned), N * N, T_file);
key1 [В©] = FormDubleKey (T, R1, R2);
}
fclose (T_file);
fwrite (& key1, sizeof (unsigned), 8, osnkey);
fclose (osnkey);
// ======================================== =============
// X - secret key
// Y - public key
unsigned P [17] = {0xbcd3, 0xfa20, 0xc188, 0x51ea, 0x89ae, 0xc0f2, 0xf780, 0xce2a};
// unsigned a [8] = {0x89e, 0xc55, 0x8fb, 0x5b42, 0,0,0,0};
fread (X, sizeof (unsigned), 8, X_file);
fclose (X_file);