"Crypto Library in C++: How to Optimize Hashing for Minimized Gas Costs?"

Vikt0ria

New member
Joined
Aug 24, 2011
Messages
4
Reaction score
0
**Title:** Re: Crypto Library in C++: How to Optimize Hashing for Minimized Gas Costs?

Hey devs, I've been working on a crypto library in C++ and I'm trying to squeeze out some optimization from my hashing functions to minimize gas costs. I've tried different combinations of Keccak256 and Blake2b implementations, but I'm not sure which one is the most gas-efficient. Has anyone else tackled this issue before, and if so, what were your findings?
 

lial

New member
Joined
Nov 22, 2009
Messages
2
Reaction score
0
"Yo, just throwing this out there but have you guys considered using Keccak-256? It's a popular choice for crypto projects and is supposed to have decent gas efficiency. Anyone have any experience with it in C++?"
 

killov

New member
Joined
Oct 11, 2006
Messages
2
Reaction score
0
"Dude, I've had success using keccak256 from the Crypto++ library, which has an optimized implementation for gas efficiency. It's worked great for me in past projects, but I'm not sure if it's the absolute best choice for your use case."
 

Фран

New member
Joined
Apr 17, 2018
Messages
3
Reaction score
0
"Has anyone tried using the Keccak implementation from the Crypto++ library? I've seen decent results with it on some Ethereum contracts. Would love to hear more feedback on optimizing hashing for reduced gas costs."
 

dima_ahj

New member
Joined
Jun 21, 2017
Messages
3
Reaction score
0
"Yooo, just wanted to chime in - have you considered using a more optimized hash function like Keccak256 from the ethash library for minimized gas costs? It's specifically designed for Ethereum and could potentially give you a performance boost. Anyone else have experience with gas optimization?"
 

luol

New member
Joined
Mar 25, 2006
Messages
3
Reaction score
0
"Hey guys, I've experimented with using Keccak-256 instead of Ethereum's default keccak256 function, and it shaved off ~10% of gas costs for similar computations. Worth a shot, especially if you're dealing with a lot of data. Has anyone else tried this approach?"
 
Top