hash function for creating an activation code

View: New views
4 Messages — Rating Filter:   Alert me  

hash function for creating an activation code

by Ali Asghar Toraby Parizy :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

hi
I want to create a license file for my program
I have created a function that extract unique hex number of each network
adapters of host computer
When activation wizard starts, this unique number has been sent to a server
as a request code. Now i need a hash function that mix this number with a
user name and return a new code as an activation code to user.
So please suggest a hash function
request code is a string like this:
-------------------
"
000272B0002600FFD924114B0008C9A20DE70001027CC602002215FE0E9B005056C0000100=
5056C0000800000000000000E000000000000000E000000000000000E000000000000000E00=
0000000000000E000000000000000E000000000000000E000000000000000E0000000000000=
00E000000000000000E000000000000000E000000000000000E000000000000000E00000000=
0000000E000000000000000E000000000000000E000000000000000E000000000000000E000=
000000000000E000000000000000E000000000000000E000000000000000E00000000000000=
0E000000000000000E000000000000000E000000000000000E000000000000000E000000000=
000000E000000000000000E000000000000000E000000000000000E000000000000000E0000=
00000000000E000000000000000E0"
-------------------
and a user name may be "aliasghar.toraby@..."
thanks for any help

------------------------------------------------------------------------
Securing Apache Web Server with thawte Digital Certificate
In this guide we examine the importance of Apache-SSL and who needs an SSL certificate.  We look at how SSL works, how it benefits your company and how your customers can tell if a site is secure. You will find out how to test, purchase, install and use a thawte Digital Certificate on your Apache web server. Throughout, best practices for set-up are highlighted to help you ensure efficient ongoing management of your encryption keys and digital certificates.

http://www.dinclinx.com/Redirect.aspx?36;4175;25;1371;0;5;946;e13b6be442f727d1
------------------------------------------------------------------------


Re: hash function for creating an activation code

by Shreyas Zare-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

You can simple use MD5 or SHA1. MD5 is faster than SHA1, but is less
secure, so if your app is not being deployed in large scale then use
MD5.

Regards

On Mon, Nov 9, 2009 at 11:50 PM, Ali Asghar Toraby Parizy
<aliasghar.toraby@...> wrote:

> hi
> I want to create a license file for my program
> I have created a function that extract unique hex number of each network
> adapters of host computer
> When activation wizard starts, this unique number has been sent to a server
> as a request code. Now i need a hash function that mix this number with a
> user name and return a new code as an activation code to user.
> So please suggest a hash function
> request code is a string like this:
> -------------------
> "
> 000272B0002600FFD924114B0008C9A20DE70001027CC602002215FE0E9B005056C0000100=
> 5056C0000800000000000000E000000000000000E000000000000000E000000000000000E00=
> 0000000000000E000000000000000E000000000000000E000000000000000E0000000000000=
> 00E000000000000000E000000000000000E000000000000000E000000000000000E00000000=
> 0000000E000000000000000E000000000000000E000000000000000E000000000000000E000=
> 000000000000E000000000000000E000000000000000E000000000000000E00000000000000=
> 0E000000000000000E000000000000000E000000000000000E000000000000000E000000000=
> 000000E000000000000000E000000000000000E000000000000000E000000000000000E0000=
> 00000000000E000000000000000E0"
> -------------------
> and a user name may be "aliasghar.toraby@..."
> thanks for any help


--
("If at first you don't succeed; call it version 1.0")

Shreyas Zare
Co-Founder, Technitium
eMail: shreyas@...

..::< The Technitium Team >::..
Visit us at www.technitium.com
Contact us at theteam@...

Join Sci-Tech News group and get the latest science & technology news
in your inbox. Visit http://tech.groups.yahoo.com/group/sci-tech-news
to join.

------------------------------------------------------------------------
Securing Apache Web Server with thawte Digital Certificate
In this guide we examine the importance of Apache-SSL and who needs an SSL certificate.  We look at how SSL works, how it benefits your company and how your customers can tell if a site is secure. You will find out how to test, purchase, install and use a thawte Digital Certificate on your Apache web server. Throughout, best practices for set-up are highlighted to help you ensure efficient ongoing management of your encryption keys and digital certificates.

