org.bouncycastle.math.ec.rfc7748

## Class X25519

- java.lang.Object
- - org.bouncycastle.math.ec.rfc7748.X25519

-     public abstract class X25519
      extends java.lang.Object

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `X25519.Friend`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `POINT_SIZE`
    `static int` | `SCALAR_SIZE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `X25519()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static boolean` | `calculateAgreement(byte[] k, int kOff, byte[] u, int uOff, byte[] r, int rOff)`
    `static void` | `clampPrivateKey(byte[] k)`
    `static void` | `generatePrivateKey(java.security.SecureRandom random, byte[] k)`
    `static void` | `generatePublicKey(byte[] k, int kOff, byte[] r, int rOff)`
    `static void` | `precompute()`
    `static void` | `scalarMult(byte[] k, int kOff, byte[] u, int uOff, byte[] r, int rOff)`
    `static void` | `scalarMultBase(byte[] k, int kOff, byte[] r, int rOff)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### POINT_SIZE

          public static final int POINT_SIZE

      See Also:
        Constant Field Values

    - #### SCALAR_SIZE

          public static final int SCALAR_SIZE

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### X25519

          public X25519()

  - ### Method Detail

    - #### calculateAgreement

          public static boolean calculateAgreement(byte[] k,
                                                   int kOff,
                                                   byte[] u,
                                                   int uOff,
                                                   byte[] r,
                                                   int rOff)

    - #### clampPrivateKey

          public static void clampPrivateKey(byte[] k)

    - #### generatePrivateKey

          public static void generatePrivateKey(java.security.SecureRandom random,
                                                byte[] k)

    - #### generatePublicKey

          public static void generatePublicKey(byte[] k,
                                               int kOff,
                                               byte[] r,
                                               int rOff)

    - #### precompute

          public static void precompute()

    - #### scalarMult

          public static void scalarMult(byte[] k,
                                        int kOff,
                                        byte[] u,
                                        int uOff,
                                        byte[] r,
                                        int rOff)

    - #### scalarMultBase

          public static void scalarMultBase(byte[] k,
                                            int kOff,
                                            byte[] r,
                                            int rOff)