Skip to main content
ALL CHAINS

Cryptographic Specification

Curve Usage Matrix

ComponentCurveStandardUsage
ELA Main ChainNIST P-256 (secp256r1)FIPS 186-4Transaction signing, multi-sig, coinbase
DID SystemNIST P-256 (secp256r1)FIPS 186-4DID key pairs, credential signing
Schnorr (Arbiter)NIST P-256 (secp256r1)Custom implAggregated cross-chain signatures
ESC (EVM)secp256k1SEC 2Standard Ethereum transaction signing
EID (EVM)secp256k1SEC 2Standard Ethereum transaction signing
Carrier v2Ed25519RFC 8032Node identity
Carrier v2X25519RFC 7748Key agreement for encryption
Carrier v1Curve25519NaClFriend keys, session encryption
warning

The ELA main chain uses P-256 (secp256r1), not Bitcoin's secp256k1. Standard Bitcoin/Ethereum wallet libraries (bitcoinjs-lib, ethers.js, web3.js) cannot sign ELA main chain transactions without P-256 curve support.

Both curves coexist in the system: P-256 for main chain + DID operations, secp256k1 for EVM sidechain operations. Essentials wallet derives keys on both curves from the same BIP-39 seed.

Hash Functions

UsageAlgorithmOutput Size
Block hashingDouble SHA-25632 bytes
Address derivationSHA-256 + RIPEMD-16020 bytes
Merkle treesDouble SHA-25632 bytes
Bloom filtersMurmurHash3 (32-bit)4 bytes
AuxPoW validationSHA-256 (Bitcoin compat)32 bytes
Carrier anti-spam tokensSHA-256 with time windows32 bytes
Schnorr challengeSHA-25632 bytes
DID document hashingSHA-25632 bytes

HD Key Derivation

All components use BIP-32/BIP-39/BIP-44 standard derivation from a single mnemonic seed.

ChainHD PathCurveCoin Type
ELA Main Chainm/44'/0'/0'/0/<index>secp256r1 (P-256)0 (Bitcoin)
DIDm/44'/0'/0'/0/<index>secp256r1 (P-256)0 (same as ELA)
ESC/EIDm/44'/60'/0'/0/<index>secp256k160 (Ethereum)
Bitcoinm/44'/0'/0'/0/<index>secp256k10 (Bitcoin)
info

ELA main chain and DID share the same derivation path (m/44'/0'/0'/0/0) but use P-256 instead of secp256k1. The same seed generates both P-256 and secp256k1 key trees; the curve selection happens at the key generation step, not at the path level.

Address Encoding

All Elastos addresses use Base58Check encoding with version byte prefixes:

Version ByteHexAddress PrefixPurpose
Standard0x218Standard single-sig ELA addresses
Multi-sig0x12VariesMulti-signature addresses
Cross-chain0x4BXCross-chain deposit addresses
Deposit0x1FDBPoS node registration deposit
DPoSV20x3FVariesBPoS staking addresses
DID0x67iDecentralized Identity (CRDID)

Address construction:

1. Public key → redeem script (depends on type)
2. Redeem script → SHA-256 → RIPEMD-160 → program hash (20 bytes)
3. Prepend version byte → 21 bytes (Uint168)
4. Double SHA-256 of versioned bytes → first 4 bytes = checksum
5. Append checksum → 25 bytes
6. Base58 encode → address string

Signature Formats

ECDSA P-256 (Main Chain / DID)

Standard ECDSA signature over SHA-256 hash, using the NIST P-256 curve. Signature is DER-encoded (r, s) values.

ECDSA secp256k1 (ESC / EID)

Standard Ethereum signature: (v, r, s) where v is the recovery ID (27 or 28). Compatible with ecrecover precompile.

Schnorr Aggregate (Arbiter)

64-byte signature: [R_x (32 bytes) || s (32 bytes)]

Where:

  • R_x = x-coordinate of aggregate nonce point R = Σ(R_i)
  • s = Σ(k_i + e * privKey_i) mod N
  • e = SHA-256(R_x || P || message)
  • P = Σ(P_i) = aggregate public key

Ed25519 (Carrier v2)

Standard Ed25519 signature: 64 bytes. Used for node identity and message authentication.

Special Addresses

AddressPurpose
8VYXVxKKSAxkmRrfmGpQR2Kc66XhG6m3taFoundation (30% pre-DPoS)
8ZZLWQUDSbjWUn8sEdxEFJsZiRFpzg53rJLegacy CRC consensus reward (30% post-DPoS, pre-committee)
ELANULLXXXXXXXXXXXXXXXXXXXXXYvs3rrBurn address (destroyed ELA)
CRASSETSXXXXXXXXXXXXXXXXXXXX2qDX5JCR Assets (treasury)
CREXPENSESXXXXXXXXXXXXXXXXXX4UdT6bCR Expenses (operational)
STAKEPooLXXXXXXXXXXXXXXXXXXXpP1PQ2BPoS Stake Pool
STAKEREWARDXXXXXXXXXXXXXXXXXFD5SHUBPoS Reward Accumulation
XKUh4GLhFJiqAMTF6HyWQrV9pK9HcGUdfJDID Sidechain Address