java.lang.Object
net.i2p.crypto.x25519.X25519DH
DH wrapper around Noise's Curve25519 with I2P types.
Field Summary
Constructor Summary
ConstructorsMethod Summary
All MethodsModifier and TypeMethodDescriptionstatic SessionKeydh(PrivateKey priv, PublicKey pub) Curve25519 Diffie-Hellman: computes the shared secret for a private/public key pair.
Field Details
TYPE
The encryption type this engine implements.
Constructor Details
X25519DH
private X25519DH()Utility class, not intended for instantiation.
Method Details
dh
Curve25519 Diffie-Hellman: computes the shared secret for a private/public key pair.- Parameters:
priv- the local ECIES_X25519 private key, the scalar of the Curve25519 oppub- MUST have MSB high bit cleared, i.e. pub.getData()[31] & 0x80 == 0- Returns:
- ECIES_X25519
- Throws:
IllegalArgumentException- if not ECIES_X25519 or on low-order input see RFC 7748