silicon v0.1.0 Silicon.Secp256k1 View Source

A wrapper of libsecp256k1

Link to this section Summary

Link to this section Types

Link to this type

compression() View Source
compression() :: :compressed | :uncompressed

Link to this type

recovery_id() View Source
recovery_id() :: integer()

Link to this type

signature() View Source
signature() :: binary()

Link to this section Functions

Link to this function

compress_pubkey(arg1) View Source
compress_pubkey(uncompressed_pubkey :: pubkey()) ::
  {:ok, pubkey()} | {:error, term()}

Link to this function

decompress_pubkey(pubkey) View Source
decompress_pubkey(compressed_pubkey :: pubkey()) ::
  {:ok, pubkey()} | {:error, term()}

Link to this function

derive_pubkey(privkey, compression) View Source
derive_pubkey(privkey(), compression()) :: {:ok, pubkey()} | {:error, term()}

Link to this function

key_pair() View Source
key_pair() :: {pubkey(), privkey()}

Link to this function

privkey_tweak_add(privkey, tweak) View Source
privkey_tweak_add(privkey(), binary()) :: {:ok, binary()} | {:error, term()}

Link to this function

privkey_tweak_mul(privkey, tweak) View Source
privkey_tweak_mul(privkey(), binary()) :: {:ok, binary()} | {:error, term()}

Link to this function

pubkey_tweak_add(pubkey, tweak) View Source
pubkey_tweak_add(pubkey(), binary()) :: {:ok, binary()} | {:error, term()}

Link to this function

pubkey_tweak_mul(pubkey, tweak) View Source
pubkey_tweak_mul(pubkey(), binary()) :: {:ok, binary()} | {:error, term()}

Link to this function

recover_compact(data, signature, recovery_id, compression) View Source
recover_compact(binary(), signature(), recovery_id(), compression()) ::
  {:ok, pubkey()} | {:error, term()}

Link to this function

sign(data, privkey) View Source
sign(binary(), privkey()) :: {:ok, signature()} | {:error, term()}

Link to this function

sign_compact(data, privkey) View Source
sign_compact(binary(), privkey()) ::
  {:ok, signature(), recovery_id()} | {:error, term()}

Link to this function

verify(data, signature, pubkey) View Source
verify(binary(), signature(), pubkey()) :: :ok | :error | {:error, term()}

Link to this function

verify_compact(data, signature, pubkey) View Source
verify_compact(binary(), signature(), pubkey()) ::
  :ok | :error | {:error, term()}