Re: [Haskell-cafe] AES on 32-bit system
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 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 > 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 > 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 > 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@haskell.org > >>> http://www.haskell.org/mailman/listinfo/haskell-cafe > >> > >> > > > > ___ > Haskell-Cafe mailing list > Haskell-Cafe@haskell.org > http://www.haskell.org/mailman/listinfo/haskell-cafe > ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] AES on 32-bit system
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 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 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 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@haskell.org >>> http://www.haskell.org/mailman/listinfo/haskell-cafe >> >> > ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] AES on 32-bit system
On Fri, Feb 04, 2011 at 06:11:38AM +, Daniel Peebles 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? While it does indeed solve the problem, technically the whole code redefine stdint, so uint_64t is actually not a typo, but the way it's been defined. That's one of the reason I don't really like this implementation; looks like a #ifdef nightmare to support (too) old environment. -- Vincent ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] AES on 32-bit system
On Fri, Feb 4, 2011 at 11:00 AM, Vincent Hanquez wrote: > On Fri, Feb 04, 2011 at 08:00:24AM +0200, Michael Snoyman 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? > > Hi Michael, > > well, Thomas DuBuisson and I talked about it couple of days ago, and i'm > probably > going to incorporate AES into cryptocipher directly, so dropping the > dependancy > problem. > > I'm not a big fan of the C implementation, so i'll be looking into replacing > it by > an implementation i made couple of years back (providing it's at least > providing the > same level of performance), and adding support to AES-NI (although I've heard > that > someone else might be working into that as well). That sounds even better :). You're doing an amazing job with tls, keep it up! Michael ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] AES on 32-bit system
On Fri, Feb 04, 2011 at 08:00:24AM +0200, Michael Snoyman 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? Hi Michael, well, Thomas DuBuisson and I talked about it couple of days ago, and i'm probably going to incorporate AES into cryptocipher directly, so dropping the dependancy problem. I'm not a big fan of the C implementation, so i'll be looking into replacing it by an implementation i made couple of years back (providing it's at least providing the same level of performance), and adding support to AES-NI (although I've heard that someone else might be working into that as well). -- Vincent ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] AES on 32-bit system
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 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 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@haskell.org >> http://www.haskell.org/mailman/listinfo/haskell-cafe > > ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] AES on 32-bit system
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 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@haskell.org > http://www.haskell.org/mailman/listinfo/haskell-cafe > ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] AES on 32-bit system
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@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe