Fix garbage keys being generated, abstract elliptic curves out

This commit is contained in:
Andrew
2023-06-01 22:19:35 +03:00
parent 96639bbaf7
commit cc009d0ad4
4 changed files with 146 additions and 54 deletions

2
xp.cpp
View File

@@ -230,6 +230,8 @@ void generateXPKey(char *pKey, EC_GROUP *eCurve, EC_POINT *generator, BIGNUM *or
// Pack product key.
packXP(bKey, pRaw, &hash, sig);
printf("PID: %.8lX\nHash: %.8lX\nSig: %.8lX %.8lX\n", pRaw[0], hash, sig[1], sig[0]);
} while (bKey[3] >= 0x40000);
// ↑ ↑ ↑
// bKey[3] can't be longer than 18 bits, else the signature part will make