|
Hi guys
I have been working on a project for several months now and it is almost finished all i need is some kind of security so that only the people that buy my software will be able to run it although when they first run it, it will display a key(which is their hardware drive serials, encrypted though) and then they will need to send that code to me so that i decrypt the data and send them a key that will work(any kind of key, for ex. when they send their key to me then i will use another proggy that i make and use that proggy to maybe add something to their serial like a few digits or a code at the end of their serial then send it back to them) what i need to know though is how to encrypt their hardware drive serial then make an algorith that can recognize the modified serial(that i will send to them once they send their serial to me) and make the program start up. I also need some kind of limit maker so that someone can only use it for a limited amount of time(1 year lets say) then after the time has expired it will display a message box saying they have to renew their serial.
Soething of this kind would be really good.
So could someone please direct me to such a tut or maybe reply with some useful info?
Thanks in advance
Cyclone
|
|
|
|
|
Check about HASP technology using Google search engine
|
|
|
|
|
thanks but thats not exactly what i was looking for, i want to know how i can build one myself
|
|
|
|
|
Cyclone02 wrote: I have been working on a project for several months now and it is almost finished all i need is some kind of security so that only the people that buy my software will be able to run it although when they first run it, it will display a key
This is, over-all, a very difficult process. I have been through this several times from each end. Licensing software is a battle to make it difficult to bypass the "license" without being difficult on the end user. One method is to make an RSA key based on some hardware information, and the user's name and "brand" the software so that it works on that hardware for a specific time. The problem is, what happens when the user moves the software to another machine? Even an honest customer can have a hard-drive failure, motherboard failure, etc. that requires him to move all his work to another machine. Now he must return to you for more licensing.
Hardware keys (as mentioned above with the HASP) are handy in that you simply move the "dongle" over to the new machine and run with it. The customer is "usually" pretty happy. There are problems with the dongles, you can't install the dongle first, you have to install the software, then the dongle, etc. This is sometimes irritating.
I have written some self-encrypting licensing systems in my earlier years, not a story for the faint of heart. They were good, but they backfired. Eventually someone will crack a software-only licensing system. No matter how good, this is guarenteed. Look at the massive amounts of illegal software sometime using google (just don't go to the sites or download, use the google-cache-view).
What happens with your software, or in my case the encryption system, is left up to the fates. I paid my dues, I worked with anti-virus writers to fight my own encryption once it was stolen, disassembled and taken up by an Australia band of virus writers.... My software license key encryption, what I called a "living encryption" due to the fact that it was "always changing," became what we know today as a polymorphic virus.
I do not do software licensing now. Hardware keys are a bit safer, not perfect, but safer.
_________________________
Asu no koto o ieba, tenjo de nezumi ga warau.
Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
|
|
|
|
|
Thanks for the informative reply Jeffry. Well after i read ur reply i concuded that i will probably stick to the username and branding part as that s the one that sounds the easiest. Could you please point me to a good tut that explains encryption in general as i will start and put things together from there.
Thanks
|
|
|
|
|
Cyclone02 wrote: Could you please point me to a good tut that explains encryption in general as i will start and put things together from there.
Some good starting points:
Practical Cryptography[^]
Applied Cryptography[^]
_________________________
Asu no koto o ieba, tenjo de nezumi ga warau.
Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
|
|
|
|
|
Hey guys, please help?
I'm trying to count each character's occurance in a text. This is what I have but if I am working with 20,000 chars it takes forever. How can I make it faster? (Especially the nested for loop)
Thanks a lot!
<code>private void frequencyItem_Click(object sender, System.EventArgs e)
{
Form3 form3 = new Form3(); //creating new form that tells the user to please wait...
form3.Show(); //displays the form3
cipherTxt.Text = "";
float numTimes = 0; //declaring and initializing numTimes which stores the number of times a char is presented
//declaring and initializing my 72 char alphabet
String myAlphabet = new String(new char[] {'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','0','1','2','3','4','5','6','7','8','9','\u0027','\u002E','\u002C','\u003A','\u003B','\u003F','\u0021','\u0023','\u0028','\u0029'});
//nested for loop comparing every char in the alphabet to every char in the plaintext textbox
for(int i=0;i<myAlphabet.Length;i++)
{
for(int j=0;j<plainTxt.Text.Length;j++)
{
if(plainTxt.Text[j] == myAlphabet[i]) //if a plaintext char matches an alphabet char
{
numTimes++; //increase count for numTimes
}
}
if(numTimes>0) //if number of times a char's ocurrence is presented
{
//print in ciphertext textbox the result of percentages
cipherTxt.Text += "Letter " + myAlphabet[i] + " is displayed "
+ numTimes + " times. It is " + (numTimes/plainTxt.Text.Length)*100 + "% of the whole text." + System.Environment.NewLine;
}
numTimes = 0; //return the current alphabet's char count to 0
}
string frequencyLetters = cipherTxt.Text; //pass results to a string
cipherTxt.Text = ""; //clear ciphertext textbox
form3.Close(); //closes the waiting form...
try //tries following block of code if user selects Cancel on save box
{
saveFileDialog.ShowDialog(); //show the save dialog
String saveFileName = saveFileDialog.FileName; //store output filename as string
TextWriter textOut = new StreamWriter(saveFileName); //new streamwriter to filename
textOut.WriteLine(frequencyLetters); //writing results to file
textOut.Close(); //closing streamwriter
}
catch(Exception arg) //catches exception
{
return; //exits void function
}
}</code>
Santinni
|
|
|
|
|
Why don't you try converting your char values to indexes ? ie:
int[] frequence = new int[ushort.MaxValue];
for (int i = 0; i < s.Length; i++)
{
frequence[(ushort)s[i]]++;
}
regards
|
|
|
|
|
roberto_santinni wrote: how to make a faster algorithm
at the beginning of your code, have you tried to write this :
while (!fastEnough()) {
accelerate();
}
ok ok, i leave
|
|
|
|
|
you need to:
1. use loop unroling
2. use openmp if you have dual core processor (write openmp in google)
3. use intell tbb - on intel site
4. use lookup tables
|
|
|
|
|
loop unrolling rarely changes anything on todays compilers/architectures.
Multithreading will help, but not as much as picking a better algorithm (as said in the first article).
We are a big screwed up dysfunctional psychotic happy family - some more screwed up, others more happy, but everybody's psychotic joint venture definition of CP
Linkify! || Fold With Us! || sighist
|
|
|
|
|
Im sorry, but you are wrong. in many of my programs, i really saw a different.
btw, you can use the optimization switch in VS2005, it also does a great job.
|
|
|
|
|
That algoritm is pretty poor, however, one simple optimization that will roughly double its speed would
be
for(int j=0;j<plainTxt.Text.Length;j++)
{
if(plainTxt.Text[j] == myAlphabet[i])
{
numTimes++;
break;
}
}
|
|
|
|
|
How about using a hash-table for the counters and forget about the nested loops.
Assuming you are doing this with .NET 2.0, here's my take on this:
<code lang=cs>
private string DoCount(string input)
{
string alphabet = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890\u0027\u002E\u002C\u003A\u003B\u003F\u0021\u0023\u0028\u0029";
Dictionary<char, int> counters = new Dictionary<char, int>(alphabet.Length);
foreach(char c in alphabet)
counters[c] = 0;
foreach(char c in input)
if(counters.ContainsKey(c))
counters[c]++;
string output = string.Empty;
for (int i = 0; i < alphabet.Length; i++)
{
flost percent = 0.0F;
char c = alphabet[i];
int count = counters[c];
if(count > 0)
percent = (float)count / input.Length;
output += string.Format("Letter {0} is displayed {1} times. It is {2:P2} of the whole text.{3}", c, count, percent, Environment.NewLine);
}
return output;
}
</code>
Hope it works for you.
-- modified at 22:56 Thursday 26th October, 2006
- Xint0
|
|
|
|
|
|
Hi...
I am using Bresenham Algorithm for drawing lines and polygons to fill the frame buffer pixel by pixel.
I draw the Lines or Polygons of single pixel thickness.
But i have to draw Lines or Polygons with stroke-thickness of 2 to 10 pixels.
Please help in developing the thick lines using Bresenham's Algorithm
Thanks,
Arun AC
++++++++++++++++++++++++++++++++++++++++++++++++++++
I'm not smart, but I like to observe. Millions saw the apple fall,
but Newton was the one who asked why.
-- William Hazlitt
++++++++++++++++++++++++++++++++++++++++++++++++++++
|
|
|
|
|
I have 2 pairs of ODE that resulted from the mathematical modelling of a 2-link robotic system. My problem is in setting the intial conditions and printing to files.
I could have attached the equations but they are not showing when I tried to copy and paste.
Anyone interested in helping me out could send me his/her email and i will send the equation with other information to him/her. I will really appreciate your assistance.
Thank you.
Regards,
Sahoong.
skg
|
|
|
|
|
Hy
Why dont you write the equations in Latex Source Code?
Its been a while that I have worked with ODEs but maybe I can help.
Regards,
franky_mp
|
|
|
|
|
This may just be lack of knowledge on my part... not sure if I have enough information to calculate this or not. I am googling right now, but not turning up anything on the specifics of my need but on all the side issues I alreay know....
Okay... first what I need to do is calculate current ocean level minus wave motion. In otherwords the gravitational surface including the moon. I have already the gravitational surface of the earth (geoid) from NASA, and have had it for a couple of years now. I am one of the few people who use it. But I need to add in the tidal effect in ocean height based on the lunar cycle. Not sure if atmospheric pressure affects sea height noticeably, but I basically have a ship that I need an accurate height on and the ship based GPS locations seem to be putting out a very poor +-20 meter location even from one end of the ship to the other.
Theoretically I have proposed the following:
Using knowns (lat lon location, lunar distance and viewing angle from location, sea level based on gravitational surface of earth):
Calculate height of ocean based on pull of the moon
use this in a more accurate position.
I am not asking you to do this for me, but if you can point me to the right location, I will do it. I will keep googling various terms hoping to stumble across the calculation. No homework, I am long since out of school.
Thanks!
Jeff
P.S. yes, I live in a desert, ocean tidal effects are something I never had to worry about before....
_________________________
Asu no koto o ieba, tenjo de nezumi ga warau.
Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
|
|
|
|
|
I tried finding info on this sort of calculation some years back, but was told thata major factor in tidal heights vs time was the sloshing of water around terrain features that disrupted the simple newtonial effects that a water world would undergo, and that as a result there wasn't a theorectical model available.
|
|
|
|
|
dan neely wrote: and that as a result there wasn't a theorectical model available.
So I seem to be finding out... However, that in and of itself is good. This particular ship will not be sitting near terrain features, so I may be able to use the earth gravitational model with 1m effect from the sun, and 3m effect from the moon in the deep ocean. So I am not at a complete loss yet.
_________________________
Asu no koto o ieba, tenjo de nezumi ga warau.
Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
|
|
|
|
|
Maybe. This was a few years back, but the impression I got was that the sloshing didn't just effect the hieghts of the tides, but offset the locations of the bulges as well. IIRC there was mention of a large bay(sea?) that ended up with a 24hr cycle instead of the normal 12.
|
|
|
|
|
dan neely wrote: Maybe. This was a few years back, but the impression I got was that the sloshing didn't just effect the hieghts of the tides, but offset the locations of the bulges as well. IIRC there was mention of a large bay(sea?) that ended up with a 24hr cycle instead of the normal 12.
about my biggest worry will be proximity to islands... This will be deep pacific, it will never (as far as I know) be in an inland sea like the gulf of Mexico.
_________________________
Asu no koto o ieba, tenjo de nezumi ga warau.
Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
|
|
|
|
|
Jeffry J. Brickley wrote: calculate current ocean level minus wave motion
If you are referring ot wind driven waves, then, unless the boat is in a fairly fierce storm, and quite a small vessel, this fluctuation can be ignored.
Jeffry J. Brickley wrote: I need to add in the tidal effect in ocean height based on the lunar cycle
This will be almost impossible. Tides are extraordinarially complex. Some parts of the earth have virtually no tide (I mean in addition to the Med, which has no tide, some open ocean islands also have no tides). Other parts, like the channel islands, and th eBristol channel have as much as a 10 meter variation. Some places, like Southampton have two high tides.
This is all because water swirls and flows around the earth, dragged by the moon, and the way it moves is affected by land, and interfeerence wave paterns.
Additionally, when the sun and moon are in line larger tidal forces are generated.
I would say that calculating the height of a tide from the moons position would be almost impossible.
Instead I would refer to know tide heights around the world in relation to highwater Grenwich.
Truth is the subjection of reality to an individuals perception
|
|
|
|
|
fat_boy wrote: This will be almost impossible.
Very true... but at least in the process of learning it, I ruled out the need for it. This should be deep pacific only, even when they are around islands they should get only minor tidal forces. I am knew to tides (I live in a freakin' desert!), so I had to ask. Now I know, but that means one less calculation.
_________________________
Asu no koto o ieba, tenjo de nezumi ga warau.
Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
|
|
|
|
|