Skip to content

Cryptography External Command Specification v1 #1

@jht5945

Description

@jht5945

URL: https://openwebstandard.org/rfc1

Key Value Comment
No. RFC#1 -
Author Hatter Jiang -
Created May 14th, 2025 -
Modified May 14th, 2025 -
Modified Jul 9th, 2025 external_sign supports --message-type

Introduction

Do ECDH or Sign using external command line.

Commands

Error Result

Field Type Description
success boolean Always false
error boolean Error message

external_spec

Field Type Description
success boolean Always true
agent String Command line agent
specification String Specification version
commands []String Supported commands

commandline-cli external_spec

{
  "agent": "card-external-provider/1.13.6",
  "specification": "External/1.0.0-alpha",
  "success": true,
  "commands": ["external_public_key", "external_sign"]
}

external_public_key

Field Type Description
success boolean Always true
public_key_base64 String Public key in base64

commandline-cli external_public_key --parameter <PARAMETER>

{
  "public_key_base64": "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEgSZJRVVOddsE6QRArEZY6I4tsa56P66knLqzHheyps90RA46eqNab0ws8b9LAlrdPCQQHvSdnwTi9OddYhXtyw==",
  "success": true
}

external_sign

Field Type Description
success boolean Always true
signature_base64 String Signature in base64

commandline-cli external_sign --parameter <PARAMETER> --alg ES256 --message-base64 <MESSAGE_IN_BASE64> [--message-type raw|sha256|sha384|sha512]

{
  "signature_base64": "MEQCIBMTp4vbtZ9WwUaBiqZe3T+MdzC2BYSteujzSSE/QKmqAiBhic8j/jdUeaWCWQZZlz4G9iiPGcMTAiclFqPoQaiIMg==",
  "success": true
}

external_ecdh

Field Type Description
success boolean Always true
shared_secret_hex String Shared secret in HEX

commandline-cli external_ecdh --parameter <PARAMETER> --epk <PUBLIC_KEY_IN_BASE64>

{
  "shared_secret_hex": "a04ddc1e94a9df5d26a9405940e11498743d08245d654ca6fc9d2c41e602f250",
  "success": true
}

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions