fix edge condition in generating ecc key from seed