Topic: "Crypto question" (page 1 of 1)

1
Author Post
Kender
groupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmaster
What would be a good approach to figure out a function with two inputs that produces the same result for each of a given set of inputs?

So how to determine a F(x,y) where F(x1,y1) = F(x2,y2) = F(x3,y3), given a set of values for x1,y1,x2,y2,x3,y3?

Simple example:
Data: (1,74)(2,73)(3,72)(4,79)(5,78)
Solution: Letting F(x,y) be XOR(x,y) in this case produces 75 for all datasets.

Is there any clever way to home in on what F could be for all kinds of different sets of data?

Background:
I'm working on a cipher where I have the CTs of a PT encoded with different known keys.
For a certain character in the PT I know that when encrypted with the key 5, the result is 83 and the same char encrypted with 4 produces 80.
So far I have:
F(0,84) = F(1,87) = F(3,81) = F(4,80) = F(5,83)
F(0,88) = F(1,91) = F(3,93) = F(4,92) = F(5,95)
F(7,121) = F(8,118)
F(7,91) = F(8,84)
But I have had very little success in determining F.
That why I'm asking if anyone has any thoughts on good approaches for such a problem.
private message
unknown user
there is quite some stuff written about, finding functions that fit a certain dataset as well as possible. You might want to consult some formal literature.

first of all you can probably simplify your problem by looking for a function G for which
G(x1,y1) = G(x2,y2) = G(x3,y3)=0

the function F you seek, is then trivially computed by the formula F(x,y)=G(x,y)+F(x1,y1)

you then have to further limit the class of function you have to find. because otherwise you'll find this function



which is probably not what you want. However this already answers your question, on how to determine a function. Please update the question in such a way I can formulate a better answer. =)

It's clear that there is an infinite number of functions that satisfy the condition put forth, and XOR is a terrible function to work with. you basically have no information whatsoever on what the function does outside of your datapoints? then you are just guessing in an infinite space of functions.


EMail
Kender
groupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmaster
Hm, well I know that for F(x,y) x is in the range 0..9 and y is in the range 0..255 and the output is in the range 0..255 (So far my data has y in the range 20..121)

It also has to be reversible. As in P = F(K,C) & G(K,P) = C. (K = key, C is cipher, P = original, F = decrypt, G= encrypt)
("return (x*y*0)" for F(x,y) would indeed return the same P for all my datasets, but it would make G(x,0)=y impossible.)

I have a bunch of known K's and C's for some unknown P's.
I suspect a XOR (and perhaps a MOD) in the functions because my data says G(0,P)=84, G(1,P)=87, G(3,P)=81, G(4,P)=80, G(5,P)=83

However I'm having difficulties in figuring out the functions. There has to be a better way than just making up functions to see if they match the criteria.
I'm not looking for a direct solution but some guidelines or thoughts on how others approach this kind of crypto problem in general.
private message

Topic: "Crypto question" (page 1 of 1)

1