private static ProtoParametersSerialization serializeParameters(AesGcmParameters parameters)
      throws GeneralSecurityException {
    validateParameters(parameters);
    return ProtoParametersSerialization.create(
        KeyTemplate.newBuilder()
            .setTypeUrl(TYPE_URL)
            .setValue(
                com.google.crypto.tink.proto.AesGcmKeyFormat.newBuilder()
                    .setKeySize(parameters.getKeySizeBytes())
                    .build()
                    .toByteString())
            .setOutputPrefixType(toProtoOutputPrefixType(parameters.getVariant()))
            .build());
  }
Current implementation restricts IV size to 12 bytes
java_src/src/main/java/com/google/crypto/tink/aead/internal/AesGcmProtoSerialization.java