[Haskell-cafe] AES on 32-bit system

Ryan Newton rrnewton at gmail.com
Tue Feb 8 06:37:43 CET 2011


Hi all,

I released the "intel-aes" package which has support for AESNI (and as a
fallback uses the same C code as AES, both with Thomas's
Crypto.Classes.BlockCipher interface).

But it has a long way to go to be portable.  I'm afraid of exactly these
sorts of compiler problems.  For arguments sake, what do you think of
prebuilding .so files for all of the common platforms?  (Especially in the
AESNI case which involves a separate makefile, assembly files, and yasm.)

I've used this strategy in intel-aes-0.1.2.  A stripped linux .so for this
purpose is 26K which doesn't seem so bad.  Of course these
compile/portability problems still need to be solved at least once to build
the libraries ;-).

Anyway this is not really my area so I'm not trying to bump anyones package
out of the way, I just wanted to get something out there with AESNI support
(before I heard Vincent was interested).

Cheers,
  -Ryan





On Sun, Feb 6, 2011 at 12:37 AM, Michael Snoyman <michael at snoyman.com>wrote:

> OK, now I'm sure I tried it before: I tried switching Haskellers over
> to AES with that code change you mention, and it results in runtime
> crashes (I assume segfaults, I didn't really look into it too much).
> So Svein, please disregard my requested code change, it's a bad idea.
>
> Michael
>
> On Fri, Feb 4, 2011 at 8:16 AM, Michael Snoyman <michael at snoyman.com>
> wrote:
> > Wow, I thought I'd tried that before, I guess not. Yes, that compiles,
> > and an initial test seems that it does not break at runtime either.
> > I'll email the author and see if he can make that change.
> >
> > Michael
> >
> > On Fri, Feb 4, 2011 at 8:11 AM, Daniel Peebles <pumpkingod at gmail.com>
> wrote:
> >> Knowing nothing about the package or its code, it looks like a typo to
> me.
> >> The stdint.h naming of types would have it be uint64_t, not uint_64t.
> Could
> >> that be it?
> >>
> >> On Fri, Feb 4, 2011 at 6:00 AM, Michael Snoyman <michael at snoyman.com>
> wrote:
> >>>
> >>> Hi everyone,
> >>>
> >>> Does anyone else have trouble installing the AES package on a 32-bit
> >>> system? My system at home installs it just fine, but my VPS chokes
> >>> with the following error messages (plus a bunch of warnings):
> >>>
> >>> cbits/ctr_inc.c:11:0:
> >>>     error: 'uint_64t' undeclared (first use in this function)
> >>>
> >>> cbits/ctr_inc.c:11:0:
> >>>     error: (Each undeclared identifier is reported only once
> >>>
> >>> cbits/ctr_inc.c:11:0:  error: for each function it appears in.)
> >>>
> >>> cbits/ctr_inc.c:11:0:
> >>>     error: 'ctr' undeclared (first use in this function)
> >>>
> >>> cbits/ctr_inc.c:11:0:  error: expected expression before ')' token
> >>>
> >>> It's actually for this very reason that I'm still maintaining the
> >>> OpenSSL backend for http-enumerator: I think the tls package is stable
> >>> enough now to be used in production environments (kudos to Vincent by
> >>> the way). However, I can't use it in production if I can't build one
> >>> of its dependencies. This bug is also preventing me from adding some
> >>> nice features to http-enumerator, such as checking validity of SSL
> >>> certificates.
> >>>
> >>> Anyone have any thoughts?
> >>>
> >>> Michael
> >>>
> >>> _______________________________________________
> >>> Haskell-Cafe mailing list
> >>> Haskell-Cafe at haskell.org
> >>> http://www.haskell.org/mailman/listinfo/haskell-cafe
> >>
> >>
> >
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20110208/891228ad/attachment.htm>


More information about the Haskell-Cafe mailing list