logmod

Computes y such that mod(a^y, p^N) == x
644 Descargas
Actualizado 23 abr 2009

Ver licencia

Suppose
p is an odd prime,
ord(a) = p-1
GCD(x, p) = 1
N is an integer >= 2

Then
y = logmod(x, a, p, N)

Returns y such that a^y = x (mod p^N)

Example
Let x= vpi(154), a = vpi(7), p = vpi(17), N = vpi(37)
y = logmod(x, a, p, N)
returns
y = 2088349219044680767324467844670001776975183904

Citar como

Steven Gregory (2026). logmod (https://es.mathworks.com/matlabcentral/fileexchange/23803-logmod), MATLAB Central File Exchange. Recuperado .

Compatibilidad con la versión de MATLAB
Se creó con R2006a
Compatible con cualquier versión
Compatibilidad con las plataformas
Windows macOS Linux
Categorías
Más información sobre Number Theory en Help Center y MATLAB Answers.
Agradecimientos

Inspirado por: nextperm, modinv(x, N)

Inspiración para: modinv(x, N), nextperm, egcd.m

Versión Publicado Notas de la versión
1.4.0.0

Brought the description up to date. This routine no longer needs the m-file modinv.m.

1.3.0.0

Modified to correct logic errors and to exploit the latest version of the vpi software. A Microsoft word file has been included that describes and proves the algorithm used.

1.2.0.0

Rewrote the description.

1.0.0.0