LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 11-08-2012, 06:01 AM   #1
indileosat
LQ Newbie
 
Registered: Nov 2012
Posts: 10

Rep: Reputation: Disabled
Post Need advice/help in regards to encryption/description with PHP and SHELL


Hi guys,

I made some shell scripts, which I want to be only used when a valid license key is available. Its like a software needs a key to make it run for limited time.

I'm not a programmer by job, but can understand the code and make code to fulfill my own purposes.

I did some research online and managed to make a SHELL script to encrypt and decrypt license key using simple 'crypt' command. Now, the thing is I want to encrypt the key through PHP and decrypt it in a shell, where PHP won't be available. I'm not sure at this moment if PHP does the same encryption/decryption as 'crypt' command does. Does it? If so, can anybody please give me advise to make this encryption to maximum security? what method should I go for SHA/MD5 etc.

What exactly I want:
1. Shell script generate a string/key on the system where my scripts are installed.
2. User copy that string/key and put it in his account on my website which would be scripted in PHP.
3. PHP will generate a string/key which my shell script will read from user output and store it in an encrypted license key file. The license key will enable my scripts to execute for the limited period of time.

The values in License key I'm using at this moment are (example values):
fullname:Enrique Iglesias
email:enrique.iglesias@gmail.com
expirydate:20121106

I think I'll need to add 'systemkey' and 'serialkey' values in this license key file.
Want this key file to be encrypted for user, but my 'shc' encypted SHELL scripts to be able to read the values from that encrypted license key file.

Thanks in advance!
 
Old 11-08-2012, 06:41 PM   #2
indileosat
LQ Newbie
 
Registered: Nov 2012
Posts: 10

Original Poster
Rep: Reputation: Disabled
I'm still waiting for help
 
Old 11-10-2012, 10:07 PM   #3
indileosat
LQ Newbie
 
Registered: Nov 2012
Posts: 10

Original Poster
Rep: Reputation: Disabled
Still anyone?
Post has 126 views so far, but no replies??
 
Old 11-21-2012, 06:10 PM   #4
indileosat
LQ Newbie
 
Registered: Nov 2012
Posts: 10

Original Poster
Rep: Reputation: Disabled
How big this issue could be?
Please, I'm still looking forward for it....
 
Old 11-22-2012, 03:14 PM   #5
NyteOwl
Member
 
Registered: Aug 2008
Location: Nova Scotia, Canada
Distribution: Slackware, OpenBSD, others periodically
Posts: 512

Rep: Reputation: 138Reputation: 138
I can only speculate on the lack of an answer but possibly asking about forcing licencing authentication on a forum where such a philosophy is anathema to most might be a reason.

I'd consider using something other than crypt as it has historically been cryptographically weak. Similarly MD5 is also a fairly weak hash, though with a salt is still usable for some purposes.
 
1 members found this post helpful.
Old 11-22-2012, 06:06 PM   #6
indileosat
LQ Newbie
 
Registered: Nov 2012
Posts: 10

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by NyteOwl View Post
I can only speculate on the lack of an answer but possibly asking about forcing licencing authentication on a forum where such a philosophy is anathema to most might be a reason.

I'd consider using something other than crypt as it has historically been cryptographically weak. Similarly MD5 is also a fairly weak hash, though with a salt is still usable for some purposes.
Thanks for reply. I'm also trying the same way, MD5+Salt. Let's see if I could make something out of it..
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
server setup advice on raid and encryption wincen Linux - Newbie 3 01-05-2011 04:00 AM
Encryption from c client to php server? kalleanka Programming 2 01-13-2010 11:13 AM
Does php have a builtin symmetric encryption function? abefroman Programming 2 09-13-2009 10:32 PM
LXer: PHP encryption for the common man LXer Syndicated Linux News 0 07-25-2006 06:54 PM
PHP GnuPG encryption/decryption rblampain Programming 5 08-12-2005 10:10 AM


All times are GMT -5. The time now is 12:58 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration