public class ECDHPublicBCPGKey extends ECPublicBCPGKey
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.Constructor and Description |
---|
ECDHPublicBCPGKey(org.bouncycastle.asn1.ASN1ObjectIdentifier oid,
java.math.BigInteger point,
int hashAlgorithm,
int symmetricKeyAlgorithm) |
ECDHPublicBCPGKey(org.bouncycastle.asn1.ASN1ObjectIdentifier oid,
org.bouncycastle.math.ec.ECPoint point,
int hashAlgorithm,
int symmetricKeyAlgorithm) |
ECDHPublicBCPGKey(BCPGInputStream in) |
Modifier and Type | Method and Description |
---|---|
void |
encode(BCPGOutputStream out) |
byte |
getHashAlgorithm() |
byte |
getReserved() |
byte |
getSymmetricKeyAlgorithm() |
getCurveOID, getEncoded, getEncodedPoint, getFormat, readBytesOfEncodedLength
public ECDHPublicBCPGKey(BCPGInputStream in) throws java.io.IOException
in
- the stream to read the packet from.java.io.IOException
public ECDHPublicBCPGKey(org.bouncycastle.asn1.ASN1ObjectIdentifier oid, org.bouncycastle.math.ec.ECPoint point, int hashAlgorithm, int symmetricKeyAlgorithm)
public ECDHPublicBCPGKey(org.bouncycastle.asn1.ASN1ObjectIdentifier oid, java.math.BigInteger point, int hashAlgorithm, int symmetricKeyAlgorithm)
public byte getReserved()
public byte getHashAlgorithm()
public byte getSymmetricKeyAlgorithm()
public void encode(BCPGOutputStream out) throws java.io.IOException
encode
in class ECPublicBCPGKey
java.io.IOException