libp2p / libp2p/specs

noise/: Static key signature does not depend on a peer's challenge

Open
#355 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
No language data
Stars
1.8k
Forks
320
Avg merge
11d 15h
Merged PRs (30d)
1

Description

If an attacker is able to sign a static public key once then they will be able to impersonate
the identity key owner forever. This may occur if the attacker has temporary access to a signing module,
or if the static key is otherwise compromised.

Libp2p-noise extends the original Noise XX pattern in the following way:

  • The key management model is extended by adding libp2p identity keys
  • Noise static keys are not used in the traditional sense (they are something in between ephemeral
    and static keys): implementations may generate a new static keypair for each new session or a
    single static keypair may be generated when libp2p-noise is initialized and used for all sessions
  • To authenticate the static key used in the Noise XX handshake, libp2p-noise includes in the handshake protocol a signature of the static public key computed with the identity private key: in Noise
    terms, payload = Sig(id, s), where id is the sender's identity private key and s is the senders's static
    public key.

That said, the signature is computed over the sender's static public key without any input from the
corresponding peer. So, the used static key authentication mechanism violates the basic authenticated
key agreement protocol design principle: Ephemeral leakage should not allow for long-term impersonation.

The initiator does not provide any challenge (e.g., ephemeral key) for signing and sender always
signs its static key without any random input from the peer. Actually, the sender just prooves that he
or she has a signature over the static public key, but not access to the identity private key. For example,
if an attacker finds a triple (s_pub, s_priv, Sig(id, s_pub)) for the identity key id of the target user then he
or she will be able to impersonate that user without any limitation in future.

Contributor guide

No contributing guide indexed for this repository

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

The issue names no files, tests, or entry points. Start by reviewing the libp2p-noise Noise XX handshake and the signature payload described here; done requires a decided protocol change that prevents static-key authentication from being reusable across sessions.

Written by the indexing model from the issue text.

Assessment

Tech stack
cryptography
Domain
cryptography, networking, security
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.