How to derive the tezos public key from the points on the curve (SECP256K1 or P-256)
How can I derive Tezos public key from x,y points on the curve (either SECP256K1 or P-256)?
For example for Ethereum you can compute this using Keccak-256 on the [x,y].
The address is then obtained by taking the last 40 bytes (20 hex chars) and prefixing it with 0x for a total of 42 bytes.
address
add a comment |
How can I derive Tezos public key from x,y points on the curve (either SECP256K1 or P-256)?
For example for Ethereum you can compute this using Keccak-256 on the [x,y].
The address is then obtained by taking the last 40 bytes (20 hex chars) and prefixing it with 0x for a total of 42 bytes.
address
add a comment |
How can I derive Tezos public key from x,y points on the curve (either SECP256K1 or P-256)?
For example for Ethereum you can compute this using Keccak-256 on the [x,y].
The address is then obtained by taking the last 40 bytes (20 hex chars) and prefixing it with 0x for a total of 42 bytes.
address
How can I derive Tezos public key from x,y points on the curve (either SECP256K1 or P-256)?
For example for Ethereum you can compute this using Keccak-256 on the [x,y].
The address is then obtained by taking the last 40 bytes (20 hex chars) and prefixing it with 0x for a total of 42 bytes.
address
address
asked 7 hours ago
Andrew PaulicekAndrew Paulicek
864
864
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
Public keys in Tezos are stored in compressed form:
<1 byte prefix>|X
- Prefix is b'x02' if Y is even, b'x03' otherwise, now you have a compressed key of 33 bytes long;
- Add tezos prefix b'x03xfexe2V' for secp256k1, b'x03xb2x8bx7f' for p256;
- Encode with Base58 algo with checksum.
Checkout pytezos.crypto sources for implementation examples.
New contributor
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "698"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftezos.stackexchange.com%2fquestions%2f621%2fhow-to-derive-the-tezos-public-key-from-the-points-on-the-curve-secp256k1-or-p%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Public keys in Tezos are stored in compressed form:
<1 byte prefix>|X
- Prefix is b'x02' if Y is even, b'x03' otherwise, now you have a compressed key of 33 bytes long;
- Add tezos prefix b'x03xfexe2V' for secp256k1, b'x03xb2x8bx7f' for p256;
- Encode with Base58 algo with checksum.
Checkout pytezos.crypto sources for implementation examples.
New contributor
add a comment |
Public keys in Tezos are stored in compressed form:
<1 byte prefix>|X
- Prefix is b'x02' if Y is even, b'x03' otherwise, now you have a compressed key of 33 bytes long;
- Add tezos prefix b'x03xfexe2V' for secp256k1, b'x03xb2x8bx7f' for p256;
- Encode with Base58 algo with checksum.
Checkout pytezos.crypto sources for implementation examples.
New contributor
add a comment |
Public keys in Tezos are stored in compressed form:
<1 byte prefix>|X
- Prefix is b'x02' if Y is even, b'x03' otherwise, now you have a compressed key of 33 bytes long;
- Add tezos prefix b'x03xfexe2V' for secp256k1, b'x03xb2x8bx7f' for p256;
- Encode with Base58 algo with checksum.
Checkout pytezos.crypto sources for implementation examples.
New contributor
Public keys in Tezos are stored in compressed form:
<1 byte prefix>|X
- Prefix is b'x02' if Y is even, b'x03' otherwise, now you have a compressed key of 33 bytes long;
- Add tezos prefix b'x03xfexe2V' for secp256k1, b'x03xb2x8bx7f' for p256;
- Encode with Base58 algo with checksum.
Checkout pytezos.crypto sources for implementation examples.
New contributor
New contributor
answered 4 hours ago
Michael ZaikinMichael Zaikin
713
713
New contributor
New contributor
add a comment |
add a comment |
Thanks for contributing an answer to Tezos Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftezos.stackexchange.com%2fquestions%2f621%2fhow-to-derive-the-tezos-public-key-from-the-points-on-the-curve-secp256k1-or-p%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown