lkml.org 
[lkml]   [1998]   [Feb]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: Is there any way...
    In article <Pine.LNX.3.96.980224132847.2040A-100000@darkstar.phystech.com> you write:
    >I need to generate some unique number or string
    >based on real user ID of the process, so
    >that
    >1. the number is independent of OS version
    >2. reproducible
    >3. other user ID would not be able to generate
    > the same number even if he got a hold on
    > a source code

    A way could be the following: write a kernel module that contains a secret
    key K and implements md5; this modules attaches itself to a device that
    will return, when read or ioctled, the result of md5(getuid(),K). All you
    need is to maintain the binary secret (that means chmod 600 on the .o);
    the sources may be distributed freely. You may insert it anytime, with
    kerneld for instance.

    The /dev/random linux code uses md5, so you will easily find some code to
    copy.

    I see no way to do it without some secret key. After all, if there was no
    secret, a user could reproduce the system on his own home-linux-PC.

    --Thomas Pornin

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.rutgers.edu

    \
     
     \ /
      Last update: 2005-03-22 13:41    [W:3.068 / U:0.016 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site