From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr 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 02447BC57 for ; Thu, 22 Jul 2010 10:49:49 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AjQGABejR0xQW+UMgWdsb2JhbACTBzCMPxUBARYiIsBxhTYEh0iBEQ X-IronPort-AV: E=Sophos;i="4.55,242,1278280800"; d="scan'208";a="54606435" Received: from lo.gmane.org ([80.91.229.12]) by mail3-smtp-sop.national.inria.fr with ESMTP; 22 Jul 2010 10:49:49 +0200 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1ObrTQ-0006Ju-IP for caml-list@inria.fr; Thu, 22 Jul 2010 10:49:48 +0200 Received: from ks368928.kimsufi.com ([94.23.39.26]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 22 Jul 2010 10:49:48 +0200 Received: from sylvain by ks368928.kimsufi.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 22 Jul 2010 10:49:48 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: caml-list@inria.fr From: Sylvain Le Gall Subject: Re: Cryptokit and HMAC-SHA256 Date: Thu, 22 Jul 2010 08:49:30 +0000 (UTC) Message-ID: References: <317672.81389.qm@web111509.mail.gq1.yahoo.com> <87vd87ykrt.fsf@frosties.localdomain> X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: ks368928.kimsufi.com User-Agent: slrn/pre1.0.0-11 (Linux) X-Spam: no; 0.00; le-gall:01 cheers:01 patching:01 bigarrays:01 patching:01 bigarray:01 4231:98 wrote:01 cryptokit:01 cryptokit:01 heap:01 functions:01 writes:01 data:02 data:02 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