Moderator: Andres Valverde
Onno Garms wrote:So there isn't any chance for hackers to write a key generator, is there?
Onno
Onno Garms wrote:How much efford is it to write a reliable public key generator? Are there ready-to-use public key generators availble which can be used in commercial software (i.e. non-GPL)?
EDIT: I would only trust a solution if the sources are available.
Onno
Ron Murawski wrote:Anything can be hacked!
A Google search for 'public key generator' will find many sites with more information.
Your desire for non-GPL source code is difficult. Almost all of the available code is protected under some form of license.
There are other protection systems that are more secure. Like dongles, or insert your CD once a month and check for something you put on that CD that won't duplicate properly or require a once-a-month online verification -- stuff like that.). But nothing you do will be totally hacker-proof.
Onno Garms wrote:Ron Murawski wrote:Anything can be hacked!
But not without hacking into my computer and stealing the private key, can it?
Onno Garms wrote:A Google search for 'public key generator' will find many sites with more information.
Sure but most of them don't lead to the source code or lead to GPL'ed source code.
Onno Garms wrote:Your desire for non-GPL source code is difficult. Almost all of the available code is protected under some form of license.
But there are BSD, mozilla and boost licenses.
Onno Garms wrote:There are other protection systems that are more secure. Like dongles, or insert your CD once a month and check for something you put on that CD that won't duplicate properly or require a once-a-month online verification -- stuff like that.). But nothing you do will be totally hacker-proof.
These solutions cannot be shipped electonically. In addition, dongles are too expensive for a chess engine. Some of the so called professional protection schemes can be worked around fairly easily without having to disassemble the protected software.
Ron Murawski wrote:You need to build a special multiplication function that can handle very large numbers.
product [1..100]
(iter (for i from 1 to 100) (multiply i))
1 100 [ 1+ * ] each .
93326215443944152681699238856266700490715968264381621468592963895217599993229915608941463976156518286253697920827223758251185210916864000000000000000000000000
main(){int i,j,k,A[99]={1};i=101;while(--i)for(j=k=0;j<80;j++)k=i*A[j]+k/100,A[j]=k%100,i-1?0:printf(j-79?"%02d":"\n",A[78-j]);}
H.G.Muller wrote:The challenge is to do it in fewer characters than the intended output, or you might as well write it as a string literal.
factorial n = product [1..n]
(defun factorial (n)
(iter (for i from 1 to n) (multiply i)))
: factorial 1 swap [ 1+ * ] ;
OK, here it is:
- Code: Select all
main(){int i,j,k,A[99]={1};i=101;while(--i)for(j=k=0;j<80;j++)k=i*A[j]+k/100,A[j]=k%100,i-1?0:printf(j-79?"%02d":"\n",A[78-j]);}
product [1..100]
Teemu Pudas wrote:Haskell,
some sort of Lisp,
Forth.
: factorial 1 swap 0 do i 1+ * loop ;
Tord Romstad wrote:some sort of Lisp,
Close enough. It's Common Lisp.
Teemu Pudas wrote:Tord Romstad wrote:some sort of Lisp,
Close enough. It's Common Lisp.
Strange. I have LispBox with Allegro Common Lisp, and it complained about iter being an undefined function.
(defun factorial (n)
(do* ((i 1 (+ i 1))
(j 1 (* j i)))
((= i n) j)))
(defun factorial (n)
(loop for i from 1 to n
for j = 1 then (* i j)
finally (return j)))
(defun factorial (n)
(let ((i 1))
(dotimes (j n)
(setf i (* i (+ j 1))))
i))
(defun factorial (n)
(reduce #'* (loop for i from 1 to n collect i)))
Tord Romstad wrote:I would say that this would be five lines or so if formatted in a readable way, but it's nevertheless impressive. Thanks for posting!
Ron Murawski wrote:If you were encrypting a one-time message, I would say no. But when you issue an activation key based on key pairs no one needs your private key. All a hacker needs is a single public key that works...
If enough messages (activation keys) are known it becomes easier to break a code.
I suggest you look at the source code to PuTTY. It is a MIT license, which is very similar to BSD.
Yes, that's why I said they were "protected under some form of license". I thought you were looking for code with no license attached. I misunderstood you. Since BSD license is okay with you, the PuTTY code may be what you are looking for.
You are right that dongles are expensive. Some of them are very secure and others are not.
Good luck with your chess program!
Onno Garms wrote:If enough messages (activation keys) are known it becomes easier to break a code.Onno Garms wrote:Really? So all I need to retrieve the private pgp key is a large number of signed messages?
Onno Garms wrote:I suggest you look at the source code to PuTTY. It is a MIT license, which is very similar to BSD.
Thanks. That the sort of hint I was looking for.
Onno Garms wrote:You are right that dongles are expensive. Some of them are very secure and others are not.
Do you have detailed information on security differences beween different kind of dongles? Please send pm.
Onno Garms wrote:Good luck with your chess program!
I'm not yet sure what to do with it. It's already very strong for a single CPU engine but currently it definitely cannot go commercial. Possible I will publish as freeware, but definitely not open source.
I was just asking some things that I had in my mind to revive the forum.
Onno Garms wrote:Do you have detailed information on security differences beween different kind of dongles? Please send pm.
Ron Murawski wrote:Does your chess program have a name?
Tord Romstad wrote:
- Code: Select all
: factorial 1 swap [ 1+ * ] ;
A little competition: Which are the three programming languages used above? The first person to correctly identify all three languages will win a free copy of the next version of Glaurung, including the complete source code!
Tord
Tord Romstad wrote:
- Code: Select all
: factorial 1 swap [ 1+ * ] ;
: factorial 1 swap [ 1+ * ] each ;
: factorial [ 1+ ] map product ;
Tord Romstad wrote:A little competition: Which are the three programming languages used above? The first person to correctly identify all three languages will win a free copy of the next version of Glaurung, including the complete source code!
Russell Reagan wrote:That's cute Tord, using Factor to write factorial
Return to Programming and Technical Discussions
Users browsing this forum: No registered users and 8 guests