Show page source of arc4random #121400

 1. arc4random.c/h あり
 1. arc4random.c/h をプロジェクトから削除、ファイルはある
 1. arc4random.c/h をプロジェクトから削除、ファイルも削除

== 1. + LibreSSL
{{{
RAND_bytes() -> libress/crypto/rand/rand_lib.c RAND_bytes()
  arc4random_buf() -> ttxssh/arc4random.c arc4random_buf()
    _rs_random_buf() -> ttxssh/arc4random.c _rs_random_buf()
      _rs_stir_if_needed() -> ttxssh/arc4random.c _rs_stir_if_needed()
        _rs_stir() -> ttxssh/arc4random.c _rs_stir()
          getentropy() -> ttxssh/arc4random.c getentropy()
          ※ここが RAND_bytes() だと無限ループになる
}}}
{{{
randombytes() -> ttxssh/ed25519_crypto_api.h arc4random_buf()
  arc4random_buf() -> ttxssh/arc4random.c arc4random_buf()
    以下同じ
}}}
{{{
arc4random() -> ttxssh/arc4random.c arc4random()
  _rs_random_u32() -> ttxssh/arc4random.c _rs_random_u32()
    _rs_stir_if_needed() -> ttxssh/arc4random.c _rs_stir_if_needed()
      以下同じ
}}}

== 1. + OpenSSL
{{{
RAND_bytes -> openssl/crypto/rand/rand_lib.c RAND_bytes()
  RAND_bytes_ex() -> openssl/crypto/rand/rand_lib.c RAND_bytes_ex()
    EVP_RAND_generate() -> openssl/crypto/evp/evp_rand.c EVP_RAND_generate()
}}}
{{{
arc4random_buf() -> ttxssh/arc4random.c arc4random_buf()
  _rs_random_buf() -> _rs_random_buf()
    _rs_stir_if_needed() -> ttxssh/arc4random.c _rs_stir_if_needed()
      _rs_stir() -> ttxssh/arc4random.c _rs_stir()
        RAND_bytes() -> openssl/crypto/rand/rand_lib.c RAND_bytes()
          以下同じ
}}}
{{{
arc4random() -> ttxssh/arc4random.c arc4random()
  _rs_random_u32()  -> ttxssh/arc4random.c _rs_random_u32()
    _rs_stir_if_needed() -> ttxssh/arc4random.c _rs_stir_if_needed()
      以下同じ
}}}

= libressl
{{{
libressl\crypto\rand\rand_lib.c(87): RAND_bytes(unsigned char *buf, int num)
libressl\include\openssl\rand.h(93): int  RAND_bytes(unsigned char *buf, int num);
libressl\crypto\compat\getentropy_win.c(29): int	getentropy(void *buf, size_t len);
libressl\include\compat\unistd.h(57): int getentropy(void *buf, size_t buflen);
libressl\crypto\compat\arc4random.c(86): _rs_stir(void)
libressl\crypto\compat\arc4random.c(180): arc4random(void)
libressl\crypto\compat\arc4random.c(191): arc4random_buf(void *buf, size_t n)
libressl\include\compat\stdlib.h(23): uint32_t arc4random(void);
libressl\include\compat\stdlib.h(24): void arc4random_buf(void *_buf, size_t n);
}}}