test_class.file: java_src/src/test/java/com/google/crypto/tink/subtle/X25519Test.java
test_class.identifier: X25519Test
test_case.body: @Test
    public void testPublicFromPrivateWithRfcTestVectors() throws Exception {
      byte[] out =
          X25519.publicFromPrivate(
              TestUtil.hexDecode("77076d0a7318a57d3c16c17251b26645df4c2f87ebc0992ab177fba51db92c2a"));
      assertEquals(
          "8520f0098930a754748b7ddcb43ef75a0dbf3a0d26381af4eba4a98eaa9b4e6a",
          TestUtil.hexEncode(out));
  
      out =
          X25519.publicFromPrivate(
              TestUtil.hexDecode("5dab087e624a8a4b79e17f8b83800ee66f3bb1292618b6fd1c2f8b27ff88e0eb"));
      assertEquals(
          "de9edb7d7b7dc1b4d35b61c2ece435373f8343c85b78674dadfc7e146f882b4f",
          TestUtil.hexEncode(out));
    }
test_case.class_method_signature: X25519Test.testPublicFromPrivateWithRfcTestVectors()
test_case.full_signature: @Test public void testPublicFromPrivateWithRfcTestVectors()
test_case.identifier: testPublicFromPrivateWithRfcTestVectors
test_case.invocations: publicFromPrivate hexDecode assertEquals hexEncode publicFromPrivate hexDecode assertEquals hexEncode
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testPublicFromPrivateWithRfcTestVectors()
focal_class.file: java_src/src/main/java/com/google/crypto/tink/subtle/X25519.java
focal_class.identifier: X25519
focal_class.class_method_signature: X25519.generatePrivateKey()
focal_class.full_signature: @SuppressWarnings("NarrowingCompoundAssignment") public static byte[] generatePrivateKey()
focal_class.identifier: generatePrivateKey
focal_class.modifiers: @SuppressWarnings("NarrowingCompoundAssignment") public static
focal_class.parameters: ()
focal_class.return: byte[]
focal_class.signature: byte[] generatePrivateKey()
focal_class.class_method_signature: X25519.computeSharedSecret(byte[] privateKey, byte[] peersPublicValue)
focal_class.full_signature: @SuppressWarnings("NarrowingCompoundAssignment") public static byte[] computeSharedSecret(byte[] privateKey, byte[] peersPublicValue)
focal_class.identifier: computeSharedSecret
focal_class.modifiers: @SuppressWarnings("NarrowingCompoundAssignment") public static
focal_class.parameters: (byte[] privateKey, byte[] peersPublicValue)
focal_class.return: byte[]
focal_class.signature: byte[] computeSharedSecret(byte[] privateKey, byte[] peersPublicValue)
focal_class.class_method_signature: X25519.publicFromPrivate(byte[] privateKey)
focal_class.full_signature: public static byte[] publicFromPrivate(byte[] privateKey)
focal_class.identifier: publicFromPrivate
focal_class.modifiers: public static
focal_class.parameters: (byte[] privateKey)
focal_class.return: byte[]
focal_class.signature: byte[] publicFromPrivate(byte[] privateKey)
focal_method.body: public static byte[] publicFromPrivate(byte[] privateKey) throws InvalidKeyException {
      if (privateKey.length != Field25519.FIELD_LEN) {
        throw new InvalidKeyException("Private key must have 32 bytes.");
      }
      byte[] base = new byte[Field25519.FIELD_LEN];
      base[0] = 9;
      return computeSharedSecret(privateKey, base);
    }
focal_method.class_method_signature: X25519.publicFromPrivate(byte[] privateKey)
focal_method.full_signature: public static byte[] publicFromPrivate(byte[] privateKey)
focal_method.identifier: publicFromPrivate
focal_method.invocations: computeSharedSecret
focal_method.modifiers: public static
focal_method.parameters: (byte[] privateKey)
focal_method.return: byte[]
focal_method.signature: byte[] publicFromPrivate(byte[] privateKey)