= b [i];
rez [i] = point.a [0];
temp [i +1] = point.a [1];
}
rez [i] = temp [i];
delete temp;
}
// ---------------------------------------- ------------------------ Pow_N (unsigned a [8], unsigned b [8], unsigned mod [8], unsigned rez [8])
{
unsigned * temp = new unsigned [9];
unsigned * temp1 = new unsigned [16];
int f;
for (int i = 0; i <8; i + +) temp [i] = a [i];
temp [8] = 0;
for (i = 0; i <16; i + +) temp1 [i] = 0;
unsigned p = 8;
do {p -;} while (b [p] == 0);
unsigned g = 16;
do {g -;} while (((b [p]>> g) & 0x1) == 0);
g -;
for (i = g; i> = 0; i -)
{
Mult16 (temp, temp, temp1);
ModN (temp1, mod);
for (f = 8; f> = 0; f -) temp [f] = temp1 [f];
if (((b [p]>> i) & 0x1) == 1)
{
Mult16 (temp, a, temp1);
ModN (temp1, mod);
for (f = 8; f> = 0; f -) temp [f] = temp1 [f];
}
}
for (i = p-1; i> = 0; i -)
{
for (int j = 15; j> = 0; j -)
{
Mult16 (temp, temp, temp1);
ModN (temp1, mod);
for (f = 8; f> = 0; f -) temp [f] = temp1 [f];
if (((b [i]>> j) & 0x1) == 1)
{
Mult16 (a, temp, temp1);
ModN (temp1, mod);
for (f = 8; f> = 0; f -) temp [f] = temp1 [f];
}
}
}
for (i = 7; i> = 0; i -) rez [i] = temp [i];
delete temp;
delete temp1;
}
// ---------------------------------------- ------------------------ Div16 (unsigned a [8], unsigned b [8], unsigned rez [8], unsigned ost [8])
{
int i = 8;
do {i -;} while (a [i] == 0);
int j = 8;
do {j -;} while (b [j] == 0);
unsigned RaznPoz, del;
unsigned ostT [16] = {0,};
for (int g = 0; g <8; g+ +) ostT [g] = a [g];
unsigned * temp1 = new unsigned [17];