libp2p / libp2p/py-libp2p

Generate an "ephemeral" static key pair when using Noise

Open
#415 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
624
Forks
256
Avg merge
1d 34m
Merged PRs (30d)
47

Description

Refer: https://github.com/libp2p/py-libp2p/blob/master/libp2p/security/noise/transport.py#L28-L33

If noise_privkey there is None, then this module should generate a random key for further use.

Right now we just end up with an exception trying to do cryptography over None.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in libp2p/security/noise/transport.py at lines 28-33 and trace how the Noise transport uses noise_privkey. The issue is done when a missing noise_privkey results in a random ephemeral key pair being generated and the subsequent cryptographic setup no longer raises an exception.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
networking, security
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.