LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-20-2013, 02:27 AM   #1
prushik
Member
 
Registered: Mar 2009
Location: Pennsylvania
Distribution: gentoo
Posts: 372

Rep: Reputation: 29
New C Library released!!! Measure luck!


I have released a new C library which can measure a users luck.
I envision it being used in games mostly, to adjust the difficulty for lucky/unlucky players.
It also includes a true random number generator.

Download here:
http://www.betteros.org/sw/luck.php

To build the example. make and install the library:
make
make install PREFIX=/usr

Build the example:
gcc ex.c -lluck -lncurses -o example

Run the example:
./example


How does it work:
It generates random numbers from microphone noise and gathers statistics based on the numbers.
More information is available in the included README file.
API documentation is provided in the tarball in the DOC file.

License:
Beerware License
 
Old 05-20-2013, 02:55 AM   #2
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
Just want to note that md5 is most definitely NOT a cryptographically secure hash. It is known to have collisions:
http://en.wikipedia.org/wiki/Md5#Security
I would have used a newer, better hash, probably a higher SHA hash or whirlpool. I have actually used whirlpool in my own RNG experiments.

Also, the quality of your TRNG varies greatly with the noise in the room. This is a potential vulnerability.

As long as you don't use the TRNG for anything critical, it should work for other purposes.
 
Old 05-20-2013, 08:29 AM   #3
prushik
Member
 
Registered: Mar 2009
Location: Pennsylvania
Distribution: gentoo
Posts: 372

Original Poster
Rep: Reputation: 29
Quote:
Originally Posted by H_TeXMeX_H View Post
Just want to note that md5 is most definitely NOT a cryptographically secure hash. It is known to have collisions:
http://en.wikipedia.org/wiki/Md5#Security
I would have used a newer, better hash, probably a higher SHA hash or whirlpool. I have actually used whirlpool in my own RNG experiments.

Also, the quality of your TRNG varies greatly with the noise in the room. This is a potential vulnerability.

As long as you don't use the TRNG for anything critical, it should work for other purposes.
Yes of course, this is true. MD5 is not cryptographically secure, however, this library does not use MD5 sums to verify anything, instead, it uses MD5 only as "whitening" for the data from the microphone. So yes, there are collisions, however, in this particular usage, collisions don't need to reduce security, the numbers are still not predictable.
Also, luck_rng() only uses half of the MD5 hash anyway, and luck_event() reduces the result to an 8 bit number. MD5 is used only for "whitening". (however, the full MD5 function is available for application use)
If people are really still worried about MD5, then maybe I can switch it to whirlpool.

Also, the library is meant mostly for games and amusement. I am not a cryptography guy, I did not design it for cryptography, therefore, you should NOT use it for something critical UNLESS you can look at my code and verify that it is secure enough.
 
Old 05-20-2013, 08:38 AM   #4
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
Well, if it is for games, then md5 should work fine.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: PHP for Microsoft AJAX Library released LXer Syndicated Linux News 0 02-24-2007 06:01 PM
LXer: Second Beta of JSON-lib, Open Source Java Library Released LXer Syndicated Linux News 0 01-22-2007 07:03 PM
LXer: Social Network Analysis Library Released as Open Source LXer Syndicated Linux News 0 12-13-2006 05:33 AM
howto compile bin with my library using all-static and shared linked standart library stpg Programming 4 06-29-2004 04:20 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:32 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration