From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id 90FB3BC57 for ; Thu, 22 Jul 2010 15:25:03 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Aq0CAHLjR0zZSMDqkWdsb2JhbACTB4xwFQEBAQEJCwoHEQMfwUqFNgQ X-IronPort-AV: E=Sophos;i="4.55,243,1278280800"; d="scan'208";a="54619967" Received: from fmmailgate03.web.de ([217.72.192.234]) by mail3-smtp-sop.national.inria.fr with ESMTP; 22 Jul 2010 15:25:03 +0200 Received: from smtp04.web.de ( [172.20.0.225]) by fmmailgate03.web.de (Postfix) with ESMTP id D293415C166CB; Thu, 22 Jul 2010 15:24:29 +0200 (CEST) Received: from [78.43.204.177] (helo=frosties.localdomain) by smtp04.web.de with asmtp (TLSv1:AES256-SHA:256) (WEB.DE 4.110 #4) id 1ObvlF-0001JQ-00; Thu, 22 Jul 2010 15:24:29 +0200 Received: from mrvn by frosties.localdomain with local (Exim 4.72) (envelope-from ) id 1ObvlF-0004xc-04; Thu, 22 Jul 2010 15:24:29 +0200 From: Goswin von Brederlow To: Sylvain Le Gall Cc: caml-list@inria.fr Subject: Re: [Caml-list] Re: Cryptokit and HMAC-SHA256 References: <317672.81389.qm@web111509.mail.gq1.yahoo.com> <87vd87ykrt.fsf@frosties.localdomain> Date: Thu, 22 Jul 2010 15:24:28 +0200 In-Reply-To: (Sylvain Le Gall's message of "Thu, 22 Jul 2010 08:49:30 +0000 (UTC)") Message-ID: <87y6d3myyb.fsf@frosties.localdomain> User-Agent: Gnus/5.110009 (No Gnus v0.9) XEmacs/21.4.22 (linux, no MULE) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: goswin-v-b@web.de X-Sender: goswin-v-b@web.de X-Provags-ID: V01U2FsdGVkX1+0nQLU7Tkt4APztM2HFpRJchPBty6+WNevrqye ZWjWMtdRstxtLGugcKqjS81PxANlckhsUBwPGyDC1sp0ARUH2s mcMLNtM6A= X-Spam: no; 0.00; le-gall:01 cheers:01 patching:01 bigarrays:01 patching:01 bigarray:01 4231:98 mfg:98 wrote:01 cryptokit:01 cryptokit:01 heap:01 caml-list:01 functions:01 writes:01 Sylvain Le Gall writes: > Hello, > > On 22-07-2010, Goswin von Brederlow wrote: >> Dario Teixeira writes: >> >>> Hi, >>> >>>> If you decide to code the solution and provide the patch, I will be >>>> happy to apply it to cryptokit (if the main author of cryptokit accepts >>>> it, of course). >>> >>> I'm attaching the patches adding support for HMAC-SHA256 and HMAC-RIPEMD160 >>> (I don't need the latter, but for the sake of completeness it seemed silly >>> not to support it as well). Note that these are *very* straightforward >>> patches -- kudos to Xavier for making Cryptokit so easy to extend. >>> >>> The caveat is that I'm not a cryptographer. I did, however, verify that >>> these new HMACs pass all the test cases listed in RFC4231 (for HMAC-SHA256) >>> and RFC2286 (for HMAC-RIPEMD160). >>> >>> Thanks for your attention! >>> Cheers, >>> Dario Teixeira >> >> While you are patching cryptokit anyway would it be possible to also add >> functions to work on Bigarrays? >> > > Well in fact, HMAC-SHA256 and HMAC-RIPEMD160 has been implemented in > the source code, but never released. So no patching involved. > >> One huge advantage of bigarray is that the data region is allocated >> outside the GC heap and will never move. That means one can use >> enter_blocking_section() / leave_blocking_section() while calculating >> the checksum for a block of data. For multithreaded applications that >> can speed up the program by the number of cores present. >> > > Submit a feature request with as much data as possible on the BTS: > https://forge.ocamlcore.org/tracker/?group_id=133 > > Regards, > Sylvain Le Gall Submitted. MfG Goswin