Securlydev


Kanal geosi va tili: ko‘rsatilmagan, ko‘rsatilmagan
Toifa: ko‘rsatilmagan


#sec #evm #solidity #zkp
https://twitter.com/securlydev

Связанные каналы  |  Похожие каналы

Kanal geosi va tili
ko‘rsatilmagan, ko‘rsatilmagan
Toifa
ko‘rsatilmagan
Statistika
Postlar filtri










New year start with new loss. Orbit Bridge ~81.5 m $
Happy new year


what is domain separator?
                                                                   The domain separator helps prevent signature reuse attacks in DeFi protocols by making signatures unique to a particular contract and message type. Here are some more details:                                                          

Without a domain separator, a signature could potentially be reused for different messages or contracts. This enables various attacks.

For example, a signature approving a small transfer amount could be reused to approve a large transfer on another contract.Or a signature meant for a benign callback could be reused to trigger funds transfers.

The domain separator binds a signature to a specific contract address and message type.

It is computed from the contract address, a salt value, and the message EIP-712 typehash.When generating a signature, the signer computes and includes the domain separator.When verifying a signature, the contract recomputes the expected domain separator.If the domain separators don't match, the signature is invalid for that context.

This prevents simply replaying a signature on another contract/message type.

Even a tiny change to the contract address, salt, or message typehash invalidates old signatures.

So attackers cannot trivially transfer or forge signatures between contexts.
                                                                                                                               
some potential pitfalls: 
            
Forgetting to specify the domain separator when verifying signatures. This would allow cross-contract/message replay attacks.

Using a constant/hardcoded domain separator value rather than computing it dynamically. This defeats the purpose of making it context-specific.

Not updating the salt value periodically. Over time, old signatures could potentially be replayed on contracts with the same address.

Computing the domain separator incorrectly, such as omitting important components like the contract address. This could again allow reuse across contexts.

Failing to sanitize or validate input values used in domain separator computation. These should not be attacker-controlled.

Setting domain separators on a per-function rather than per-contract basis. This doesn't fully isolate signatures to a single context.

Not accounting for potential metadata like chain/network ID in domain separators. Signatures may not be cross-chain compatible.

Not versioning the domain separator format or hashing algorithm over time. Old styles could be replayed.

Failing to specify expected calldata/function signature when relevant. Signatures for calls are less isolated.

Not regenerating domain separators when upgrading a contract implementation. Old contexts may be accessible.

Insufficient entropy or non-randomness in salt values, compromising uniqueness over time.@EthSecurity1








What is the use of the signextend opcode?SIGNEXTEND performs the necessary sign extension when working with two's complement encoded signed integers in EVM. This allows operations on the values to produce the expected results for both positive and negative numbers. when there are negative numbers in calldata it cost more gas because the minor encoding, checking, arithmetic and comparison differences for negative numbers are why they cost slightly more gas than equivalent positive values. The EVM optimizes for the common case of non-negatives. why an int256 variable that stores -1 look like in hex?-1 stored as an int256 in Ethereum would be represented by the full 256-bit hex value ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff.

In binary, -1 is 1111111111111111111111111111111111111111111111111111111111111111

Converting that binary value to hex, we get:
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
Why is it important to ECDSA sign a hash rather than an arbitrary bytes32? hashing first before signing provides critical security properties like preimage resistance, binding signatures to data, canonical encoding and data integrity that direct signing of arbitrary bytes lacks. It's an important step for ECDSA signatures to provide robust cryptographic protection.
@EthSecurity1






Securlydev dan repost
Thirteen incredible #github repositories to help you learn everything about blockchain.
#Blockchain #web3 #development #defi #javadcript #solidity #vyper

https://twitter.com/poryadev/status/1549397403677388800?s=21




A low-latency commit-and-reveal architecture to mitigate #Blockchain front-running

PDF: https://t.co/n523G63SQj


spotted an awesome project for which Authors put together all known MITM (Man-In-The-Middle) attacks and methods of protection against these attacks

https://t.co/yq2DMpJPDt




• A Tool for Detecting Metamorphic Smart Contracts https://t.co/Plag0lSNML

• Ethereum Smart contract auditor roadmap https://t.co/5HGeWrLrpd https://t.co/oJWAoiXBpW
Protecting smart contracts against reverse engineering

https://t.co/yRdikSZ91D

In this paper, Authors propose an automated #security enhancement tool for protecting smart contracts against reverse engineering

Free cybersecurity courses:

Ethical Hacking 12 Hours https://t.co/qjeI2JhkW2

OSINT in 5 Hours https://t.co/6hUKlWrH3F

Beginner Web Application Hacking https://t.co/upRxZiLYBA

Linux for Ethical Hackers https://t.co/h9fMoMTOKv

Buffer Overflows Made Easy
https://t.co/U8l6bEWXnf







20 ta oxirgi post ko‘rsatilgan.

28

obunachilar
Kanal statistikasi