3

Currently, dose Tezos support secp256k1 key?

I tried to broadcast a transaction to reveal public key for a secp256k1 key.

curl -H "Content-type: application/json" -X POST https://rpcalpha.tzbeta.net/injection/operation -d '"466ab4f35ee8657c2b632394215e7243bbb11942ac75bc6d4c5dc716655c38446b01396167e3f38c31008b38557f9feedf3f54745bad8827f1de08d08c01ac020002f746e7d62a6c0cc12936673bbb1f23e1938b85f60e30fd2b1e8525bb2844ded0f729c01136da6abe7ffeb9632e0a475eb68b7fdf0be82d862afb9b6f1cce4dc768678994e7841c28b4732190912d92b4f80b5ae0935470bbbb07cae1bc6d6a8b"'

I always got this error:

[
    {
        "kind": "permanent",
        "id": "node.prevalidation.parse_error"
    }
]

It seems that the tezos node assupe that the public key length should be 32. If the delete the last byte of secp256k1 public key, then the parse_error will disappear.

Did anyone have successfully revealed secp256k1 public key?

2 Answers 2

3

Questions was solved in another channel (https://t.me/TezosDevelopers).

Answer from BakingBad:

"Tezos supports pubkey revealing for tz2 addresses. You just need to use correct message Tag.

You can do that, for secp256k1 https://tezos.gitlab.io/api/p2p.html#public-key-determined-from-data-8-bit-tag

I guess, you set the incorrect Tag"

2

Tezos support secp256k1 key, but it uses the compressed format of public keys which is 33 bytes long.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.