From: Walter Roberson on 30 Jul 2010 14:38 Andy wrote: > Walter Roberson <roberson(a)hushmail.com> wrote in message > <i2v5cd$82r$1(a)canopus.cc.umanitoba.ca>... >> Sean wrote: >> >> > Also, that was way more checks than you need for the whole thing. >> It > could all be done with this condition: >> > %%% >> > if all([c(1)>=2011 c(2) >= 5 && c(3) > 5]) disp('license expired'); >> > delete myfun.p >> > end >> > %%% >> >> if now >= 734628 >> >> >> (By the way, the datenum for May 5, 2011 is prime, if someone is >> looking for a cryptographic obscuration of the above.) > > What? 734628 is not prime. Sorry, you are right, I was off by 1. That in turn means that the above code should be if now >= 734629
From: Andy on 30 Jul 2010 15:04 > >> (By the way, the datenum for May 5, 2011 is prime, if someone is > >> looking for a cryptographic obscuration of the above.) > > > > What? 734628 is not prime. > > Sorry, you are right, I was off by 1. That in turn means that the above code > should be > > if now >= 734629 But 734629 is not prime either: >> factor(734629) ans = 7 104947 I think you were off by 1 in the other direction: >> isprime(734627) ans = 1 Also, even though the datenum for May 5, 2011 is not prime, the concatenation of the date is: >> isprime(552011) ans = 1
From: Walter Roberson on 30 Jul 2010 15:05 Andy wrote: >> >> (By the way, the datenum for May 5, 2011 is prime, if someone is >> >> looking for a cryptographic obscuration of the above.) >> > > What? 734628 is not prime. >> >> Sorry, you are right, I was off by 1. That in turn means that the >> above code should be >> >> if now >= 734629 > > But 734629 is not prime either: > >>> factor(734629) > ans = > 7 104947 > > I think you were off by 1 in the other direction: > >>> isprime(734627) > ans = > 1 The 734628 datenum was intended to be the datenum of the _next_ day, so that now >= 734628 would be true as of the first invalidate time. And under that (incorrect) supposition, the day May 5, 2011 itself would have been 734627, which is the prime. The off-by-one was in the original number and thus called for a correction of the number to 734629 for the purposes of the code.
From: Giovanni Ughi on 30 Jul 2010 15:19 Walter Roberson <roberson(a)hushmail.com> wrote in message <i2v5cd$82r$1(a)canopus.cc.umanitoba.ca>... > Sean wrote: > > > Also, that was way more checks than you need for the whole thing. It > > could all be done with this condition: > > %%% > > if all([c(1)>=2011 c(2) >= 5 && c(3) > 5]) disp('license expired'); > > delete myfun.p > > end > > %%% > > if now >= 734628 > > > (By the way, the datenum for May 5, 2011 is prime, if someone is looking for a > cryptographic obscuration of the above.) now and datnum can be easily "modified". clock is safer
From: Giovanni Ughi on 30 Jul 2010 15:30
Walter Roberson <roberson(a)hushmail.com> wrote in message <i2v69h$9a7$1(a)canopus.cc.umanitoba.ca>... > Giovanni Ughi wrote: > > why you said: "just moved to the recycle bin, pretty useless" > > > > in my case (winXP and Matlab 2009b) when the file is deleted from matlab > > is just deleted, I do not have anything in the recycle bin. > > > > It may depend on the system settings? (in my case also on different pc > > it is the same) > > Oh gee, somehow the write permissions on the directory disappeared! > > Oh gee, and somehow the ownership of the directory got changed so that the > permissions couldn't be changed! > > Oh gee, look here, someone overrode the delete function, too... > > > The world is littered with the bankrupt remains of software companies who > thought they had developed "unbreakable" license schemes. > > > I have only heard of _one_ unbreakable license scheme: it involves quantum > entanglement and quantum "action at a distance" to create a data stream that > is unforgeable and unsnoopable (seriously.) yes indeed, cracks exists from a long time. I was just looking for something reasonably safe. "Clock" is safe enough, but the problem that a user can easily modify the system date and time is not yet fixed. Someone can tell me more about that or about any other alternatives? thanks |