(->hexadecimal-seed private-key)Formats a private key to the hexadecimal seed with sc-reduce.
Formats a private key to the hexadecimal seed with sc-reduce.
(->private-view-key private-spend-key)Derives a private view key from a private spend key.
Derives a private view key from a private spend key.
(->public-key private-key)Compute public counterparts of private view and spend key
Compute public counterparts of private view and spend key
(bytes->int bytes & {:keys [little-endian] :or {little-endian true}})Converts a byte array into a big integer.
It has an optional parameter little-endian, which defaults to true.
If little-endian is true, the byte array is reversed before the conversion
Converts a byte array into a big integer. It has an optional parameter `little-endian`, which defaults to true. If little-endian is true, the byte array is reversed before the conversion
(derive-from-mnemonic {:keys [mnemonic path key-type]})(derive-from-mnemonic mnemonic path key-type)Derive from a BIP039 mnemonic seed to a spend key for Monero.
Derive from a BIP039 mnemonic seed to a spend key for Monero.
(encode-point P)Converts the coordinates of a point on the Edwards curve 25519 represented as a vector of x and y coordinates into a 32-byte string encoded in hexadecimal format.
Converts the coordinates of a point on the Edwards curve 25519 represented as a vector of x and y coordinates into a 32-byte string encoded in hexadecimal format.
(exp-mod b e m)Calculates the result of a modular exponentiation of a given base b, exponent e, and modulus m.
Calculates the result of a modular exponentiation of a given base `b`, exponent `e`, and modulus `m`.
(get-primary-public-address public-spend-key public-view-key network-type)Create the actual Public Address from public-spend-key,
public-view-key and network-type (:mainnet or :testnet).
Create the actual Public Address from `public-spend-key`, `public-view-key` and `network-type` (`:mainnet` or `:testnet`).
(inv x)Computes the modular multiplicative inverse of x modulo q.
The modular multiplicative inverse of x modulo q is an integer y such that xy = 1 (mod q).
It does this by using the function exp-mod to calculate the result of (x^(q-2)) mod q.
Computes the modular multiplicative inverse of `x` modulo `q`. The modular multiplicative inverse of `x` modulo `q` is an integer `y` such that `xy = 1 (mod q)`. It does this by using the function `exp-mod` to calculate the result of ``(x^(q-2)) mod q``.
(keccak-256 private-key)Cryptographic hash function
Cryptographic hash function
(pad-leading-ones n x)Pad x with 1s (1 is 0 in Base58) if it has less than n characters.
Pad `x` with `1`s (1 is 0 in Base58) if it has less than `n` characters.
(sc-reduce32 s)Not every 256-bit integer is a valid EdDSA scalar (private key); it must be less than the curve order.
sc_reduce32 is the function to do this.
2^252 + 27742317777372353535851937790883648493 is the order of Edwards curve 25519. It is also known as the prime l.
This prime l is chosen such that it is a large prime number and also it is close to 2^252.
Not every 256-bit integer is a valid EdDSA scalar (private key); it must be less than the ``curve order``. `sc_reduce32` is the function to do this. 2^252 + 27742317777372353535851937790883648493 is the order of Edwards curve 25519. It is also known as the prime l. This prime l is chosen such that it is a large prime number and also it is close to 2^252.
(scalar-multiplication P e)Ed25519 scalarmult function
Ed25519 scalarmult function
(x-recovery y)Recover the x-coordinate of a point on the Edwards curve 25519, given the y-coordinate.
Recover the `x`-coordinate of a point on the Edwards curve 25519, given the `y`-coordinate.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |