[Chicken-users] Crypt egg build error

2013-04-11 Thread Matt Gushee
Hello, Chickeneers--

I am attempting to install the crypt egg on 32-bit Linux (up-to-date
Arch Linux w/ glibc-2.17), but I am getting the following error:

 crypt located at /tmp/tempfbc5.4157/crypt
checking platform for `crypt' ...
checking dependencies for `crypt' ...
install order:
("crypt")
installing crypt:0.4 ...
changing current directory to /tmp/tempfbc5.4157/crypt
  /usr/bin/csi -bnq -setup-mode -e "(require-library setup-api)" -e
"(import setup-api)" -e "(setup-error-handling)" -e
"(extension-name-and-version '(\"crypt\" \"0.4\"))"
/tmp/tempfbc5.4157/crypt/crypt.setup
  /usr/bin/csc -feature compiling-extension -setup-mode-C
-D_XOPEN_SOURCE -L -lcrypt detect-native-crypt-features.scm
  ./detect-native-crypt-features

Error: (string=?) bad argument type: #f

Call history:

detect-native-crypt-features.scm:11: conc
detect-native-crypt-features.scm:23: fold
detect-native-crypt-features.scm:26: symbol->string
detect-native-crypt-features.scm:26: conc
detect-native-crypt-features.scm:25: string->symbol
detect-native-crypt-features.scm:29: crypt-native
implementations/native/crypt.scm:6: g8
implementations/native/crypt.scm:7: ##sys#make-c-string
implementations/native/crypt.scm:7: ##sys#make-c-string
implementations/native/crypt.scm:7: ##sys#peek-c-string  <--

Error: shell command failed with nonzero exit status 17920:

  ./detect-native-crypt-features


Error: shell command terminated with nonzero exit code
17920
"/usr/bin/csi -bnq -setup-mode -e \"(require-library setup-api)\" -e
\"(import s...

Anyone know what is going on here?

Thanks,
Matt Gushee

___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Crypt egg build error

2013-04-11 Thread Matt Gushee
Hi, Erik--

Thanks for your quick reply.

On Thu, Apr 11, 2013 at 9:40 PM, Erik Falor  wrote:

> you didn't mention which version of Chicken you're using.  I built
> this egg with 32-bit 4.8.0.2 and 64-bit 4.8.0.3.

Oh, right. I was going to, but ... road-to-hell pavement ...

Chicken 4.8.0.3

--
Matt Gushee

___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Crypt egg build error

2013-04-12 Thread Peter Bex
On Thu, Apr 11, 2013 at 08:35:20PM -0600, Matt Gushee wrote:
> Hello, Chickeneers--

Hello Matt,

> I am attempting to install the crypt egg on 32-bit Linux (up-to-date
> Arch Linux w/ glibc-2.17), but I am getting the following error:

[...]

> Anyone know what is going on here?

Thanks for the bugreport.

The reason it's erroring out is probably because your libc's crypt()
returns NULL for unsupported setting strings, whereas some other crypt()
implementations return bogus strings.

Could you please try the attached patch and let me know if this fixes
it for you, so I can make a new release?

Cheers,
Peter
-- 
http://www.more-magic.net
Index: detect-native-crypt-features.scm
===
--- detect-native-crypt-features.scm(revision 28668)
+++ detect-native-crypt-features.scm(working copy)
@@ -26,7 +26,7 @@
 (conc "crypt-native-" (symbol->string name
  (salt (cadr type))
  (hash (caddr type)))
-(if (string=? hash (crypt-native "password" salt))
+(if (equal? hash (crypt-native "password" salt))
 (cons (cons name feature-name) supported-types)
 supported-types)))
 '()
