[125] in The Cryptographic File System users list

home help back first fref pref prev next nref lref last post

cmkdir coding question

daemon@ATHENA.MIT.EDU (Rob Stampfli)
Sat Feb 27 13:35:11 1999

From owner-cfs-users@nsa.research.att.com Sat Feb 27 18:35:11 1999
Return-Path: <owner-cfs-users@nsa.research.att.com>
Delivered-To: cfs-mtg@bloom-picayune.mit.edu
Received: (qmail 26833 invoked from network); 27 Feb 1999 18:35:10 -0000
Received: from unknown (HELO mail-green.research.att.com) (135.207.30.103)
  by bloom-picayune.mit.edu with SMTP; 27 Feb 1999 18:35:10 -0000
Received: from amontillado.research.att.com (amontillado.research.att.com [135.207.24.32])
	by mail-green.research.att.com (Postfix) with ESMTP
	id 7A57F1E01C; Sat, 27 Feb 1999 13:35:10 -0500 (EST)
Received: from nsa.research.att.com (majordomo@nsa.research.att.com [135.207.24.155])
	by amontillado.research.att.com (8.8.7/8.8.7) with ESMTP id NAA13379;
	Sat, 27 Feb 1999 13:35:14 -0500 (EST)
Received: (from majordomo@localhost) by nsa.research.att.com (8.7.3/8.7.3) id NAA11541 for cfs-users-list; Sat, 27 Feb 1999 13:31:43 -0500 (EST)
Received: from mail-green.research.att.com (mail-green.research.att.com [135.207.30.103]) by nsa.research.att.com (8.7.3/8.7.3) with ESMTP id NAA11537 for <cfs-users@nsa.research.att.com>; Sat, 27 Feb 1999 13:31:41 -0500 (EST)
Received: by mail-green.research.att.com (Postfix)
	id 8EEBE1E01F; Sat, 27 Feb 1999 13:33:42 -0500 (EST)
Delivered-To: cfs-users@research.att.com
Received: from elektro.cmhnet.org (elektro.com [192.188.133.3])
	by mail-green.research.att.com (Postfix) with ESMTP id EB1451E01C
	for <cfs-users@research.att.com>; Sat, 27 Feb 1999 13:33:41 -0500 (EST)
Received: (from nuucp@localhost)
	by elektro.cmhnet.org (8.9.1b+Sun/8.9.3/cs) id NAA18290
	for research.att.com!cfs-users; Sat, 27 Feb 1999 13:32:29 -0500 (EST)
X-Authentication-Warning: elektro.cmhnet.org: nuucp set sender to colnet!res using -f
>Received: by colnet.cmhnet.org (Smail3.1.28.1 #4)
	id m10GoTT-0008F9C; Sat, 27 Feb 99 13:28 EST
Message-Id: <m10GoTT-0008F9C@colnet.cmhnet.org>
Date: Sat, 27 Feb 99 13:28 EST
From: res@colnet.cmhnet.org (Rob Stampfli)
To: cfs-users@research.att.com
Subject: cmkdir coding question
Received: from colnet by elektro.cmhnet.org; Sat, 27 Feb 1999 13:32 EST
Content-Type: text
Sender: owner-cfs-users@research.att.com
Precedence: bulk
Return-Path: <owner-cfs-users@nsa.research.att.com>

I took some time this morning to look into how the ..k file works.
Of what I think I understand of it, one thing puzzles me:

Around line 145 of cmkdir.c (cfs-1.4.0beta2), there is the following code
snippet:

                /* now we xor in some truerand bytes for good measure */
                bcopy(&k,ekey,32);  /* assumes key material < 32 bytes */
                for (i=0; i<32; i++) {
                        ekey[i] ^= randbyte();
                }

Since XORing anything with unsaved random data produces random data,
what is the purpose of the bcopy()?

-- 
Rob Stampfli   rob@colnet.cmhnet.org       The Bill of Rights:  It was a
614-864-9377   HAM RADIO: kd8wk@w8cqk.oh   good thing while it lasted...


home help back first fref pref prev next nref lref last post