PublicKeyAlgorithmTags#ECDH.
The specific curve is identified by providing an OID.
Regarding X25519, X448, consider the following:
Modern implementations use dedicated key types X25519PublicBCPGKey, X448PublicBCPGKey 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, X25519PublicBCPGKey or X448PublicBCPGKey MUST be used for X25519, X448.
| Modifier and Type | Field and Description |
|---|---|
| private byte | |
| private byte | |
| private byte |
| Access | Constructor and Description |
|---|---|
| public | |
| public | ECDHPublicBCPGKey(ASN1ObjectIdentifier oid, ECPoint point, int hashAlgorithm, int symmetricKeyAlgorithm)
|
| public | ECDHPublicBCPGKey(ASN1ObjectIdentifier oid, BigInteger point, int hashAlgorithm, int symmetricKeyAlgorithm)
|
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public byte | |
| public byte | |
| public byte | |
| private void | |
| private void |
| hashFunctionId | back to summary |
|---|---|
| private byte hashFunctionId | |
| reserved | back to summary |
|---|---|
| private byte reserved | |
| symAlgorithmId | back to summary |
|---|---|
| private byte symAlgorithmId | |
| ECDHPublicBCPGKey | back to summary |
|---|---|
public ECDHPublicBCPGKey(BCPGInputStream in) throws IOException
| |
| ECDHPublicBCPGKey | back to summary |
|---|---|
| public ECDHPublicBCPGKey(ASN1ObjectIdentifier oid, ECPoint point, int hashAlgorithm, int symmetricKeyAlgorithm) | |
| ECDHPublicBCPGKey | back to summary |
|---|---|
| public ECDHPublicBCPGKey(ASN1ObjectIdentifier oid, BigInteger point, int hashAlgorithm, int symmetricKeyAlgorithm) | |
| encode | back to summary |
|---|---|
| public void encode(BCPGOutputStream out) throws IOException Overrides org. | |
| getHashAlgorithm | back to summary |
|---|---|
| public byte getHashAlgorithm() | |
| getReserved | back to summary |
|---|---|
| public byte getReserved() | |
| getSymmetricKeyAlgorithm | back to summary |
|---|---|
| public byte getSymmetricKeyAlgorithm() | |
| verifyHashAlgorithm | back to summary |
|---|---|
| private void verifyHashAlgorithm() | |
| verifySymmetricKeyAlgorithm | back to summary |
|---|---|
| private void verifySymmetricKeyAlgorithm() | |