17
votes
Accepted
What elliptic curves are used by Tezos?
Yes, Tezos supports three types of keys associated with 3 kinds of elliptic curves
tz1 for Ed25519 keys,
tz2 for Secp256k1 keys (same as Bitcoin/Ethereum)
tz3 for NIST P256 keys which may have led ...
8
votes
Encryption within smart contract
It's not clear what decrypting data from within a smart contract would achieve since all operations are public.
8
votes
Accepted
Encryption within smart contract
There are currently no encrypt/decrypt instructions for Michelson. You can view the full list of instructions here: http://tezos.gitlab.io/mainnet/whitedoc/michelson.html
7
votes
Accepted
How to calculate a random seed?
We will need these operations:
blake2b: size 32
concat: concatenation of byte arrays
Also, let zero_bytes be 32 zero bytes.
My answer is based on seed_storage.ml and seed_repr.ml, with some ...
6
votes
Accepted
Why a reveal operation?
Ethereum way of retrieving the public key only works with some signing algorithms, ECDSA with secp256k1 in its case. It is also used by Tezos for tz2 (and P-256 for tz3), but not for tz1 which uses ...
4
votes
HD Derivation Path with P-256 signature
TezBox currenty only supports the ed25519 curve, this is because the underlying library (eztz.js) only supports this curve. We are about to release support for the other two curves in eztz.js in the ...
4
votes
Accepted
Secp256k1 with Non-Deterministic Signatures
It shouldn't make a difference how you pick k, deterministically or not. It's random and is supposed to be kept secret by the signer, so there's no way to tell what k was used by just looking at the ...
3
votes
Accepted
Get unencrypted secret key from the encrpyted one in a programmatic way
If using pytezos that would be:
>>> from pytezos import Key
... Key.from_encoded_key('edskReYTc3xorfemyNAcrYb6Sz8Wgj6e1PfevpZ6uysf4KXWBNxXcoLA4KBtZp7hmUCy6V3bhtWZRMSuya5DgXA1TU2JXYeDmG')....
3
votes
Accepted
Unable to get consistent tz2 (secp256pk1) signature
The immediate problem seems to be that you are not getting signatures in "lower S" form. This seems better:
sk.sign_digest(digest, sigencode=ecdsa.util.sigencode_string_canonize)
I cannot vouch for ...
2
votes
How to get tezos KT address from the public key?
KT addresses are the addresses of smart contract (aka. "originated accounts"). Contrary to tz addresses (aka. "implicit accounts"), smart contracts are not associated with a pair ...
2
votes
Unable to get consistent tz2 (secp256pk1) signature
Not a direct answer, but workaround
python-ecdsa lib generates non-deterministic signatures by default (see more at https://www.rfc-editor.org/rfc/rfc6979#section-3.2). Each time you run your code you ...
1
vote
Accepted
How to sign transaction from tz2 address?
You must sign transactions from tz2 addresses with secp256k1. Eztz's sign function uses Ed25519, so that wont work. Easiest would probably be to just replace libsodium in eztz with something like ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
cryptography × 16tezos-client × 3
address × 3
crypto × 3
ledger × 2
wallets × 2
liquidity × 2
security × 2
account × 2
eztz × 2
encrypted × 2
smart-contracts × 1
transactions × 1
michelson × 1
protocol × 1
operation × 1
tezbox × 1
tezos-signer × 1
key × 1
consensus × 1
reveal × 1
python × 1
trezor × 1
implementation × 1