http://www.dinclinx.com/Redirect.aspx?36;4175;25;1371;0;5;946;e13b6be442f727d1
------------------------------------------------------------------------


Re: hash function for creating an activation code

by André Gasser :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

 From a security perspective I would use SHA-256 since both, SHA-1 and
MD5 should not be considered "secure" these days. In this case, where
you are just generating a license file, computing time should not be an
issue...

just my 0.02

andré

Shreyas Zare wrote:

> Hi,
>
> You can simple use MD5 or SHA1. MD5 is faster than SHA1, but is less
> secure, so if your app is not being deployed in large scale then use
> MD5.
>
> Regards
>
> On Mon, Nov 9, 2009 at 11:50 PM, Ali Asghar Toraby Parizy
> <aliasghar.toraby@...> wrote:
>  
>> hi
>> I want to create a license file for my program
>> I have created a function that extract unique hex number of each network
>> adapters of host computer
>> When activation wizard starts, this unique number has been sent to a server
>> as a request code. Now i need a hash function that mix this number with a
>> user name and return a new code as an activation code to user.
>> So please suggest a hash function
>> request code is a string like this:
>> -------------------
>> "
>> 000272B0002600FFD924114B0008C9A20DE70001027CC602002215FE0E9B005056C0000100=
>> 5056C0000800000000000000E000000000000000E000000000000000E000000000000000E00=
>> 0000000000000E000000000000000E000000000000000E000000000000000E0000000000000=
>> 00E000000000000000E000000000000000E000000000000000E000000000000000E00000000=
>> 0000000E000000000000000E000000000000000E000000000000000E000000000000000E000=
>> 000000000000E000000000000000E000000000000000E000000000000000E00000000000000=
>> 0E000000000000000E000000000000000E000000000000000E000000000000000E000000000=
>> 000000E000000000000000E000000000000000E000000000000000E000000000000000E0000=
>> 00000000000E000000000000000E0"
>> -------------------
>> and a user name may be "aliasghar.toraby@..."
>> thanks for any help
>>    
>
>
>  

------------------------------------------------------------------------
Securing Apache Web Server with thawte Digital Certificate
In this guide we examine the importance of Apache-SSL and who needs an SSL certificate.  We look at how SSL works, how it benefits your company and how your customers can tell if a site is secure. You will find out how to test, purchase, install and use a thawte Digital Certificate on your Apache web server. Throughout, best practices for set-up are highlighted to help you ensure efficient ongoing management of your encryption keys and digital certificates.

http://www.dinclinx.com/Redirect.aspx?36;4175;25;1371;0;5;946;e13b6be442f727d1
------------------------------------------------------------------------


Re: hash function for creating an activation code

by Maciej Wolanski :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Weaknes of this aproach doesn't lie in hashing function, so whether md5,
sha-1 or sha-256 will be used it makes no difference

2009/11/9 André Gasser <andre.gasser@...>:

> Hi,
>
> From a security perspective I would use SHA-256 since both, SHA-1 and MD5
> should not be considered "secure" these days. In this case, where you are
> just generating a license file, computing time should not be an issue...
>
> just my 0.02
>
> andré
>
> Shreyas Zare wrote:

--
regards,
Maciej Wolanski

------------------------------------------------------------------------
Securing Apache Web Server with thawte Digital Certificate
In this guide we examine the importance of Apache-SSL and who needs an SSL certificate.  We look at how SSL works, how it benefits your company and how your customers can tell if a site is secure. You will find out how to test, purchase, install and use a thawte Digital Certificate on your Apache web server. Throughout, best practices for set-up are highlighted to help you ensure efficient ongoing management of your encryption keys and digital certificates.

http://www.dinclinx.com/Redirect.aspx?36;4175;25;1371;0;5;946;e13b6be442f727d1
------------------------------------------------------------------------