modified: .gitignore

modified:   keygen.zip
	modified:   mikro.py
This commit is contained in:
zyb 2024-06-19 18:04:54 +08:00
parent 18a7f96ff5
commit 6d2fdf28d7
3 changed files with 6 additions and 2 deletions

6
.gitignore vendored
View File

@ -1,2 +1,6 @@
__pycache__/ __pycache__/
test_*.py venv/
test_*.py
keygen.py
keygen.bat
mikrotik.ico

Binary file not shown.

View File

@ -194,7 +194,7 @@ def mikro_kcdsa_verify(data:bytes, signature:bytes, public_key:bytes)->bool:
YY = ((x**3) + (curve.a * x**2) + x).sqrt() YY = ((x**3) + (curve.a * x**2) + x).sqrt()
public_keys = [] public_keys = []
for y in YY: for y in YY:
public_keys += [AffineCurvePoint(x, int(y), curve)] public_keys += [AffineCurvePoint(int(x), int(y), curve)]
data_hash = bytearray(mikro_sha256(data)) data_hash = bytearray(mikro_sha256(data))
nonce_hash = signature[:16] nonce_hash = signature[:16]