From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by c5ff346549e7 (Postfix) with ESMTP id 699FE5D5 for ; Sun, 15 Apr 2018 18:26:51 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.48,455,1517871600"; d="scan'208";a="322942712" Received: from sympa.inria.fr ([193.51.193.213]) by mail2-relais-roc.national.inria.fr with ESMTP; 15 Apr 2018 20:26:49 +0200 Received: by sympa.inria.fr (Postfix, from userid 20132) id B7C3182444; Sun, 15 Apr 2018 20:26:49 +0200 (CEST) Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id 132BB8240C for ; Sun, 15 Apr 2018 20:26:39 +0200 (CEST) Authentication-Results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=forum@x9c.fr; spf=Pass smtp.mailfrom=forum@x9c.fr; spf=None smtp.helo=postmaster@14.mo4.mail-out.ovh.net IronPort-PHdr: =?us-ascii?q?9a23=3AkylJpRAECwSrYex0z8V6UyQJP3N1i/DPJgcQr6Af?= =?us-ascii?q?oPdwSPv+p8bcNUDSrc9gkEXOFd2Cra4c0KyO6+jJYi8p2d65qncMcZhBBVcuqP?= =?us-ascii?q?49uEgeOvODElDxN/XwbiY3T4xoXV5h+GynYwAOQJ6tL1LdrWev4jEMBx7xKRR6?= =?us-ascii?q?JvjvGo7Vks+7y/2+94fcbglUijexe69+IAmrpgjNq8cahpdvJLwswRXTuHtIfO?= =?us-ascii?q?pWxWJsJV2Nmhv3+9m98p1+/SlOovwt78FPX7n0cKQ+VrxYES8pM3sp683xtBnM?= =?us-ascii?q?VhWA630BWWgLiBVIAgzF7BbnXpfttybxq+Rw1DWGMcDwULs5Xymp4aV2Rx/ykC?= =?us-ascii?q?oIKzE2/nzXhMNygqxVrxGvpxJhzYDTe4yVKON+fqbBcdMaWWZMXMBcXDFBDIOm?= =?us-ascii?q?aIsPCvIMMehWr4n6vVsOsB6+CBKjBe7r1jBEnHH23bc03+88FgzG0gsgH8gTsH?= =?us-ascii?q?TRt9j0O6MfXvyvwKnG1zXOdvVb0irz5ojPdxAuu/CMXbRofMrW00kgDR/KjlGO?= =?us-ascii?q?poD/IzyV0eENvm6G5ORjTeKik2EqpgBrrjSy2sshipPFi40Jxlze6yl0xJ45Kc?= =?us-ascii?q?OiREJlYdOoCpVduiOAO4drXs8vQWdlszsgxLIco560Zi0KxYwnxxHBb/yHdJCF?= =?us-ascii?q?7g/sWeqLJDd4g31odKi6hxmo8EigzvTwVs6p0FZWtCZFlcfMtnAX2xzV9MeHVu?= =?us-ascii?q?Nx/kan2TmRywDe8u5JLEEumabGN5IswqQ8m5UPvUjZACP7nF36jKqMeUUl/uio?= =?us-ascii?q?5f7nYrLjppKEOY90jRv+MrkrmsGkDuU1NhQBU3KV+eSmzLHj51H2QK1Wjv0qla?= =?us-ascii?q?nUqIzVKt4epq69GgNV1ocj6w2jDzq9y9QZnXwHLEpfdx6djojpPUvOIPHiAvul?= =?us-ascii?q?jVSsimQj+/eTO6DiD47NZmTCj777fP4p7lNfxREz0dFA7ohVTLAAIe72ckD0vd?= =?us-ascii?q?3cSBQ+Nlrn7fzgDYA32IQERGenEv6Sdq3I+xfc6OU1PuykdN4e/jjnfat2r8Xy?= =?us-ascii?q?hGM0zAdONZKi2oEaPSjhT6ZWZn6BaH+pue8vVGIDvw4wVuvv2A+SADUVaWzgBv?= =?us-ascii?q?tgtAF+M5qvCML4fq7omKaIjHWrT5YQaHoUUgnRQ0etTJ2NXrI3UAzXIsJllWZZ?= =?us-ascii?q?B+H9DYomiVervQ7+jr16MqzT5C1es5//hoB4?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0BKAQAFmdNahx0oaS5cHQEBBQELAYQjA?= =?us-ascii?q?3cog2aXB4EPgyuDO419CyOEYAIIgiUZBwEENBQBAgEBAQEBAQEBARMBAQEIDQk?= =?us-ascii?q?IKCMMgjUigkwBAgIBI1YFCwsaAiYCAiE2BhOEdQMNDAukaYIchwMNZ0SCL4EJh?= =?us-ascii?q?mBxgT+BMoFpUS6CT0IBAoFfgwAweE1fApBhhlcsCAJuhGmFZYpEhQSJLD+DY4J?= =?us-ascii?q?RgSUzgXN0ETsqAYIYCTWBcINOhCCGM24BjmMBAQ?= X-IPAS-Result: =?us-ascii?q?A0BKAQAFmdNahx0oaS5cHQEBBQELAYQjA3cog2aXB4EPgyu?= =?us-ascii?q?DO419CyOEYAIIgiUZBwEENBQBAgEBAQEBAQEBARMBAQEIDQkIKCMMgjUigkwBA?= =?us-ascii?q?gIBI1YFCwsaAiYCAiE2BhOEdQMNDAukaYIchwMNZ0SCL4EJhmBxgT+BMoFpUS6?= =?us-ascii?q?CT0IBAoFfgwAweE1fApBhhlcsCAJuhGmFZYpEhQSJLD+DY4JRgSUzgXN0ETsqA?= =?us-ascii?q?YIYCTWBcINOhCCGM24BjmMBAQ?= X-IronPort-AV: E=Sophos;i="5.48,455,1517871600"; d="scan'208";a="322942661" Received: from 14.mo4.mail-out.ovh.net ([46.105.40.29]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Apr 2018 20:26:35 +0200 Received: from player762.ha.ovh.net (unknown [10.109.122.86]) by mo4.mail-out.ovh.net (Postfix) with ESMTP id C5590164531 for ; Sun, 15 Apr 2018 20:26:34 +0200 (CEST) Received: from [192.168.1.4] (unknown [2.25.37.107]) (Authenticated sender: forum@x9c.fr) by player762.ha.ovh.net (Postfix) with ESMTPSA id 64802E0099; Sun, 15 Apr 2018 20:26:32 +0200 (CEST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) From: "forum@x9c.fr" In-Reply-To: Date: Sun, 15 Apr 2018 19:26:31 +0100 Cc: Xavier Clerc , caml-list@inria.fr Content-Transfer-Encoding: quoted-printable Message-Id: <747DAA0C-B1C9-4ECF-A3D2-3AEBF2D42604@x9c.fr> References: <6AE89499-0C31-4798-BC90-B5712709E405@x9c.fr> To: mukesh tiwari X-Mailer: Apple Mail (2.3124) X-Ovh-Tracer-Id: 11050144638453482462 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtgedrieeigdduudekucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecufedttdenuc Subject: Re: [Caml-list] Calling Java function from OCaml Reply-To: "forum@x9c.fr" X-Loop: caml-list@inria.fr X-Sequence: 16814 Errors-to: caml-list-owner@inria.fr Precedence: list Precedence: bulk Sender: caml-list-request@inria.fr X-no-archive: yes List-Id: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: > Le 13 avr. 2018 =C3=A0 04:01, mukesh tiwari a =C3=A9crit : >=20 > Hi Xavier, and Gabriel, > Thank you very much for reply. Let me give me general understanding of my= project. I am trying to count encrypted ballots (Additive Elgamal) which i= s matrix of ciphertext. We multiply these ballots (matrices) point wise and= decrypt it to get additive final value in plaintext [2]. For encryption, d= ecryption and zero knowledge proof, we are using unicrypt library [3]. You = can see the encryption part in Coq as Axiom [4] and will be realized by jav= a functions from unicrypt library in extracted OCaml code [5]. We will rep= lace the Z [6] with big_int in OCaml.=20 Thanks for sharing the details. I am afraid OCaml-Java might not be a good fit, for at least two (related) reasons: - the implementation of `big_int` that ships with OCaml-Java has been very lightly tested, and I would not be surprised if it turned out to be buggy; - if you do not replace type `z` with `big_int` your code will be unbearably slow (it, of course, applies to both ocamlopt- and ocamljava-compiled code, but the price of allocating short-lived object is significantly higher on the JVM). Obviously, another possibility would be to use BigIntegers from the JDK [1]. It looks like the class contains all the primitives you need (I only skimmed over `lib.ml`, though). Best regards, Xavier Clerc [1] https://docs.oracle.com/javase/7/docs/api/java/math/BigInteger.html --=20 Caml-list mailing list. Subscription management and archives: https://sympa.inria.fr/sympa/arc/caml-list Beginner's list: http://groups.yahoo.com/group/ocaml_beginners Bug reports: http://caml.inria.fr/bin/caml-bugs=