offset
offset copied to clipboard
Changing algorithm used for hash locks
Hash locks are being used in the protocol to allow atomicity of payments. Currently hash locks are implemented using SHA512/256.
It might be safer to use a different algorithm, for example bcrypt (As suggested in issue https://github.com/freedomlayer/offst/issues/196). On the other hand, it might degrade performance. I'm not yet sure what is the correct thing to do here.
The implementation can be found in components/crypto/src/hash_lock.rs
Note that changing the implementation might require changing the internal structure of HashedLock (For example, if we want to add hash salt).