mirror of
https://github.com/cathugger/mkp224o.git
synced 2025-04-20 22:09:10 +00:00
fix checkpoint loading (use carry for add)
This commit is contained in:
parent
c9039f3fa1
commit
f397497e07
2 changed files with 7 additions and 2 deletions
7
main.c
7
main.c
|
@ -612,8 +612,11 @@ int main(int argc,char **argv)
|
||||||
fclose(checkout);
|
fclose(checkout);
|
||||||
|
|
||||||
// Apply checkpoint to determseed
|
// Apply checkpoint to determseed
|
||||||
for (int i = 0; i < SEED_LEN; i++)
|
bool carry = 0;
|
||||||
determseed[i] += checkpoint[i];
|
for (int i = 0; i < SEED_LEN; i++) {
|
||||||
|
determseed[i] += checkpoint[i] + carry;
|
||||||
|
carry = determseed[i] < checkpoint[i];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
2
worker.c
2
worker.c
|
@ -150,6 +150,7 @@ union pubonionunion {
|
||||||
} i;
|
} i;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
/*
|
||||||
// little endian inc
|
// little endian inc
|
||||||
static void addsk32(u8 *sk)
|
static void addsk32(u8 *sk)
|
||||||
{
|
{
|
||||||
|
@ -160,6 +161,7 @@ static void addsk32(u8 *sk)
|
||||||
if (!c) break;
|
if (!c) break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
// 0123 4567 xxxx --3--> 3456 7xxx
|
// 0123 4567 xxxx --3--> 3456 7xxx
|
||||||
// 0123 4567 xxxx --1--> 1234 567x
|
// 0123 4567 xxxx --1--> 1234 567x
|
||||||
|
|
Loading…
Add table
Reference in a new issue