Skip to main content

chainkey_platform_interface 0.1.1 copy "chainkey_platform_interface: ^0.1.1" to clipboard
chainkey_platform_interface: ^0.1.1 copied to clipboard

Common platform interface for the chainkey federated plugin.

chainkey_platform_interface #

A common platform interface for the chainkey federated plugin.

This package defines the core abstractions, data models, exceptions, and Pigeon-generated host API contracts implemented by platform-specific packages (chainkey_android, chainkey_ios, and chainkey_web).


Architecture Overview #

chainkey uses the federated plugin architecture. Platform implementations extend ChainkeyPlatform to handle native hardware-isolated security enclaves and WebAuthn authenticators:


Core Models #

HardwareIsolationLevel #

Defines the hardware security boundary protecting the cryptographic keypair:

  • secureEnclave: Apple Secure Enclave Processor (SEP).
  • strongBox: Dedicated hardware security chip (Android StrongBox Keymaster / KeyMint).
  • tee: Trusted Execution Environment (Android ARM TrustZone).
  • software: Platform keystore or browser-managed software sandbox.

EnclavePublicKey #

Represents an elliptic curve public key generated within the enclave:

  • x: 32-byte big-endian X-coordinate on the NIST P-256 (secp256r1) curve.
  • y: 32-byte big-endian Y-coordinate on the NIST P-256 curve.
  • uncompressedBytes: 65-byte uncompressed SEC1 representation (0x04 || X || Y).
  • isolationLevel: Confirmed isolation level.

DerSignatureResult #

Cryptographic signature produced by the enclave:

  • rawDerSignature: ASN.1 DER-encoded signature bytes.
  • r: 32-byte big-endian scalar component.
  • s: 32-byte big-endian scalar component.
  • isLowS: Indicates whether $s$ is normalized to low-$S$ ($s \le n/2$) per BIP-62 / EIP-2.

Usage for Platform Implementers #

To implement a new platform for chainkey, extend ChainkeyPlatform:

import 'package:chainkey_platform_interface/chainkey_platform_interface.dart';

class CustomChainkeyPlatform extends ChainkeyPlatform {
  static void registerWith() {
    ChainkeyPlatform.instance = CustomChainkeyPlatform();
  }

  @override
  Future<bool> isHardwareIsolationSupported(HardwareIsolationLevel level) async {
    // Custom platform isolation check
    return true;
  }
}

Issues & Contributing #

For issues, bug reports, and feature requests, please visit the Chainkey GitHub Repository.

0
likes
0
points
423
downloads

Publisher

verified publisherkryonex.io

Weekly Downloads

Common platform interface for the chainkey federated plugin.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, meta, plugin_platform_interface

More

Packages that depend on chainkey_platform_interface