0

The verification key is referred to as public. Could it be derived from the bech32 address? e.g addr1... -> Pubkey [cborHex]

3
  • This has been answered before here
    – Will
    Aug 26, 2022 at 14:07
  • Incorrect. I do not need the pubKeyHash, rather the PubKey itself
    – Fourzin
    Aug 26, 2022 at 14:40
  • not directly, but there are some PubKeys in metadata or Plutus datums, you can scrape the blockchain and build an incomplete dictionary Sep 1, 2022 at 22:10

2 Answers 2

1

No, the public key (also verification key) cannot be derived from a bech32 address. Only the hash of the public key is encoded in the address.

The verification key is secret as long as it is not used to spend some value from one of the corresponding addresses. When such a transaction is onchain, then you can extract the public key from it (1)(2).

5
  • What is the purpose of PubKey? I thought it can be used to verify the signing key (skey). I thought PubKey itself is s type of hashing of skey
    – Fourzin
    Aug 26, 2022 at 15:01
  • The public key is derived from the signing key, and is used to verify the authenticity of a signature. To obscure the public key onchain a hash of it is used in the addresses. A reason to use this is to have a fixed length to represent things. Both a script hash and a public key hash have the same lenght.
    – Fermat
    Aug 26, 2022 at 16:30
  • Where can I learn about how the verification of signing a tx is done. Say there is one untxo as input, and one signing key given. What is the algorithmic procedure that is done on utxo hash plus skey that guarantees legit signature?
    – Fourzin
    Aug 26, 2022 at 16:47
  • Onchain you can use github.com/input-output-hk/plutus/blob/…. What is your goal?
    – Fermat
    Aug 26, 2022 at 16:54
  • My goal is to educate myself more about Cardano. I would like to have an understanding of high verification is done. This will widen my knowledge about the chain.
    – Fourzin
    Aug 26, 2022 at 17:06
0

As Fermat said, the Bech32 address only contains the PubKey Hash, and therefore we can't reverse it to obtain the PubKey.

The purpose of PubKey is to act as Verify Key, that will verify the authenticity of a signed transaction with its signature

You can refer to this video by Andrew, it will explain how addresses work in Cardano

Video: Cardano Addresses

4
  • Hello, Andrew's videos are insightful. I am aware that only the hash of the PubKey could be derived from bech32. Ok, maybe an alternative answer would be how can the witness set be retrieved for a given transaction? After all, BP nodes need to verify Tx's and PubKey purpose is to be shared to validate the owners signature
    – Fourzin
    Aug 27, 2022 at 13:21
  • I haven't found the answer to that either. My assumption is that every time we submit a Tx, we send our SignedTx and our PubKey. I assume you already know how UTxO works, so now the BP node could check the input UTxO address, and compare it with our provided PubKey. If the hash of that PubKey matched, now the PubKey is used to verify the SignedTx. The design decision for this architecture would be to reduce data stored in the blockchain, because we don't have the full PubKey stored in it, just the hash of it Aug 28, 2022 at 23:50
  • Transactions on chain only have the input utxos and the recipient outputs. I can not find where on chain does the pubkey get stored and attached to a transaction neither its hash
    – Fourzin
    Aug 31, 2022 at 8:31
  • The address IS the PubKey hash, refer to CIP-19. For example, in this transaction we can get the PubKeyHash through bech32 decoding which is addr1q85cjaunup5pjnfuup244v78ccan2mykhhm346fqcf9heqqh8l0k78a59nm52ahfkxpx5r2sucupdaqvdxfk03fqp9kqqagfvq --> 01e9897793e068194d3ce0555ab3c7c63b356c96bdf71ae920c24b7c80173fdf6f1fb42cf74576e9b1826a0d50e63816f40c699367c520096c. Take the first 56 character after 01, and you get the PubKeyHash Sep 1, 2022 at 13:42

Your Answer

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

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