Skip to content
Snippets Groups Projects
Commit 1cd54fe9 authored by vincent's avatar vincent
Browse files

Remove the constraint on the hash values.

	It is possible to reverse them thanks to mempool sniffing
parent e002363e
No related branches found
No related tags found
No related merge requests found
......@@ -178,10 +178,6 @@ class BTCVector:
if isinstance(other, int):
other = BTCVector(IntVal(other), self._min_bytes_needed(other))
# We can't find values such the hash is equal to some values
if self.is_result_of_hash() or other.is_result_of_hash():
return BTCVector(self.BTC_FALSE, IntVal(0))
return BTCVector(
If(
And(self.val == other.val, self.size == other.size),
......
......@@ -220,4 +220,9 @@ TESTING_SCENARII = [
Satifiability.SATISFIABLE,
"210317797cd3d79845d38b99e7c9d0e2a1d79eadeb6d0842c4e0ee96cc26649c1dbfac7c82926321023a92182ba3b37e356e7bd2618b77d7d3b57788f3be26efdff0dbe95007de315bad0164b16892935187",
),
TestScenario(
"",
Satifiability.UNSATISFIABLE,
"827d01200123a569a820197bf68fb520e8d3419dc1d4ac1eb89e7dfd7cfe561c19abf7611d7626d9f02c887c827d01200123a569a820f531f3041d3136701ea09067c53e7159c8f9b2746a56c3d82966c54bbc553226887b827d01200123a569a820527ccdd755dcccf03192383624e0a7d0263815ce2ecf1f69cb0423ab7e6f0f3e8893930160947652a0635394687652a0635394684104d4bf4642f56fc7af0d2382e2cac34fa16ed3321633f91d06128f0e5c0d17479778cc1f2cc7e4a0c6f1e72d905532e8e127a031bb9794b3ef9b68b657f51cc6914104208a50909284aede02ad107bb1f52175b025cdf0453537b686433bcade6d3e210b6c82bcbdf8676b2161687e232f5d9afdaa4ed7b3e3bf9608d41b40ebde6ed44104c9ce67ff2df2cd6be5f58345b4e311c5f10aab49d3cf3f73e8dcac1f9cd0de966e924be091e7bc854aef0d0baafa80fe5f2d6af56b1788e1e8ec8d241b41c40d537a7a537a7cad",
),
]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment