delete old fun for deterministic generation
@@ -91,16 +91,6 @@ def get_valid_pub(pub):
check_ec_point(pub)
return pub
-def determinstic_eph_prv_from_prv(prv):
- # attach a salting value? if yes why?
- eph_prv = int.from_bytes(sha256(prv.to_bytes(32, "big")).digest(), "big")
- outside_unif = eph_prv > ec_order * (2**256 // ec_order)
- eph_prv %= ec_order
- if eph_prv == 0 or outside_unif:
- step = 1 if (prv + 1) % ec_order != 0 else 2
- eph_prv = determinstic_eph_prv_from_prv((prv + step) % ec_order) # is the +1 legit?
- return eph_prv
-
def ec_point_x_to_y(x,y_mod_2):
assert type(x) == int, "x must be an int"
assert 0 < x and x < ec_prime, "ec_point must have integer coordinates in [0, ec_prime)"
