Tom's Guide > Forum > Programmation > probleme javascript RSA

probleme javascript RSA

Forum Programmation : probleme javascript RSA

TomsGuide.com : 800 000 inscrits répondent à toutes vos questions high-tech et informatique. Pour obtenir de l'aide, inscrivez-vous gratuitement !
Mot :    Pseudo :           
 

Bonjour a tous
voila je voudrai faire une simulation RSA pour mon tpe.
j aurai aimait savoir comment puige coupe "a" en plusieur block(afin de crypte chaque block comme sur cette page RSA ).

merci d avance
voici mon code

Code :
  1. <html><head><title></title>
  2. <script language="JavaScript">
  3. <!-- debut du script
  4. function modulo(a)    {
  5. x=Math.pow(a,5)%26;
  6. document.form.inv_a.value=x;
  7. }
  8. //  Fin du script -->
  9. </script></head>
  10. <div align="center"><br>
  11. </div>
  12. <br>
  13. <!-- Retours -->
  14. <div align="right">
  15. <table border="0">
  16.   <tbody><tr>    <td align="center"> </td>
  17.     <td align="right" width="240"> </td> 
  18.   </tr>
  19. </tbody></table>
  20. </div>
  21. <br>
  22. <table align="center" width="100%">
  23.       <tbody><tr align="center">
  24.         <td width="12%"> </td>
  25.         <td width="88%"><b><font size="3">crypte</font></b>        </td>
  26.       </tr>
  27.       <tr>
  28.         <td height="2250"><form name="form2">
  29.         </form>
  30.       </td>
  31.         <td valign="top">
  32. <form name="form">
  33. <table align="center" border="1" width="50%">
  34.   <tbody><tr align="center">
  35.     <table align="center" border="1" width="50%">
  36.   <tbody><tr align="center">
  37.    
  38. </td> 
  39.   </tr>
  40.   <tr align="center">
  41.     <td><b>numero : </b><input name="nb_a" size="10" maxlength="10" value="3"  type="text">
  42. </td>
  43.   </tr>
  44.   <tr align="center">
  45.     <td><input value="      crypte          " onClick="modulo(form.nb_a.value)" type="button">
  46. </td>
  47.   </tr>
  48.   <tr align="center">
  49.     <td><input name="inv_a" size="40" maxlength="40" type="text"></td>
  50.   </tr>
  51.   <tr align="center">
  52.   </tr>
  53. </tbody></table>
  54. </form>    </td>
  55. </tr>
  56. </tbody></table>
  57. </body></html>


Liens sponsorisés
Inscrivez-vous ou connectez-vous pour masquer ceci.
Tom's Guide > Forum > Programmation > probleme javascript RSA
Aller à :

Il y a 655 utilisateurs connus et inconnus. Pour voir la liste des connectés connus, cliquez ici.

Attention

Vous allez répondre sur un sujet resté inactif pendant plus de 6 mois.
Assurez-vous d'apporter des éléments nouveaux à la discussion avant de poursuivre.

Répondre Annuler
Liens