ephemeral

Test vectors

Sixteen ERC-5564 scheme 1 vectors with every intermediate value, plus one for key derivation from a signature.

Download: erc5564-scheme1.json.

Each vector derives its keys from fixed labels, keccak256("erc5564 scheme 1 vector {i}: spending key") mod n and the same for the viewing and ephemeral keys, and lists:

FieldMeaning
stealthMetaAddressst:eth: + compressed spending key + compressed viewing key
ephemeralPublicKeyP_e, compressed
sharedSecretp_e · P_view, compressed (33 bytes)
hashedSharedSecretkeccak256(sharedSecret)
viewTagfirst byte of the hashed secret
stealthAddressaddress of P_spend + hashedSharedSecret · G
stealthPrivateKeyp_spend + hashedSharedSecret mod n

The keyDerivation entry shows one EIP-191 signature turned into keys: keccak256(r) and keccak256(s), mod n.

Every value was checked against the ScopeLift stealth-address SDK (1.0.0-beta.5): address generation, key computation, the announcement check and key derivation from a signature. Use the file to test any ERC-5564 implementation, in any language.