• Showing Page History #121399

Show page source of arc4random #121399

 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()
      以下同じ
}}}