Signing cells using public key cryptography, most notably transactions as required prior to submission.
More precisely, is signed the hash of the encoding of the cell, producing a signed data cell.
Uses Ed25519.
Signing cells using public key cryptography, most notably transactions as required prior to submission. More precisely, is signed the hash of the encoding of the cell, producing a signed data cell. Uses Ed25519.
(account-key key-pair)
Returns the account key of the given key-pair
.
An account key is a specialized cell behaving like a blob and representing the public key of an account.
Returns the account key of the given `key-pair`. An account key is a specialized cell behaving like a blob and representing the public key of an account.
(ed25519)
(ed25519 seed)
(ed25519 key-public key-private)
Creates an Ed25519 key pair.
It is generated from a seed
, a 32-byte blob. If not given, one is generated randomly.
Alternatively, a key-public
and a key-private
retrieved from an existing key pair can
be provided.
Creates an Ed25519 key pair. It is generated from a [[seed]], a 32-byte blob. If not given, one is generated randomly. Alternatively, a [[key-public]] and a [[key-private]] retrieved from an existing key pair can be provided.
(hex-string key-pair)
Returns the public key of the given key-pair
as a hex-string (64-char string where each pair of
chars represents a byte in hexadecimal).
Returns the public key of the given `key-pair` as a hex-string (64-char string where each pair of chars represents a byte in hexadecimal).
(key-private key-pair)
Returns the java.security.PrivateKey
of the given key-pair
.
Returns the `java.security.PrivateKey` of the given `key-pair`.
(key-public key-pair)
Returns the java.security.PublicKey
of the given key-pair
.
Returns the `java.security.PublicKey` of the given `key-pair`.
(seed key-pair)
Returns the seed of the given key-pair
.
Attention, this is very sensitive information since it allows rebuilding the key-pair using ed25519
.
Returns the seed of the given `key-pair`. Attention, this is very sensitive information since it allows rebuilding the key-pair using [[ed25519]].
(sign key-pair cell)
Returns the given cell
as data signed by key-pair
. That value is a cell itself
and can be stored in Etch if required (see the convex.db
namespace from :module/cvm
).
signed->...
functions allows for extracting information from signed data.
Most useful for signing transactions.
See convex.client/transact
.
Returns the given `cell` as data signed by `key-pair`. That value is a cell itself and can be stored in Etch if required (see the `convex.db` namespace from `:module/cvm`). `signed->...` functions allows for extracting information from signed data. Most useful for signing transactions. See [[convex.client/transact]].
(signed->account-key signed)
Given signed data, returns the account-key
of the signer.
See sign
.
Given signed data, returns the [[account-key]] of the signer. See [[sign]].
(signed->cell signed)
Given signed data, returns the cell that was signed.
See sign
.
Given signed data, returns the cell that was signed. See [[sign]].
(signed->signature signed)
Given signed data, returns the signature as a blob cell.
See sign
.
Given signed data, returns the signature as a blob cell. See [[sign]].
(verify account-key signature cell)
Returns true if the given cell
has indeed been signed by the given account-key
.
signature
is the signature to verify as a blob cell.
Returns true if the given `cell` has indeed been signed by the given [[account-key]]. `signature` is the signature to verify as a blob cell.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close