-
[정보보안] Discrete Logarithm Problem(DLP)와 Elgamal Encryption(엘가멜 암호화)MajorClass/Information Security 2022. 12. 9. 14:08
1. Discrete Logarithm Problem(DLP)
- When g, Z*n and y are given, DLP is to find x such that
y ≡ gx mod n
2. Primality Test
더보기function primality(N)
Input: Positive integer N
Output: yes/no
Pick a positive integer a<N at random
if a p-1 ≡ 1 (mod N) :
return yes
else :
return no
소수가 아닌 합성수가 위의 primality test를 통과하는 경우가 있다.
341=11*31
2^340 ≡ 1 mod 341
- Carmical numbers
- a composite positive integer n which satisfies the congruence b^(n-1) ≡ 1 (mod n)
- for all integers b which are relatively prime to n
- pass Fermat's test for all a relatively prime to n
더보기function primality2(N)
Input: Positive integer N
Output: yes/no
Pick a positive integers a1,a2,a3,...,ak <N at random
if a ^(N-1) ≡ 1 (mod N) for all i=1,2,3...,k :
return yes
else :
return no
Algorithm return yes when N is not prime <= 1/(2^k)
3. 비대칭 암호화 방식(엘가멜)
- ElGamal
- Discrete Logarithm 문제의 어려움 이용
- RSA
- Factorizing(소인수분해) 문제의 어려움 이용
4. Elgamal Encryption
- Public Keys
- p : prime
- g : generator g < p , g ∈ Z*p
- Y ≡ gx mod p
- Private Key
- x : choose at random , x<p
- Encryption : Cipertext <a,b>
- k: choose at random, relatively prime to p-1 (secret)
- a = gk mod p
- b= YkM mod p
- Decryption
- M = b/ax(mod p)=ykM/gkx=gxkM/gkx=M
- 관련 그림
'MajorClass > Information Security' 카테고리의 다른 글
[정보보안] 전자서명 / RSA Signature / DSA (0) 2022.12.09 [정보보안] RSA Encryption과 Diffie-Hellman Key Exchange (0) 2022.12.09 [정보보안] 공개키 암호 시스템과 정수론 (0) 2022.12.07 [정보보안] 암호에 대한 이해(1) (0) 2022.12.07 [정보보안] Elgamal Encryption (엘가말 암호) (0) 2022.11.30