@Test
    void x25519_public_key_serialization_roundtrip_maintains_original_structure() {
        var pubHex = "8520f0098930a754748b7ddcb43ef75a0dbf3a0d26381af4eba4a98eaa9b4e6a";
        var pub = xecPubFromHex(pubHex);
        assertEquals(pubHex, xecHexFromPub(pub));

        // Base 64
        var pubB64 = KeyUtils.toBase64EncodedX25519PublicKey(pub);
        var pub2 = KeyUtils.fromBase64EncodedX25519PublicKey(pubB64);
        assertEquals(pubHex, xecHexFromPub(pub2));

        // Base 58
        var pubB58 = KeyUtils.toBase58EncodedX25519PublicKey(pub);
        var pub3 = KeyUtils.fromBase58EncodedX25519PublicKey(pubB58);
        assertEquals(pubHex, xecHexFromPub(pub3));
    }
RFC 7748 Section 6.1, Curve25519 Diffie-Hellman test vector
security-utils/src/test/java/com/yahoo/security/KeyUtilsTest.java