How do you get all of the public keys generated by a canister?

How do you get all of the public keys that the canister generated (by the canister calling ecda_public_key method to the management canister)?

I tried to find an IC method that exposed this information but could not find one in the IC specification.

I also looked at the tECDSA examples and could only find functions that generated a public key, sign, and verify signatures.

Such a function does not exist because it doesn’t make sense given how the feature works. The subnet has one (distributed) master key and for every invocation of the tECDSA functions take a derivation path. Therefore it is not necessary to store a history of all derivations.

If you want to have the history available you need to create the history in your canister on your own

1 Like

Can you please elaborate more on why it is not necessary to store a history of all derivations?

Because it is always possible to re-derive every possible derivation. As long as the master key continues to exist and the derivation path is available the derived key can be recovered.

In contrast, if for every derivation path a new key were generated that is unrelated to the master key, then the system would have to store the key just in case the canister tries to use that derivation path again.