Skip to content

Support for Ed25519 → X25519 Key Conversion #393

@wnagrodzki

Description

@wnagrodzki

New API Proposal: Ed25519 → X25519 Key Conversion

Motivation:

This conversion is necessary for the X3DH Key Agreement Protocol, which is used to establish end-to-end encrypted sessions using the Double Ratchet algorithm.

Importance:

The current package does not appear to expose functionality for performing this conversion.
I was forced to use libsodium:

crypto_sign_ed25519_pk_to_curve25519(x25519_pk, ed25519_pk);
crypto_sign_ed25519_sk_to_curve25519(x25519_sk, ed25519_skpk);

Proposed API:

Curve25519.KeyAgreement.PrivateKey {
    
    init(unsafeFromSigningPrivateKey key: Curve25519.Signing.PrivateKey) {...}
}

Curve25519.KeyAgreement.PublicKey {
    
    init(unsafeFromSigningPublicKey key: Curve25519.Signing.PublicKey) {...}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions