Ed25519.ExpandedKey (Bouncy Castle Library 1.85 API Specification)
Date: 2026-07-12

org.bouncycastle.math.ec.rfc8032

## Class Ed25519.ExpandedKey

- java.lang.Object
- - org.bouncycastle.math.ec.rfc8032.Ed25519.ExpandedKey

- Enclosing class:
    Ed25519

      public static class Ed25519.ExpandedKey
      extends java.lang.Object

  Methods that work with expanded format for private keys (xk/xkOff) i.e. SHA-512(seed).

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `EXPANDED_KEY_SIZE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ExpandedKey()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `expandPrivateKey(byte[] sk, int skOff, byte[] xk, int xkOff)`
    `static void` | `generatePrivateKey(java.security.SecureRandom random, byte[] xk, int xkOff)`
    `static Ed25519.PublicPoint` | `generatePublicKey(byte[] xk, int xkOff)`
    `static void` | `generatePublicKey(byte[] xk, int xkOff, byte[] pk, int pkOff)`
    `static void` | `prune(byte[] xk, int xkOff)`
    `static void` | `sign(byte[] xk, int xkOff, byte[] pk, int pkOff, byte[] m, int mOff, int mLen, byte[] sig, int sigOff)`
    `static void` | `sign(byte[] xk, int xkOff, byte[] m, int mOff, int mLen, byte[] sig, int sigOff)`

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

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

- - ### Field Detail

    - #### EXPANDED_KEY_SIZE

          public static final int EXPANDED_KEY_SIZE

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### ExpandedKey

          public ExpandedKey()

  - ### Method Detail

    - #### expandPrivateKey

          public static void expandPrivateKey(byte[] sk,
                                              int skOff,
                                              byte[] xk,
                                              int xkOff)

    - #### generatePrivateKey

          public static void generatePrivateKey(java.security.SecureRandom random,
                                                byte[] xk,
                                                int xkOff)

    - #### generatePublicKey

          public static void generatePublicKey(byte[] xk,
                                               int xkOff,
                                               byte[] pk,
                                               int pkOff)

    - #### generatePublicKey

          public static Ed25519.PublicPoint generatePublicKey(byte[] xk,
                                                              int xkOff)

    - #### prune

          public static void prune(byte[] xk,
                                   int xkOff)

    - #### sign

          public static void sign(byte[] xk,
                                  int xkOff,
                                  byte[] m,
                                  int mOff,
                                  int mLen,
                                  byte[] sig,
                                  int sigOff)

    - #### sign

          public static void sign(byte[] xk,
                                  int xkOff,
                                  byte[] pk,
                                  int pkOff,
                                  byte[] m,
                                  int mOff,
                                  int mLen,
                                  byte[] sig,
                                  int sigOff)