1. Encrypting Long Numbers

If I had a (randomly generated) number like this:

    12847-47844-37847-38475

what process/algorithm could I use to encrypt it such that when a person
reads it to me I can run it through a program and read the result back to
them such that it would unlock the program for them to use it?

new topic     » topic index » view message » categorize

2. Re: Encrypting Long Numbers

Sounds like a one way hash.

C. K. Lester wrote:
> 
> 
> If I had a (randomly generated) number like this:
> 
>     12847-47844-37847-38475
> 
> what process/algorithm could I use to encrypt it such that when a person
> reads it to me I can run it through a program and read the result back to
> them such that it would unlock the program for them to use it?
>

new topic     » goto parent     » topic index » view message » categorize

3. Re: Encrypting Long Numbers

C. K. Lester wrote:

> > If I had a (randomly generated) number like this:
> >
> >     12847-47844-37847-38475
> >
> > what process/algorithm could I use to encrypt it such that when a person
> > reads it to me I can run it through a program and read the result back
to
> > them such that it would unlock the program for them to use it?

Lucius Hilarious replied:

> Sounds like a one way hash.

Thanks, but I wanted code. :P

new topic     » goto parent     » topic index » view message » categorize

4. Re: Encrypting Long Numbers

Hi C. K., you wrote:

<snip>

> Lucius Hilarious replied:
>
>> Sounds like a one way hash.
>
> Thanks, but I wanted code. :P

Maybe MD5?
"MD5 is a one-way hash function which generates a 128-bit (16-byte)
representation of any sequence of bits or bytes given."

http://www16.brinkster.com/davitf/

Or maybe something else from that page?

Best regards,
   Juergen

-- 
 /"\  ASCII ribbon campain  |    |\      _,,,---,,_
 \ /  against HTML in       |    /,`.-'`'    -.  ;-;;,_
  X   e-mail and news,      |   |,4-  ) )-,_..;\ (  `'-'
 / \  and unneeded MIME     |  '---''(_/--'  `-'\_)

new topic     » goto parent     » topic index » view message » categorize

5. Re: Encrypting Long Numbers

----- Original Message ----- 
From: "C. K. Lester" <cklester at yahoo.com>
To: "EUforum" <EUforum at topica.com>
Subject: Encrypting Long Numbers


> 
> 
> If I had a (randomly generated) number like this:
> 
>     12847-47844-37847-38475
> 
> what process/algorithm could I use to encrypt it such that when a person
> reads it to me I can run it through a program and read the result back to
> them such that it would unlock the program for them to use it?
> 

How long is a piece of string?

There are many many ways to do this. Your selection of an algorithm depends
on...
 a) How secure does it have to be
 b) How fast does it have to be
 c) Do you need single key or private/public key
 d) Is the program unlocked for one installation or for any installation

But aside from these considerations, do you really need 'encryption' or would a
'hash' function or 'key components' routine suffice?

I have code for all three methods (all propriatory and not 'offically
recognised' algorithms), plus code for very random numbers. You might like to
stick with standard algorithms (eg. AES for encryption, MD5 for hashing)
-- 
Derek

new topic     » goto parent     » topic index » view message » categorize

6. Re: Encrypting Long Numbers

--- Derek Parnell <ddparnell at bigpond.com> wrote:

> > If I had a (randomly generated) number like this:
> > 
> >     12847-47844-37847-38475
> 
> But aside from these considerations, do you really
> need 'encryption' or would a 'hash' function or 'key
> components' routine suffice? 

A good hash is probably all I need. Except I don't
know what a hash is from an encryption... :)

My company has used this method for a long time, but
I'm wanting to not have to reinvent any wheels. We
have to use different code because it's a new and
improved product... :)

-ck



__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

new topic     » goto parent     » topic index » view message » categorize

7. Re: Encrypting Long Numbers

On 11 Jul 2003, at 18:22, C. K. Lester wrote:

> 
> 
> --- Derek Parnell <ddparnell at bigpond.com> wrote:
> 
> > > If I had a (randomly generated) number like this:
> > > 
> > >     12847-47844-37847-38475
> > 
> > But aside from these considerations, do you really
> > need 'encryption' or would a 'hash' function or 'key
> > components' routine suffice? 
> 
> A good hash is probably all I need. Except I don't
> know what a hash is from an encryption... :)

In mirc, type:

/help hash tables

Kat

new topic     » goto parent     » topic index » view message » categorize

8. Re: Encrypting Long Numbers

Try this CK:

include sha1.e	-- http://www16.brinkster.com/davitf/
include b64.e		--
http://www.rapideuphoria.com/cgi-bin/asearch.exu?gen=3Don&keywords=3DLoma=
x

sequence t, fluff, txt

-- I assume you send it as an ascii sequence:
t=3D"12847-47844-37847-38475"=20

fluff=3D"Now CK would be real silly"&t[1..6]&
	  "if he just left this here,"&t[7..12]&
	  "instead of replacing it by"&t[13..18]&
	  "something only he knows .."&t[19..23]

txt=3Dencode64(sha_1(fluff))

printf(1,"%s\n",{txt})

-- ... send that back ...

if not equal(decode64(txt),sha_1(fluff)) then
	puts(1,"error\n")
end if

if getc(0) then end if

Providing no-one else knows what it is you do to build fluff (which
obviously needs to be the same at both ends), that should be pretty
tough to break.

Pete

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu