Back to Home

KeyRegistry

Unclassified
0x68656b11fe28...495833099a3c
FrontierContract #1,593Exact Bytecode MatchEdit this contract

Bytecode verified via sibling

This contract shares identical runtime bytecode with KeyRegistry (0x016c93c3...) which has been verified through compiler archaeology.

Deployed September 25, 2015 (10 years ago)Block 289,905

A 2015 public key directory that keys every entry off tx.origin instead of msg.sender.

Frontier EraVerified Source

Historical Significance

Each address gets one record, a string holding a key and the timestamp it was written. setKey(string) stores a key and stamps it with the block time, revokeKey() clears both, and getKeyData(address) and getKeyTimestamp(address) read any address's record back. The flaw is in who the record is filed under: both writers index on tx.origin rather than msg.sender, so any contract a user calls can call setKey or revokeKey in the middle of that call and overwrite or wipe the user's key without the user ever touching this contract. Source recovered by exact bytecode match: solc v0.1.1+commit.6ff4cd6 with the optimizer off reproduces all 1105 bytes of the creation transaction.

Context

Deployed in 2015 on the Ethereum Frontier network.

Key Facts
Deployment Block
289,905
Deployment Date
Sep 25, 2015, 08:14 PM
Code Size
1.1 KB
Gas at Deploy
307,109

Description

Each address gets one record, a string holding a key and the timestamp it was written. setKey(string) stores a key and stamps it with the block time, revokeKey() clears both, and getKeyData(address) and getKeyTimestamp(address) read any address's record back. The flaw is in who the record is filed under: both writers index on tx.origin rather than msg.sender, so any contract a user calls can call setKey or revokeKey in the middle of that call and overwrite or wipe the user's key without the user ever touching this contract. Source recovered by exact bytecode match: solc v0.1.1+commit.6ff4cd6 with the optimizer off reproduces all 1105 bytes of the creation transaction.

Source Verified

Exact bytecode match(1,105 bytes)
Compiler: v0.1.1+
Heuristic Analysis

The following characteristics were detected through bytecode analysis and may not be accurate.

Detected Type: Unclassified

Bytecode Overview

Opcodes1,105
Unique Opcodes83
Jump Instructions41
Storage Operations15

External Links

Related contracts