Closed dr-orlovsky closed 5 years ago
For this purpose we could use the operation defined in bip-taproot.
hashtag(m) is a shorthand for SHA256(SHA256(tag) || SHA256(tag) || m), where tag is a UTF-8 encoded tag name.
This would reduce the incompatibilities among technologies and it would simplify future integrations or libraries design
I've updated both P2C scheme to be 100%-compatible with the best practice from the Taproot proposal – and also OP_RETURN with the same tag, preventing the similar issue.
However, I am not sure about using single or double-SHA256 hash in P2C scheme: in Taproot we have a single hash, while the original RGB spec was mentioning double. Since I do not see any advantage of using double hash here, I have stuck with Taproot-compatible single hash.
Adding "RGB" string to the public/private key tweaking procedure in pay-to-contract commitment scheme in order to prevent attacks around re-interpreting RGB contracts as some non-RGB contracts.
Implements issue #61