RANDOM

Section: ¸®´ª½º ÇÁ·Î±×·¡¸Ó ¸Þ´º¾ó (4)
Updated: 1997³â 8¿ù 1ÀÏ
Index
Return to Main Contents
 

À̸§

random, urandom - Ä¿³Î random number ¼Ò½ºÀåÄ¡  

¼³¸í

/dev/random¿Í /dev/urandom ´Â Ä¿³ÎÀÇ ³­¼ö»ý¼º±â¿¡ ÀÎÅÍÆäÀ̽º¸¦ Á¦°øÇÑ´Ù. /dev/random´Â ¸ÞÀÌÀú ÀåÄ¡¹øÈ£1ÀÌ°í ¸¶ÀÌ³Ê ÀåÄ¡¹øÈ£ 8ÀÌ´Ù. /dev/urandomÀº ¸ÞÀÌÀú ÀåÄ¡¹øÈ£ 1ÀÌ°í ¸¶ÀÌ³Ê ÀåÄ¡ ¹øÈ£ 9ÀÌ´Ù.

³­¼ö»ý¼º±â´Â ÀåÄ¡ µå¶óÀ̹ö¿Í ¿£Æ®·ÎÇÇÇ®¾ÈÀÇ ´Ù¸¥ ¼Ò½ºµé·ÎºÎÅÍ ³ëÀÌÁ ¸ðÀº´Ù. »ý¼º±â´Â ¶ÇÇÑ ¿£Æ®·ÎÇÇ Ç®¾È ³ëÀÌÁîÀÇ ºñÆ®¼ö¸¦ °è»êÇÑ´Ù. ÀÌ°ÍÀ¸·Î ºÎÅÍ ¿£Æ®·ÎÇÇ Ç® ³­¼ö´Â »ý¼ºµÈ´Ù.

 

¼³Á¤

¿©·¯ºÐ ½Ã½ºÅÛ¿¡ /dev/random¿Í /dev/urandom°¡ ¾ø´Ù¸é, ¾Æ·¡ÀÇ ¸í·ÉÀ¸·Î »ý¼ºµÈ´Ù.

        mknod -m 644 /dev/random c 1 8
        mknod -m 644 /dev/urandom c 1 9
        chown root:root /dev/random /dev/urandom

¸®´ª½º½Ã½ºÅÛÀÌ ¿ÀÆÛ·¹ÀÌÅÍ ÀÛ¿ë¾øÀÌ ½ÃÀ۵ɶ§, ¿£Æ®·ÎÇÇ Ç®Àº Á¤È®È÷ ¾Ë¼ö ¾ø´Â »óÅ ÀÏ·±Áö ¸ð¸¥´Ù. ÀÌ°ÍÀº °è»êÄ¡º¸´Ù ¿£Æ®·ÎÇÇÇ®¾ÈÀÇ ³ëÀÌÁîÀÇ ½ÇÁ¦¾çÀ» ÁÙÀδÙ. ÀÌ·± ¿µ Ç⶧¹®¿¡ ¼Ë´Ù¿î°ú ½ÃÀ۽à ¿£Æ®·ÎÇÇ Ç® Á¤º¸¸¦ °¡Á®¿À´Â °É µ½´Â´Ù. ÀÌ·¸°Ô ÇϱâÀ§ÇØ, ¸®´ª½º ½Ã½ºÅÛÀÌ ½ÃÀÛÇÒ¶§ µ¿ÀÛÇÏ´Â Àû´çÇÑ ½ºÅ©¸³Æ®¿¡ ´ÙÀ½ÇàÀ» Ãß°¡ÇÑ´Ù.

        echo "Initializing kernel random number generator..."
        # Initialize kernel random number generator with random seed
        # from last shut-down (or start-up) to this start-up.  Load and
        # then save 512 bytes, which is the size of the entropy pool.
        if [ -f /var/random-seed ]; then
                cat /var/random-seed >/dev/urandom
        fi
        dd if=/dev/urandom of=/var/random-seed count=1

¶ÇÇÑ ¸®´ª½º°¡ ¼Ë´Ù¿î ÇÒ¶§ µ¿ÀÛÇÏ´Â Àû´çÇÑ ½ºÅ©¸³Æ®¿¡ ¾Æ·¡ÇàÀ» Ãß°¡ÇÑ´Ù.

        # Carry a random seed from shut-down to start-up for the random
        # number generator.  Save 512 bytes, which is the size of the
        # random number generator's entropy pool.
        echo "Saving random seed..."
        dd if=/dev/urandom of=/var/random-seed count=1

 

ÆÄÀÏ

/dev/random
/dev/urandom  

ÀúÀÚ

Ä¿³Î ³­¼ö »ý¼º±â´Â THeodore Ts'o <tytso@athena.mit.edu>°¡ ½è´Ù.  

°ü·Ã Ç׸ñ

mknod(1)
RFC 1750, "Randomness Recommendations for Security"  

¹ø¿ª

ÇÑ±Û Manpage ÇÁ·ÎÁ§Æ® (http://man.kldp.org) 2005³â 2¿ù 14ÀÏ


 

Index

À̸§
¼³¸í
¼³Á¤
ÆÄÀÏ
ÀúÀÚ
°ü·Ã Ç׸ñ
¹ø¿ª

This document was created by man2html, using the manual pages.
Time: 05:53:51 GMT, February 14, 2005