Software Design
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming Languages - MoreSoftware Design

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old July 15th, 2003, 05:41 PM
jobesd jobesd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2001
Location: USA
Posts: 194 jobesd User rank is Corporal (100 - 500 Reputation Level)jobesd User rank is Corporal (100 - 500 Reputation Level)jobesd User rank is Corporal (100 - 500 Reputation Level)jobesd User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 6 h 24 m 18 sec
Reputation Power: 14
Need pointed in right direction Serial generation

This is what I want to do in php.

This is an example:

--------- Keygenerator.php


Use A Seed Key: 10952783587 <- any of my choosing
Enter a Name: billy bob



---------

result:

Name: billy bob
Key: 7319C0258CD6502BFFFEC44D


In a decrypte.php

enter 7319C0258CD6502BFFFEC44D

to get the original name: billy bob


can this be done?


jobesd
__________________
I only do what the voices in my head keep telling me to do.

Reply With Quote
  #2  
Old July 15th, 2003, 07:16 PM
dog135's Avatar
dog135 dog135 is offline
Doggie
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jul 2003
Location: Seattle, WA
Posts: 751 dog135 User rank is Corporal (100 - 500 Reputation Level)dog135 User rank is Corporal (100 - 500 Reputation Level)dog135 User rank is Corporal (100 - 500 Reputation Level)dog135 User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 10 h 38 m 25 sec
Reputation Power: 11
How good does the encryption need to be? Here's a fast and dirty one, but not too hard to break if you know what to look for and you have at least one sample of a before and after value:

for each letter in your key, do a binary xor against the corrasponding letter in your input value. If key runs out of characters, start again from the first character. Take end results, convert to Hex (since it can end up being any value)

To reverse, convert hex to string, and xor against your key again.

The only problem with this, is if someone knows both the start and end values, they can xor them against each other to get your key.

I use this method for encrypting files on my HD (without the hex conversion) since no one could possibly know the before value. (even the file name is encrypted)

Last edited by dog135 : July 15th, 2003 at 07:18 PM.

Reply With Quote
  #3  
Old July 15th, 2003, 09:02 PM
jobesd jobesd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2001
Location: USA
Posts: 194 jobesd User rank is Corporal (100 - 500 Reputation Level)jobesd User rank is Corporal (100 - 500 Reputation Level)jobesd User rank is Corporal (100 - 500 Reputation Level)jobesd User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 6 h 24 m 18 sec
Reputation Power: 14
I think that I can do it this way. I am using base64 encoding with a variety of encoding,slicing and dicing, rencoding and an eregi at the end.

seed key "0123456789";
name = "My Name";

cryptkey1 = "1268469bGr4576KfRGVD22307"
cryptkey2 = "5lu7s3fg5ll8591311lygfd"
cryptkey3 = "kl582fg69hjlddWNgf458FF12886"


after doing what I do I get this serial. to decrypt I just do a reverse order of the steps.


serial =

Quote:
Vm14a01HRXhUWGxVYms1aFUwWmFVMWxyYUVOalJsbDNWbXQwV0ZadFVsaFhWRTV2VlRBeFZrNVZhRnBOUmxwMlZsVmFZV05zVG5O aA0KUmxwb1lUTkNNbFpHVm1GWGJWWllWV3RLVVEwS1ZrUkNUMUV5ZEVkTlJsSjBWRzB4VGxKRmEzaFVNRkpPVGxFd1MxUnJVa1ps UlRSMw0KVFZaV1ZGZElRbEJWYTFwV1pWWlNkV05ITlU5V1ZFWkdWV3hvYzFSdFZuTlNXR2hWWWxoQ2NRMEtWR3RWTlZaV1JsVk5S VFZFV25vdw0KT1VSUmNIaFpiVFF4V1RKb2JtRkVhelJhYlZGNVRXcFdWbUV5VWt4Wk1uaHJaRlpHYzJOSGJGaFNWWEJhVmpGYWFt VkdTWGhVYTJScQ0KVWxkb1VRMEtWbTEwUzFkR1ZuRlRiVGxPVW14c05WcEZSVGxRVVRCTFVWaFNUMWt5V1hkTmFsVTBUWHByTUUx VVJUTlVWbEpLWldzMQ0KUlZaVVNrOWxiV014VkZWU1JtVlZNVFpWVkVaUFlXMU5NQTBLVkRGU1FsQlJNRXNOQ2c9PQ0K


decrypted = My Name



I just don't know how secure it would be using this method. I don't have mcrypt available.

If I wanted to xor two serials like above together how could I do that?

I figure if I can make the scheme screewy and enough steps I can really make it difficult.


jobesd

Last edited by jobesd : July 15th, 2003 at 09:52 PM.

Reply With Quote
  #4  
Old July 16th, 2003, 11:28 AM
dog135's Avatar
dog135 dog135 is offline
Doggie
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jul 2003
Location: Seattle, WA
Posts: 751 dog135 User rank is Corporal (100 - 500 Reputation Level)dog135 User rank is Corporal (100 - 500 Reputation Level)dog135 User rank is Corporal (100 - 500 Reputation Level)dog135 User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 10 h 38 m 25 sec
Reputation Power: 11
I don't know about PHP, but to xor two values in Perl or C, you just do:

newval=oldval[x]^key[x];

The "^" character is the binary xor operator.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreSoftware Design > Need pointed in right direction Serial generation

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap