Skip to content

Conversation

@prateekreddy
Copy link

@prateekreddy prateekreddy commented Nov 27, 2025

Add support for multiple cryptographic key types (Ed25519, Secp256k1) in enclave signature verification to enable attestations with various public key types.

Changes:

  • Add KeyType enum with Ed25519 and Secp256k1 variants
  • Add key_type field to Enclave struct to track signature scheme
  • Add register_enclave_with_key_type() for explicit key type selection
  • Maintain backward compatibility: register_enclave() defaults to Ed25519
  • Add convenience functions: register_enclave_ed25519(), register_enclave_secp256k1()
  • Update verify_signature() to dispatch based on key type using match
  • Add public key length validation (32 bytes for Ed25519, 33/65 for Secp256k1)
  • Update register_enclave.sh to support optional key_type parameter

Note: Enclave struct now includes key_type field. Existing enclaves will need to be re registered if upgraded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant