PublicKeyAlgorithmTags#ECDH or PublicKeyAlgorithmTags#ECDSA.
The specific curve is identified by providing an OID.
Regarding X25519, X448, consider the following:
ECDH keys using curve448 are unspecified.
ECDH secret keys using curve25519 use big-endian MPI encoding, contrary to X25519SecretBCPGKey which uses
native encoding.
Modern implementations use dedicated key types X25519SecretBCPGKey, X448SecretBCPGKey along with
dedicated algorithm tags PublicKeyAlgorithmTags#X25519, PublicKeyAlgorithmTags#X448.
If you want to be compatible with legacy applications however, you should use this class instead.
Note though, that for v6 keys, X25519SecretBCPGKey or X448SecretBCPGKey MUST be used for X25519, X448.
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public byte[] | getEncoded()
Overrides org. Implements org. return the standard PGP encoding of the key. |
| public String | |
| public BigInteger |
| x | back to summary |
|---|---|
| pack-priv MPInteger x | |
| ECSecretBCPGKey | back to summary |
|---|---|
| public ECSecretBCPGKey(BCPGInputStream in) throws IOException | |
| ECSecretBCPGKey | back to summary |
|---|---|
| public ECSecretBCPGKey(BigInteger x) | |
| encode | back to summary |
|---|---|
| public void encode(BCPGOutputStream out) throws IOException Implements abstract org. | |
| getEncoded | back to summary |
|---|---|
| public byte[] getEncoded() Overrides org. Implements org. return the standard PGP encoding of the key.
| |
| getFormat | back to summary |
|---|---|
| public String getFormat() Implements org. return "PGP"
| |
| getX | back to summary |
|---|---|
public BigInteger getX()
| |