GithubHelp home page GithubHelp logo

crypto-dm's Introduction

Ce Dm a pour but d’implanter en C, en utilisant la librairie GMP, deux tests de primalité populaires qui sont: le test de Fermat et le test de Miller-Rabin.

1/ Fermat : dans notre programme "test-de-fermat"

Il est basé sur le Petit Théoréme de Fermat
2/ Miller-Rabin:

Le test de Miller-Rabin est lui aussi basé sur le Petit Théoréme de Fermat.
Si pour un nombre entier n, a^t ≡ 1 mod n, alors l’algorithme conclue que n est
probablement premier et termine. Si aucune de ces équations n’est vérifiée, alors l’algorithme renvoie que
n est composé.


3/ Square And Multiply: dans notre programme "SnM"

C'est la fonction qui effectue l’exponentiation modulaire qui utilise la décomposition binaire de l’exposant. -Le premier argument : un entier a. -Le deuxième argument : le module n . -Le troisiéme argument : un exposant h.
4/ main :

La compilation se fait sur la ligne de commandes avec la commande : make
Pour tester, toujours sur la ligne de commandes, on tape : ./tp n k

-"tp" : Le nom de l'éxecutable, qui signifie TestPrimalité.

-Le premier argument n : nombre à tester.

-Le deuxième argument k : nombre de répétition(facultatif, n-1 par défaut). Mais il voudrait mieux le mettre quand le nombre à tester est trop grand.

crypto-dm's People

Contributors

mohandacherir avatar

Watchers

James Cloos avatar  avatar

Forkers

lizzzd

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.