// from https://github.com/KZen-networks/curv/pull/61/commits/3bd540e13a1152ccf51b7adf276887860482e44e
pub fn base_point2() -> Self {
let g = Self::generator();
let hash = HSha256::create_hash(&[&g.bytes_compressed_to_big_int()]);
let hash = HSha256::create_hash(&[&hash]);
let hash = HSha256::create_hash(&[&hash]);
let mut possible_pk = vec![2u8];
possible_pk.append(&mut BigInt::to_vec(&hash));
Self {
purpose: "random",
ge: PK::from_slice(possible_pk.as_slice()).unwrap(),
}
}
Is there a better way than generating another fixed (not random) base point by taking original base point's sha256 hash? The hash is not necessarily a valid x coordinate of a point on curve, so we take the hash over and over again until we find such a valid x.
The question is: why we use this method instead of picking a number k and multiply it with original base point to get another base point? Or is that because we want to get a valid base point without revealing the number k?
Is there a better way than generating another fixed (not random) base point by taking original base point's sha256 hash? The hash is not necessarily a valid x coordinate of a point on curve, so we take the hash over and over again until we find such a valid x.
The question is: why we use this method instead of picking a number k and multiply it with original base point to get another base point? Or is that because we want to get a valid base point without revealing the number k?