lea-improvement-proposals

Abstract

This LIP defines a standard JSON-based file format for storing the cryptographic keys required for a LEA account. The format encapsulates the Ed25519 secret key and the SPHINCS+ secret and public keys into a structured, compact, and machine-readable file. The primary goal is to ensure interoperability between different wallets, tools, and applications within the LEA ecosystem.

Motivation

To interact with the Lea network, a user must manage a set of cryptographic keys. Without a standardized format for storing these keys, each application (e.g., CLI tools, wallets, libraries) would be forced to implement its own proprietary storage method. This would lead to a fragmented ecosystem where users cannot easily move their accounts between different tools, increasing friction and the risk of key handling errors.

By defining a single, clear standard, this LIP ensures that a keyset generated by one tool (like lea-keygen) can be seamlessly used by any other compliant tool (like the ltm builder). This promotes interoperability, simplifies development, and improves the overall user experience.

Specification

A LEA Keyset file is a JSON file containing a single top-level array. The structure is defined as follows:

Root: A JSON Array with two elements.

JSON Structure Example

[
  // Element 1: Ed25519 Secret Key (64 bytes)
  [ 1, 2, 3, ..., 64 ],

  // Element 2: SPHINCS+ Keyset
  [
    // Element 2.1: SPHINCS+ Secret Key (64 bytes)
    [ 101, 102, 103, ..., 164 ],

    // Element 2.2: SPHINCS+ Public Key (32 bytes)
    [ 201, 202, 203, ..., 232 ]
  ]
]

Rationale

Backwards Compatibility

This is a new, additive standard. It does not break any existing protocol rules or formats and will serve as the standard for all tools created after its acceptance.

Security Considerations

This file contains unencrypted private keys and is extremely sensitive.

This LIP is licensed under the MIT License.