Click here to Skip to main content
15,891,951 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hello,

I'm looking for a RSA Encryption code IN SCILAB Language.
Who can help me.

Bye.
Posted
Updated 24-Aug-18 0:55am

function myRSA (str,p,q,e)
    n=p*q
    d=inversemodulo(e,eulerphi(n)),
    len=length(str)
     M=zeros(1,len)
     C=zeros(1,len)
     D=zeros(1,len)
     M=ascii(str),
     disp('ASCII code of the entered message:');
     disp(M)
     for j=1:len
         C(j)=powermod(M(j),e,n);
          end
     disp('Cipher Text of entered Msg:');
     disp(C);
      for j=1:len
         D(j)=powermod(C(j),d,n);
          end
     disp('Decrypted Cipher Text of entered Msg:')
     disp(D);
     disp(["Decrypted Text:",char(D)])
     endfunction
 
Share this answer
 
v2
Comments
Nelek 24-Aug-18 8:14am    
The question is 7 years old... did you notice it?
Dave Kreskowiak 24-Aug-18 9:14am    
And your "encryption" isn't RSA so it doesn't even answer the question.
Have you tried Google? You would be surprised what you can find by doing a little bit of your own research, rather than just leaving it to others...
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 19-Apr-11 3:20am    
OP commented:

Really I didn't find in google SCILAB source just IN C++.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900