Skip to content
This repository was archived by the owner on Jul 21, 2023. It is now read-only.

Fix Ed25519 key ID generation (fixes ipfs/js-ipfs#3591) #185

Closed
wants to merge 2 commits into from
Closed

Fix Ed25519 key ID generation (fixes ipfs/js-ipfs#3591) #185

wants to merge 2 commits into from

Conversation

nadimkobeissi
Copy link
Contributor

Hello,

This commit proposes what appears to be a working and sane fix for the issue documented at ipfs/js-ipfs#3591.

I'd appreciate expert review and subsequent integration into the codebase.

@TheDiscordian
Copy link

Linter is angry multibase is declared but not used now.

@nadimkobeissi
Copy link
Contributor Author

nadimkobeissi commented Mar 15, 2021

Linter is angry multibase is declared but not used now.

@TheDiscordian Fixed in 22be691.

@jacobheun
Copy link
Contributor

Thanks for the PR!

I've merged this via bc33769 to include a fix for the existing tests that weren't catching this. The output is now more strictly checked. I'll release a patch for this shortly.

@jacobheun jacobheun closed this Mar 15, 2021
jacobheun pushed a commit that referenced this pull request Mar 17, 2021
* Fix Ed25519 PeerID generation

This commit pushes further fixes to the generation of Ed25519 peer IDs,
building upon the discussion in ipfs/js-ipfs#3591 and the subsequent
pull request #185.

The purpose of this new pull request is to harmonize the encoding of
PeerIDs for Ed25519 keys such that the same new format is used
everywhere: peer IDs when assigned upon key generation, peer IDs when
shown via key listing, as well as the peer IDs displayed as IPNS names
when the key is used as the basis for an IPNS record.

Concretely, this changes the peer ID representation of Ed25519 keys from
the `Qm...` format to the newer `1...` format.

The accompanying test has been modified accordingly.

* Satisfy linter
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants