ENHANCED: more extensive type checking in curve25519_scalar_mult/3

This commit is contained in:
Markus Triska
2023-08-20 14:42:34 +02:00
parent 745ddc2c87
commit 013df58fea

View File

@@ -711,6 +711,8 @@ curve25519_scalar_mult(Scalar, Point, Result) :-
must_be_bytes(ScalarBytes, curve25519_scalar_mult/3),
length(ScalarBytes, 32)
),
must_be(chars, Point),
length(Point, 32),
maplist(char_code, Point, PointBytes),
'$curve25519_scalar_mult'(ScalarBytes, PointBytes, Result).