Papers2 providers · 2 records
January 1, 2026· Zenodo (CERN European Organization for Nuclear Research)
book-chapter
Open access

Deriving and Validating an EVM Address with POSIX Tools

Abstract

Abstract Externally owned accounts on Ethereum and its layer-two networks, including Base, are identified by an address derived deterministically from a secp256k1 private key. Because this derivation is network-agnostic, a single address is valid across every EVM-compatible chain. Tokens such as ZCHF (the Frankencoin Swiss-franc stablecoin) on Base are therefore held at the same address that would hold ether on Ethereum mainnet. This note presents a compact, dependency-light method for generating such an address in minimal Unix environments, including Alpine Linux with its ash shell. The method uses only openssl and xxd. The central technical point is that Ethereum relies on the original Keccak-256 hash, whose padding differs from the NIST-standardised SHA3-256. Substituting the latter produces a well-formed but wrong address, and funds sent to it would be irrecoverable. The work makes three contributions: A one-line generation command that creates a key pair and derives its lowercase address. A three-part validation protocol: a Keccak test-vector check, an independent re-derivation from the private key, and a cross-check against an unrelated implementation such as Foundry's cast or a wallet import. Pseudocode specifications of each algorithm delegated to external tools: key generation, elliptic-curve scalar multiplication, DER byte extraction, the Keccak sponge, EIP-55 checksumming, and EIP-191/ECDSA signing. A worked case shows why independent validation matters. A web calculator returned the address of private key 1 because it had not read the input. This was caught only by comparing it against the shell output and a separate computation. The note closes with operational-security guidance and its limitations. The re-derivation command was not executed during preparation, and OpenSSL supplies no recovery identifier for signatures. It also covers how to handle keys, why shred is unreliable on modern storage, and why a vanity suffix such as "tra" cannot occur in a hexadecimal address.

Community

0 comments
Use Connect Wallet in the navigation

No discussion yet

Be the first to share a question or observation.