ExIcaoVds.SignatureZone
(ex_icao_vds v0.3.2)
Copy Markdown
VDS signature zone struct and binary encoder/decoder.
Binary format
<<0xFF, algorithm::8, sig_length::variable, signature::sig_length>>The 0xFF marker immediately follows the message zone. The signed payload
is everything before 0xFF (i.e. header bytes + message zone bytes).
Algorithm byte values
| Value | Meaning |
|---|---|
| 0x01 | ECDSA secp256r1 (P-256) / SHA-256, DER-encoded signature |
| 0x02 | ECDSA secp384r1 (P-384) / SHA-384, DER-encoded signature |
Summary
Functions
Returns the algorithm byte for the given algorithm atom.
Decodes a signature zone from bytes starting with 0xFF.
Returns {:ok, signature_zone} or {:error, Error.t()}.
Encodes a SignatureZone into bytes.
Returns {:ok, binary} or {:error, Error.t()}.
Types
@type t() :: %ExIcaoVds.SignatureZone{ algorithm: atom(), marker: non_neg_integer(), raw: binary() | nil, signature: binary(), signature_format: :der | :raw, signed_bytes: binary() | nil }
Functions
Returns the algorithm byte for the given algorithm atom.
@spec decode(binary()) :: {:ok, t()} | {:error, ExIcaoVds.Error.t()}
Decodes a signature zone from bytes starting with 0xFF.
Returns {:ok, signature_zone} or {:error, Error.t()}.
@spec encode(t()) :: {:ok, binary()} | {:error, ExIcaoVds.Error.t()}
Encodes a SignatureZone into bytes.
Returns {:ok, binary} or {:error, Error.t()}.