www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/11/17/19:08:17

From: eplmst AT lu DOT erisoft DOT se (Martin Stromberg)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: [request]Cryptology Source Code
Date: 16 Nov 1999 12:07:54 GMT
Organization: Ericsson Erisoft AB, Sweden
Lines: 50
Message-ID: <80rheq$lsd$1@antares.lu.erisoft.se>
References: <382D787B DOT 391AAD68 AT kornet DOT net>
NNTP-Posting-Host: propus-144.lu.erisoft.se
X-Newsreader: TIN [version 1.2 PL2]
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Son Ho Yong (sansam AT kornet DOT net) wrote:
: I'm student
: In Cryptology Math Problem!! T_T

: Question!!!!

: Method "Rabin Algorithm"  RSA Key Creation
: First    n = 2**s  *  m + 1     s,m calculate  and to next
: 1.     i <- 0
: 2.    a(2<= a <= n-1)

: 3.    y=A*m mod n        y=1 or y=n-1 go 5   //// HELP!!!! What Mean!!

: 4.     i<- i+1  i=s go 6.  y<- y**2 mod n    y=n-1 go 5,,,,,  y=1 go 6.
: 5.     prime Number
: 6.     Other Number

:   O(|n|**3)

: Comment  : 13 = 8(mod5), 3= 1/2 mod 5,  What Mean!!!!
: ' =' ='ΒΊ'
: I    Know  "13 mod 5 = 3"


You are confused because "mod" means different things in math-lingo
("13 = 8(mod5)") and in Pascal/C-lingo ("13 mod 5 = 3"), although
their meanings are similar.

Pascal/C-lingo:
"13 mod 5 = 3" (as you know): this means taking the remainder of the
(integer) operation 13/5. Or to put it in another way, 13 = 5*n + 3
for some n (n = ..., -2, -1, 0, 1, 2, ...). Here we see that this is
true for n = 2.

Math-lingo:
"13 = 8(mod5)" means 13 = 5*n + 8 for some n (n = ..., -2, -1, 0, 1,
2, ...). Here we see that this is true for n = 1.

In the same way we can state "13 = 8 = 3 = -1 = -4 = 4354353(mod 5)"
in math-lingo.

As for "3= 1/2 mod 5": you probably mean "3= 1/2 (mod 5)" in
math-lingo, right? For this you need to figure out what the operation
"/2" does in Z(5), I think. Or perhaps you can apply what I said about
13 = 8(mod 5)?


Right,

							MartinS

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019