I think you could do this:

Take the base64-encoded value of the first CHK and convert it to a series of bytes 
(like through Java's String.getBytes() meathod).  Lets say this is saved in 
chkBytes[0][], chkBytes[1][] . . . chkBytes[n][] where n is the number of CHKs you 
want to input.  Now do something like this:

byte[] total = new byte[chkBytes[0].length];
// Fill the array with 0s
for(int i = 0; i < total.length; i++) total[i] = 0;
for(int i = 0; i < chkBytes[0].length; i++) {
    for(int j = 0; j < chkBytes.length; j++) {
        total[i] += chkBytes[j][i];
    }
}
// Then divide the values in total[] to get the average
for(int i = 0; i < total.length; i++) total[i] /= chkBytes.length;

Then make a String out of the total[] array and base64 encode it (using Freenet's 
special base64 encoding).

I think this will do what you want.  The hard part is finding an input that will hash 
to that value.

> is it mathematically possible to have a function that given two or more keys 
> returns a key that is equally far from them?
> 
> if such function existed and I fed it the hashed "aaa" and "ccc" and then 
> unhashed the output, would it be "bbb" ?
> 
> _________________________________________________________________
> Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
> 
> 
> _______________________________________________
> freenet-tech mailing list
> [EMAIL PROTECTED]
> http://lists.freenetproject.org/mailman/listinfo/tech
> 





-----------------------------------------------
Runbox Mail Manager - www.runbox.com
Free online email application

_______________________________________________
freenet-tech mailing list
[EMAIL PROTECTED]
http://lists.freenetproject.org/mailman/listinfo/tech

Reply via email to