다음과 같은 식이 있다.
4 + 9 = 1
5 - 7 = 10
2 + 3 = 5
이 연산은 모두 모듈러12 연산으로도 설명할 수 있다고 한다.
위키의 모듈러 연산에 대한 정의는 다음과 같다.
컴퓨팅에서 모듈로 연산은 한 숫자를 다른 숫자로 나눈 후 나눗셈의 나머지 또는 부호 있는 나머지를 반환합니다.
두 개의 양수 a와 n이 주어지면 모듈로 n은 a를 n으로 나눈 유클리드 나눗셈의 나머지입니다.
여기서 a는 피제수이고 n은 약수입니다
다음은 칸 아카데미에서 설명하는 내용인데
모듈러12 연산에 대해 설명하고 있다.
a ≡ b mod m이면 두 정수가 modulo m과 합동이라고 말한다.
이것을 다르게 표현하면
"정수 a를 m으로 나눌 때 나머지가 b이다."
로 표현할 수 있다.
이것은 a가 m으로 나누어 떨어지면 a ≡ 0 mod m임을 의미한다.
연습문제는 다음과 같다.
11 ≡ x mod 6
8146798528947 ≡ y mod 17
The solution is the smaller of the two integers.
11%6이 x이며 x는 5이다.
8146798528947%17이 y이며 y는 4이다.
레퍼런스
https://cryptohack.org/courses/modular/ma0/
CryptoHack – Home
A fun, free platform to learn about cryptography through solving challenges and cracking insecure code. Can you reach the top of the leaderboard?
cryptohack.org
모듈로 연산이란? (개념 이해하기) | 암호학이란? | Khan Academy
수학, 예술, 컴퓨터 프로그래밍, 경제, 물리학, 화학, 생물학, 의학, 금융, 역사 등을 무료로 학습해 보세요. 칸아카데미는 어디에서나 누구에게나 세계 최고의 무료 교육을 제공하는 미션을 가진
ko.khanacademy.org
https://en.wikipedia.org/wiki/Modulo
Modulo - Wikipedia
From Wikipedia, the free encyclopedia Computational operation In computing, the modulo operation returns the remainder or signed remainder of a division, after one number is divided by another (called the modulus of the operation). Given two positive numbe
en.wikipedia.org
'background > crypto' 카테고리의 다른 글
[CryptoHack] Quadratic Residues (제곱 잉여) (0) | 2023.07.01 |
---|---|
[CryptoHack] Modular Inverting (모듈로 역수) (0) | 2023.07.01 |
[CryptoHack] Modular Arithmetic 2 (0) | 2023.07.01 |
[CryptoHack] Extended GCD (0) | 2023.07.01 |
[CryptoHack] Greatest Common Divisor (GCD) (0) | 2023.06.30 |