Update enacl and unfix the tests
This commit is contained in:
parent
3cee7296b2
commit
c618c16c29
@ -87,7 +87,7 @@ prop_scalar_mul() ->
|
|||||||
?FORALL({S, P0}, {gen_scalar(), gen_point()},
|
?FORALL({S, P0}, {gen_scalar(), gen_point()},
|
||||||
begin
|
begin
|
||||||
E = enacl:crypto_ed25519_scalarmult(S, P0),
|
E = enacl:crypto_ed25519_scalarmult(S, P0),
|
||||||
P = ecu_ed25519:scalar_mul(S, even(P0)),
|
P = ecu_ed25519:scalar_mul(S, P0),
|
||||||
equals(E, ecu_ed25519:compress(P))
|
equals(E, ecu_ed25519:compress(P))
|
||||||
end).
|
end).
|
||||||
|
|
||||||
@ -95,7 +95,7 @@ prop_scalar_mul_noclamp() ->
|
|||||||
?FORALL({S, P0}, {gen_scalar(), gen_point()},
|
?FORALL({S, P0}, {gen_scalar(), gen_point()},
|
||||||
begin
|
begin
|
||||||
E = enacl:crypto_ed25519_scalarmult_noclamp(S, P0),
|
E = enacl:crypto_ed25519_scalarmult_noclamp(S, P0),
|
||||||
P = ecu_ed25519:scalar_mul_noclamp(S, ecu_ed25519:decompress(even(P0))),
|
P = ecu_ed25519:scalar_mul_noclamp(S, ecu_ed25519:decompress(P0)),
|
||||||
equals(E, ecu_ed25519:compress(P))
|
equals(E, ecu_ed25519:compress(P))
|
||||||
end).
|
end).
|
||||||
|
|
||||||
@ -123,8 +123,6 @@ prop_dbl() ->
|
|||||||
ecu_ed25519:pt_eq(A, B))
|
ecu_ed25519:pt_eq(A, B))
|
||||||
end).
|
end).
|
||||||
|
|
||||||
even(<<B:31/bytes, _:1, B2:7>>) -> <<B/bytes, 0:1, B2:7>>.
|
|
||||||
|
|
||||||
equal_pts(P1, P2) ->
|
equal_pts(P1, P2) ->
|
||||||
?WHENFAIL(eqc:format("~p\n /=\n~p\n", [ecu_ed25519:to_affine(P1), ecu_ed25519:to_affine(P2)]),
|
?WHENFAIL(eqc:format("~p\n /=\n~p\n", [ecu_ed25519:to_affine(P1), ecu_ed25519:to_affine(P2)]),
|
||||||
ecu_ed25519:pt_eq(P1, P2)).
|
ecu_ed25519:pt_eq(P1, P2)).
|
||||||
|
@ -9,5 +9,5 @@
|
|||||||
|
|
||||||
{profiles, [{test, [{deps, [{enacl, {git, "https://github.com/aeternity/enacl.git", {ref, "01dd0c2"}}},
|
{profiles, [{test, [{deps, [{enacl, {git, "https://github.com/aeternity/enacl.git", {ref, "01dd0c2"}}},
|
||||||
{ecrecover, {git, "https://github.com/aeternity/ecrecover.git", {ref, "74b7816"}}}]}]},
|
{ecrecover, {git, "https://github.com/aeternity/ecrecover.git", {ref, "74b7816"}}}]}]},
|
||||||
{eqc, [{deps, [{enacl, {git, "https://github.com/aeternity/enacl.git", {ref, "01dd0c2"}}}]}]}
|
{eqc, [{deps, [{enacl, {git, "https://github.com/aeternity/enacl.git", {ref, "38ffc76"}}}]}]}
|
||||||
]}.
|
]}.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user