From owner-freebsd-chat@FreeBSD.ORG Sun May 25 20:10:08 2008 Return-Path: Delivered-To: freebsd-chat@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B48EE106566C for ; Sun, 25 May 2008 20:10:08 +0000 (UTC) (envelope-from aryeh.friedman@gmail.com) Received: from mta5.srv.hcvlny.cv.net (mta5.srv.hcvlny.cv.net [167.206.4.200]) by mx1.freebsd.org (Postfix) with ESMTP id 829058FC13 for ; Sun, 25 May 2008 20:10:08 +0000 (UTC) (envelope-from aryeh.friedman@gmail.com) Received: from ool-435559b8.dyn.optonline.net (ool-435559b8.dyn.optonline.net [67.85.89.184]) by mta5.srv.hcvlny.cv.net (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007)) with ESMTP id <0K1F00KRKXCVBAQ0@mta5.srv.hcvlny.cv.net> for freebsd-chat@freebsd.org; Sun, 25 May 2008 16:10:07 -0400 (EDT) Received: from ool-435559b8.dyn.optonline.net (localhost [127.0.0.1]) by ool-435559b8.dyn.optonline.net (8.14.2/8.14.2) with ESMTP id m4PKA6Rf072093 for ; Sun, 25 May 2008 16:10:06 -0400 Date: Sun, 25 May 2008 16:10:01 -0400 From: "Aryeh M. Friedman" To: fbsd_chat Message-id: <4839C799.6020104@gmail.com> MIME-version: 1.0 Content-type: text/plain; charset=ISO-8859-1; format=flowed Content-transfer-encoding: 7BIT X-Enigmail-Version: 0.95.6 User-Agent: Thunderbird 2.0.0.14 (X11/20080513) Subject: [OT] looking for a algorithm X-BeenThere: freebsd-chat@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Non technical items related to the community List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 May 2008 20:10:08 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Lets say I have a string of n bits that needs to be filled by repeatedly applying some function on k strings of m bits where |m|<|n|. Assuming that m(i) is a random string and n needs to also be random what is the best way to do this. Note it is possible that k*|m|>|n|. What I have been thinking so far is: ~ Let m' be the average length of m // this is pre-computable ~ Let n be all 0's ~ for i=0 --> k ~ pos=m'*i ~ xor string k[i] onto n starting at pos // wrap around if needed ~ While this is simple I wonder if it can be attacked (determine what k[i]) if k*|m|>|n| (it is trivial to attack if k*|m|<=|n|). Also is there some way to make attacking hard if k*|m|<=|n|? ~ Ideas? -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkg5x5gACgkQk8GFzCrQm4C47wCfVLGiXFwILBsRIoZ3Sx3fpMf7 DrsAn1Fr196aTJ3vMUFJ21+sqM0AZdB8 =UF9N -----END PGP SIGNATURE-----