Poseidon252 icon indicating copy to clipboard operation
Poseidon252 copied to clipboard

Add sponge helper to take ref bytes as argument

Open vlopes11 opened this issue 3 years ago • 0 comments

Describe what you want implemented Need a function that will convert arbitrary slices of bytes into a BlsScalar

Describe "Why" this is needed We are limited by scalars when actually anything could be hashed by poseidon, having the proper implementation available.

Describe alternatives you've considered Duplicating code everywhere with different scalar aggregator strategies that might lead to inconsistencies between libraries.

Additional context We need to perform a hash of the contract id and transaction in the hosted environment of rusk-vm to calculate the transaction hash: https://github.com/dusk-network/rusk/issues/402

vlopes11 avatar Jan 06 '22 14:01 vlopes11