Git Product home page Git Product logo

unifyid_randomfun's Introduction

UnifyID_RandomFun

Repository details

This repository consists of true random number generation using Random.org API (https://www.random.org/clients/http/) and also simple RSA key generation algorithm using random generated by Random.org

Random Number generation

RANDOM.ORG offers true random numbers to anyone on the Internet. The randomness comes from atmospheric noise, which for many purposes is better than the pseudo-random number algorithms typically used in computer programs. People use RANDOM.ORG for holding drawings, lotteries and sweepstakes, to drive online games, for scientific applications and for art and music.

GenerateRandom.py

This file generates the true random numbers in Integer or Hex format. User can also specify the range in which he/she wants to generate the random number

example:

print "Generated random number is: " + generateRandomNumberInInteger(100,10000) #generate single random number
print "Generated multiple random numbers are: " + generateRandomNumbersInInteger(2) #generate 2 random numbers
print "Generated random number in hex is: " + generateRandomNumberInHex() # generate random number in hex

output:

Generated random number is: 7927
Generated multiple random numbers are:
605846458
598438231
Generated random number in hex is: 1196ff50

generateRSAKeyPair.py

This script generates the simple RSA pair using below mentioned dalgorithm

Note: For better and secure RSA key generation we should consider large prime number with 1024 digits. For simplicity I have considered the number ranging from 1 - 1000000000

  1. Prime Number Generation: Two large prime numbers pp and qq need to be generated.
  2. Modulus: From the two large numbers, a modulus nn is generated by multiplying pp and qq.
  3. Totient: The totient of n,ϕ(n)n,ϕ(n) is calculated.
  4. Public Key: A prime number is calculated from the range [3,ϕ(n))[3,ϕ(n)) that has a greatest common divisor of 11 with ϕ(n)ϕ(n).
  5. Private Key: Because the prime in step 4 has a gcd of 1 with ϕ(n)ϕ(n), we are able to determine it's inverse with respect to modϕ(n)modϕ(n).

unifyid_randomfun's People

Contributors

yashasm avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.