Class X25519DH

java.lang.Object
net.i2p.crypto.x25519.X25519DH

public class X25519DH extends Object
DH wrapper around Noise's Curve25519 with I2P types.
Since:
0.9.41
  • Method Details

    • dh

      public static SessionKey dh(PrivateKey priv, PublicKey pub)
      DH
      Parameters:
      pub - 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