@@ -34,4 +34,4 @@
 
 ;; For the setup script
 (with-output-to-file "crypt-features"
-  (lambda () (write (map cdr native-crypt-supported-types
\ No newline at end of file
+  (lambda () (write (map cdr native-crypt-supported-types
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Crypt egg build error

2013-04-12 Thread Matt Gushee
Hi, Peter--

On Fri, Apr 12, 2013 at 4:02 AM, Peter Bex  wrote:

> The reason it's erroring out is probably because your libc's crypt()
> returns NULL for unsupported setting strings, whereas some other crypt()
> implementations return bogus strings.
>
> Could you please try the attached patch and let me know if this fixes
> it for you, so I can make a new release?

Yes, that works. Thank you!

By the way: since this egg is an interface to "the Unix crypt()
function," does that mean it does not work on Windows? Also, I have
seen that some seemingly-knowledgeable people believe that bcrypt is
one of the better hashing methods. But this crypt is not related to
bcrypt, is it?

Thanks,
Matt Gushee

___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Crypt egg build error

2013-04-12 Thread Thomas Hintz
Crypt will use the hashing algorithm that it deems most secure. So if
you're system has bcrypt it should use it. If you're hashing passwords
bcrypt is a good hash to use.
On Apr 12, 2013 6:18 AM, "Matt Gushee"  wrote:

> Hi, Peter--
>
> On Fri, Apr 12, 2013 at 4:02 AM, Peter Bex  wrote:
>
> > The reason it's erroring out is probably because your libc's crypt()
> > returns NULL for unsupported setting strings, whereas some other crypt()
> > implementations return bogus strings.
> >
> > Could you please try the attached patch and let me know if this fixes
> > it for you, so I can make a new release?
>
> Yes, that works. Thank you!
>
> By the way: since this egg is an interface to "the Unix crypt()
> function," does that mean it does not work on Windows? Also, I have
> seen that some seemingly-knowledgeable people believe that bcrypt is
> one of the better hashing methods. But this crypt is not related to
> bcrypt, is it?
>
> Thanks,
> Matt Gushee
>
> ___
> Chicken-users mailing list
> Chicken-users@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/chicken-users
>
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Crypt egg build error

2013-04-12 Thread Peter Bex
On Fri, Apr 12, 2013 at 07:18:26AM -0600, Matt Gushee wrote:
> Hi, Peter--
> 
> On Fri, Apr 12, 2013 at 4:02 AM, Peter Bex  wrote:
> 
> > The reason it's erroring out is probably because your libc's crypt()
> > returns NULL for unsupported setting strings, whereas some other crypt()
> > implementations return bogus strings.
> >
> > Could you please try the attached patch and let me know if this fixes
> > it for you, so I can make a new release?
> 
> Yes, that works. Thank you!

Excellent, thanks for the feedback.  I've just released crypt 0.4.1 which
contains this bugfix.

> By the way: since this egg is an interface to "the Unix crypt()
> function," does that mean it does not work on Windows?

Well, it comes shipped with fallback implementations for when a
particular type of crypt implementation is not provided by the host
operating system.  I guess it should be possible to support crypt()
even if there is no host implementation whatsoever, but this has not
been tested.

I don't have Windows, so I can't test it, but if you can make a patch
which adds support I'll do my best to avoid breaking it.

> Also, I have
> seen that some seemingly-knowledgeable people believe that bcrypt is
> one of the better hashing methods.

That's right, it's one of the most CPU-heavy implementations, which is a
good thing because it makes life hard for an attacker.  It is also said to
be particularly hard to fully implement in hardware, which means
special-purpose hardware won't be able to accelerate this much beyond what
a normal CPU can do.

> But this crypt is not related to bcrypt, is it?

No offense, but it sounds like you haven't read the manual.  I've put
quite some effort into explaining what exactly crypt is and how it is
implemented, and why a library supporting modular crypt is a better idea
than a special-purpose library that can only deal with bcrypt.

You can find it here: http://wiki.call-cc.org/eggref/4/crypt
If it is somehow unclear or things are missing, please let me know so I
can improve the manual.

Cheers,
Peter
-- 
http://www.more-magic.net

___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users