You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@rdubois-crypto Hello, there has not been any change regarding BN functions with the new OS. Maybe performance decrease might be due to the fact that Tx v3 are now more heavily used (poseidon) whereas it was Tx v1 (pedersen) before ? Poseidon is much longer to compute on device than Pedersen...
@yogh333 , it would be interesting to bench if replacing the bn_mod_pow by two multiplications to compute the x^3 mod p provides better performances. modpow is potentially using the whole maximal length of modulus to provide side channel countermeasure. As this part is not open, it is only an assumption tho.
protecting modpow when signing against SCA makes sense, it does not for hashing.
Since last update, tx hashing on ledger is really slow for a good UX.
Wonder If side channel countermeasures are activated to protect a public hash when using the modpow here:
app-starknet/starknet/src/crypto/poseidon.rs
Line 340 in 9a26ac4
because it shall be the same function protecting RSA.
If so use a plain modpow, might ease things. Furthermore, poseidon only requires x^3 (two mulmod).
Allocations seem also to be repeated at each round and could be done once.
The text was updated successfully, but these errors were encountered: