what is the matlab code for follwing equation

조회 수: 3 (최근 30일)
rjnt Kaur
rjnt Kaur 2013년 4월 16일
t=s^e(mod n)
u=m*m
c=(g^t)*r^m mod u
  댓글 수: 1
rjnt Kaur
rjnt Kaur 2013년 4월 16일
i am working on cryptography so need this code for cryptography

댓글을 달려면 로그인하십시오.

답변 (1개)

Walter Roberson
Walter Roberson 2013년 4월 16일
t = mod(s^e, n);
u = m*m;
c = mod((g^t) * r^m, u);
However! It is possible that the values you are working with, such as s^e, are going to (often) be too large to fit in 53 bits. If that is the case, then there are various number theory approaches that can be used to accurately calculate the mod. The details can depend upon whether s and n are mutually prime.
If you are working with cryptography or with prime numbers or with large numbers or with Galois Fields, or with CRCs, or with error-correcting polynomials, then you should probably not be using the straight-forward method I show above.

카테고리

Help CenterFile Exchange에서 Encryption / Cryptography에 대해 자세히 알아보기

태그

아직 태그를 입력하지 않았습니다.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by