CRYPTO NEWS

Bitcoin in Zimbabwe: Importing cars and sending money to family

A young Zimbabwean Bitcoiner built out a business with Bitcoin — importing cars and sending remittance payments — when he returned to his homeland during the COVID-19 pandemic.

Is 32 bytes enough for a hash and would anything else be ‘overengineering’?

For data integrity, specifically for small blocks of data, rather than using a SHA-256 hash, or simply truncating a SHA-512 hash, I am playing with the following idea: function saferHash(data) { let hash1Entropy = 42; // sha512:42 let hash2Entropy = 4; // 4B extra possible protected outcomes in case of highly unlikely collision in hash::Listen

For data integrity, specifically for small blocks of data, rather than using a SHA-256 hash, or simply truncating a SHA-512 hash, I am playing with the following idea:

function saferHash(data) {
    let hash1Entropy = 42;  // sha512:42
    let hash2Entropy = 4; // 4B extra possible protected outcomes in case of highly unlikely collision in hash 1
    const hash1  = sha512(data).slice(0,hash1Entropy); // for 42 byte entropy, truncated to save space + prevent length extension vulnerabilities 
    const hash2 = blake3(data).slice(0,hash2Entropy); // cheapest extra forgery prevention in case of sha512:42 hash collision, truncated to save space + prevent length extension vulnerabilities 
    return new Uint8Array([...hash1,...hash2]); // 46 byte total hash  
}

Is this totally overengineering the whole thing or is it actually not too bad of an idea to increase the entropy to +32 bytes and use an additional cheap hash function (blake3) to increase the difficulty of creating a collision even more?

Bitcoin in Zimbabwe: Importing cars and sending money to family

Shopping cart
There are no products in the cart!
Continue shopping
0