Abstract

This example EIP adds generic algorithm as an algorithmic type.

Motivation

Generic algorithm has a good reason to be in Ethereum, therefore it should be.

Specification

This EIP defines a new EIP-7932 algorithmic type with the following parameters.

ALG_TYPE = 0xFA
SIZE = 128

def gas_cost(signing_data: Bytes) -> Uint64:
    return Uint64(128 + len(signing_data))

def validate(signature: Bytes) -> None | Error:
    # ...
    # Simple cryptography here
    # ...
    return None

def verify(signature: Bytes, signing_data: Bytes) -> Bytes | Error:
    # ...
    # Complicated cryptography here
    # ...
    return public_key

Rationale

Generic algorithm has a good reason to be in Ethereum, therefore it should be.

Backwards Compatibility

No backward compatibility issues found.

Security Considerations

Needs discussion.

Copyright and related rights waived via CC0.