CodeSigning (code_signing v0.1.0) View Source
Code signing and verification functions for BEAM binaries using Ed25519 signatures.
All strings for paths need to be passed as charlists for Erlang compatibility.
Link to this section Summary
Types
The filename as a string or the BEAM module binary.
A tuple of the chunk ID and its binary data.
Functions
Verifies the signature of the given BEAM binary using the Ed25519 public_key
. If the
signature is valid, the module will be loaded.
Verifies the signature of the given path to .beam
file using the
Ed25519 public_key
. If the signature is valid, the module will be loaded.
Signs the the given BEAM binary or path to .beam
file using the Ed25519 secret_key
.
Verifies the signature of the given BEAM binary or path to .beam
file using the
Ed25519 public_key
.
Link to this section Types
Specs
The filename as a string or the BEAM module binary.
Specs
A tuple of the chunk ID and its binary data.
Link to this section Functions
Specs
load(atom(), binary(), Ed25519.key()) :: :ok | :error
Verifies the signature of the given BEAM binary using the Ed25519 public_key
. If the
signature is valid, the module will be loaded.
Specs
load_file(atom(), charlist(), Ed25519.key()) :: :ok | :error
Verifies the signature of the given path to .beam
file using the
Ed25519 public_key
. If the signature is valid, the module will be loaded.
Module names should be atoms prefixed with Elixir, such as String.to_atom("Elixir.MyModule")
Specs
sign(beam(), Ed25519.key()) :: binary()
Signs the the given BEAM binary or path to .beam
file using the Ed25519 secret_key
.
Returns the modified binary that can be written to a file.
When given a BEAM binary, it will sign the binary.
When given a path to a .beam
file, it will sign the binary without modifying the original file.
Specs
valid_signature?(beam(), Ed25519.key()) :: boolean()
Verifies the signature of the given BEAM binary or path to .beam
file using the
Ed25519 public_key
.
When given a BEAM binary, it will verify the signature of the binary.
When given a path to a .beam
file, it will verify the signature of the binary without
modifying the original file.