bitvm – Why does BitHash alternate between sha256 and ripmed160?

The hash function starts with a static value.
When called OP SHA256 For every bit, the final version is the same regardless of the input bits.
If nothing is done with bit 0, the sequence is 101 The result will be like this: 11 and 10001This is bad for hash functions.
In case of alternating OP_HASH256 (double) and OP_SHA256 It is equally vulnerable after a (single) sequence. 00 It gives the following results: 1.
Unfortunately it takes a 32 byte value (result of previous hash) and different Stores a 32-byte value on the stack. For example we cannot do OP_IF 1 OP_ADD OP ENDIF This is because script numbers are limited to 4 bytes.
This leaves OP_RIPMED160 as the least bad alternative. It modifies the input in a different way than SHA256, but loses 12 bytes.

