<PackageReference Include="BouncyCastle.Cryptography" Version="2.7.0" />

Org.BouncyCastle.Crypto.Parameters.X448PrivateKeyParameters

X448 private key (RFC 7748). Holds the 56-byte clamped scalar used in Curve448 Diffie-Hellman.
public static readonly int KeySize

Length in bytes of an X448 private-key scalar (56).

public static readonly int SecretSize

Length in bytes of the shared secret produced by an X448 agreement (56).

Generate a fresh random X448 private key using random.

public X448PrivateKeyParameters(byte[] buf)

Construct from a 56-byte scalar buffer.

public X448PrivateKeyParameters(byte[] buf, int off)

Construct from buf at off; reads KeySize bytes.

Read the 56-byte scalar from input.

public void Encode(byte[] buf, int off)

Write the 56-byte scalar into buf at off.

Compute the public key (u-coordinate) corresponding to this scalar.

public void GenerateSecret(X448PublicKeyParameters publicKey, byte[] buf, int off)

Perform an X448 Diffie-Hellman agreement against publicKey and write the resulting SecretSize-byte shared secret into buf starting at off.

public byte[] GetEncoded()

Return a fresh copy of the 56-byte scalar.