Skip to content

Incorporate a scheme to replace RSA or fix PEM format#59

Description

@GalRogozinski

馃幆 Description

Currently, public keys headers are encoded using PKIX, which requires non-standard code to decipher. We can switch to PKCS1 to reduce complexity and improve code maintainability.

However, since public keys are already stored on-chain, backwards compatibility must be preserved for nodes that joined the network prior to the change. This necessity introduces:

  • Support for multiple formats
  • More complex and potentially messy code
  • Partial negation (or no negation) of the motivation for the change

Despite this, a well-structured migration path could still offer long-term gains.


馃挕 Proposal

3 options:

  • No change
  • Replace PKIX encoding with PKCS1
  • migrate to ECC

馃搳 Benefits of ECC

馃攼 Encryption

  • Encrypted size of a 32-byte BLS private key:
    • Current (RSA-2048): 256 bytes
    • Proposed (ECC or compact): ~106 bytes (can be less)

鉁嶏笍 Signatures

  • Signature size:
    • Current: 256 bytes (raw, no PEM headers)
    • Proposed (raw ECC): 32 bytes

馃摎 References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions