[Python] Is True RNG possible in python?

Discussão em 'Python' iniciado por Stack, Maio 26, 2025.

  1. Stack

    Stack Membro Participativo

    As i seen, True RNG (TRNG) in a software-only program is impossible. Modern CPUs not providing TRNG to your software. For example, Intel CPUs starting from Ivy Bridge 3rd generation supports RDRND which uses thermal noise from the processor's circuits to generate random numbers. AMD modern CPUs also support RDRND too, starting from AMD FX "Bulldozer" CPUs (2011), also have TRNG support like Intel's feature.

    For example, this is a code uses Pseudo-Random Numbers Generation (PRNG):

    import random
    random_numbers = [random.randint(0, 100) for _ in range(10)]

    print("10 Random Numbers:")
    print(random_numbers)


    Can i get True RNG-based random numbers in python using system CPU's features? Without using sites provide True RNG numbers like this site.

    Continue reading...

Compartilhe esta Página