Bouncy Castle Cryptography Library 1.81

org.bouncycastle.bcpg
Class X25519SecretBCPGKey

java.lang.Object
  extended byorg.bouncycastle.bcpg.BCPGObject
      extended byorg.bouncycastle.bcpg.OctetArrayBCPGKey
          extended byorg.bouncycastle.bcpg.X25519SecretBCPGKey
All Implemented Interfaces:
BCPGKey, org.bouncycastle.util.Encodable

public class X25519SecretBCPGKey
extends OctetArrayBCPGKey

Secret key of type PublicKeyAlgorithmTags.X25519. This type was introduced with RFC9580 and can be used with v4, v6 keys. Note however, that legacy implementations might not understand this key type yet. For a key type compatible with legacy v4 implementations, see ECSecretBCPGKey with PublicKeyAlgorithmTags.ECDH. Note: Contrary to ECSecretBCPGKey using PublicKeyAlgorithmTags.ECDH, which uses big-endian MPI encoding to encode the secret key material, X25519SecretBCPGKey uses native little-endian encoding.

See Also:
OpenPGP - Algorithm-Specific Part for X25519 Keys

Field Summary
static int LENGTH
           
 
Constructor Summary
X25519SecretBCPGKey(BCPGInputStream in)
           
X25519SecretBCPGKey(byte[] key)
           
 
Methods inherited from class org.bouncycastle.bcpg.OctetArrayBCPGKey
encode, getEncoded, getFormat, getKey
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LENGTH

public static final int LENGTH
See Also:
Constant Field Values
Constructor Detail

X25519SecretBCPGKey

public X25519SecretBCPGKey(BCPGInputStream in)
                    throws java.io.IOException

X25519SecretBCPGKey

public X25519SecretBCPGKey(byte[] key)

Bouncy Castle Cryptography Library 1.81