FuelLabs / FuelLabs/forc

RUSTSEC-2022-0093: Double Public Key Signing Function Oracle Attack on `ed25519-dalek`

Open
#24 0 comments 0 reactions 0 assignees View on GitHub
forc-wallet
Dominant language
Rust
Stars
0
Forks
0
Avg merge
1d 22h
Merged PRs (30d)
3

Description

> Double Public Key Signing Function Oracle Attack on `ed25519-dalek`

| Details | |
| ------------------- | ---------------------------------------------- |
| Package | `ed25519-dalek` |
| Version | `1.0.1` |
| URL | [https://github.com/MystenLabs/ed25519-unsafe-libs](https://github.com/MystenLabs/ed25519-unsafe-libs) |
| Date | 2022-06-11 |
| Patched versions | `>=2` |

Versions of `ed25519-dalek` prior to v2.0 model private and public keys as
separate types which can be assembled into a `Keypair`, and also provide APIs
for serializing and deserializing 64-byte private/public keypairs.

Such APIs and serializations are inherently unsafe as the public key is one of
the inputs used in the deterministic computation of the `S` part of the signature,
but not in the `R` value. An adversary could somehow use the signing function as
an oracle that allows arbitrary public keys as input can obtain two signatures
for the same message sharing the same `R` and only differ on the `S` part.

Unfortunately, when this happens, one can easily extract the private key.

Revised public APIs in v2.0 of `ed25519-dalek` do NOT allow a decoupled
private/public keypair as signing input, except as part of specially labeled
"hazmat" APIs which are clearly labeled as being dangerous if misused.

See [advisory page](https://rustsec.org/advisories/RUSTSEC-2022-0093.html) for additional details.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.