diff --git a/src/stark_utils.c b/src/stark_utils.c index 4df86e9d2..55a43f56b 100644 --- a/src/stark_utils.c +++ b/src/stark_utils.c @@ -100,13 +100,12 @@ void shift_stark_hash(FieldElement hash) { uint32_t bits_count = bits256(&hash256); if (bits_count < 248) { return; - } else if (bits_count >= 248 && bits_count % 8 >= 1 && bits_count % 8 <= 4) { + } else if (bits_count % 8 >= 1 && bits_count % 8 <= 4) { shiftl256(&hash256, 4, &final_hash256); write_u64_be(hash, UPPER(UPPER_P((&final_hash256)))); write_u64_be(hash + 8, LOWER(UPPER_P((&final_hash256)))); write_u64_be(hash + 16, UPPER(LOWER_P((&final_hash256)))); write_u64_be(hash + 24, LOWER(LOWER_P((&final_hash256)))); - return; } else { THROW(0x6A80); }