<feed xmlns="http://www.w3.org/2005/Atom"> <id>https://blog.kch357.com//</id><title>kch357's Blog</title><subtitle>kch357's Blog.</subtitle> <updated>2026-06-27T20:09:48+09:00</updated> <author> <name>ChungHyeok Kang</name> <uri>https://blog.kch357.com//</uri> </author><link rel="self" type="application/atom+xml" href="https://blog.kch357.com//feed.xml"/><link rel="alternate" type="text/html" hreflang="ko" href="https://blog.kch357.com//"/> <generator uri="https://jekyllrb.com/" version="4.4.1">Jekyll</generator> <rights> © 2026 ChungHyeok Kang </rights> <icon>/assets/img/favicons/favicon.ico</icon> <logo>/assets/img/favicons/favicon-96x96.png</logo> <entry><title>[수학] 6. 라그랑주 정리</title><link href="https://blog.kch357.com//posts/rgrg/" rel="alternate" type="text/html" title="[수학] 6. 라그랑주 정리" /><published>2026-05-10T16:13:00+09:00</published> <updated>2026-05-10T16:13:00+09:00</updated> <id>https://blog.kch357.com//posts/rgrg/</id> <content type="text/html" src="https://blog.kch357.com//posts/rgrg/" /> <author> <name>kch357</name> </author> <category term="Mathematics" /> <summary>Understanding Cryptography | Christof Paar로 암호학을 공부하던 중 억울하게도 라그랑주의 정리 보다 라그랑주의 따름정리를 먼저 보게 되었다. 나는 아직 군(Group)의 개념을 처음 본 상황 이였고 라그랑주 정리뿐만 아니라 부분군(subgroup)이 뭔지도 몰랐다. 내가 공부하고 있는 교재는 암호학 교재여서 학교에서 배웠던 것처럼 증명은 잘 다루지 않았다. 그래서 내가 직접 증명을 해보려고 했다. 라그랑주 정리는 다음과 같다. Lagrange’s theorem 유한군 G와 그 부분군 H에 대하여, |H|는 |G|의 약수이다. 교재에는 라그랑주 정리 말고 그것의 따름 정리를 먼저 설명해 주었다. 교재에 나와있는 대로 정확히 쓰면 다음과 같다. 유한군 $...</summary> </entry> <entry><title>[암호학] 5. DES의 key는 왜 8비트가 버려지는가?</title><link href="https://blog.kch357.com//posts/des4/" rel="alternate" type="text/html" title="[암호학] 5. DES의 key는 왜 8비트가 버려지는가?" /><published>2026-05-02T21:16:00+09:00</published> <updated>2026-05-02T21:16:00+09:00</updated> <id>https://blog.kch357.com//posts/des4/</id> <content type="text/html" src="https://blog.kch357.com//posts/des4/" /> <author> <name>kch357</name> </author> <category term="Cryptography" /> <summary>DES를 두번 사용하는 암호학 문제를 meet-in-the-middle attack 을 활용하여 풀고있었다. 그러나 key 값이 마지막에 1비트씩 차이가 났었지만 정답은 맞는 상황이 발생했다. \xba\xc7\xb5\xf5는 문제에서 만든 key값이다. \xbb\xc7\xb4\xf4는 내가 찾은 key값이다. key의 값들이 최대 1비트씩 차이가 났었지만 정답을 맞추는 데에는 문제가 없었다. 왜그랬을까? 이유를 알기 위해서는 DES의 알고리즘을 확인해 볼 필요가 있다. 저번 블로그에서도 다뤘지만, DES의 KeySchedule은 다음과 같다. 여기서 보면 key는 64비트로 받는다. 하지만 PC-1 (permutation choice 1)을 지나면 56비트로 바뀐다. 즉, ke...</summary> </entry> <entry><title>[암호학] 4. RSA 암호</title><link href="https://blog.kch357.com//posts/rsa1/" rel="alternate" type="text/html" title="[암호학] 4. RSA 암호" /><published>2026-04-28T21:53:00+09:00</published> <updated>2026-06-21T18:14:10+09:00</updated> <id>https://blog.kch357.com//posts/rsa1/</id> <content type="text/html" src="https://blog.kch357.com//posts/rsa1/" /> <author> <name>kch357</name> </author> <category term="Cryptography" /> <summary>RSA 암호는 다음 4단계의 준비가 필요하다. $N$ 을 구한다. 임의의 두 소수 $p,q$ 에 대해서 $N = pq$ 이다. $\Phi(N)$ 을 구한다. $\Phi(N) = (p - 1)(q - 1)$ 이다. $e$ 를 구한다. ($e$는 공개키 이다.) $gcd(e, Φ(N)) = 1$을 만족시키는 정수 $e$를 구한다. (단, $0 &amp;lt; e &amp;lt; \Phi(n)$) (즉, $p−1, q−1$과 각각 서로소인 정수 $e$를 준비한다.) $d$ 를 구한다. ($d$는 개인키 이다.) $d\cdot e \equiv 1 \pmod{\Phi(N)}$ 을 만족시키는 정수 $d$를 구한다....</summary> </entry> <entry><title>[암호학] 3. DES를 C언어로 구현해보았다.</title><link href="https://blog.kch357.com//posts/des3/" rel="alternate" type="text/html" title="[암호학] 3. DES를 C언어로 구현해보았다." /><published>2026-04-22T21:29:00+09:00</published> <updated>2026-04-22T21:29:00+09:00</updated> <id>https://blog.kch357.com//posts/des3/</id> <content type="text/html" src="https://blog.kch357.com//posts/des3/" /> <author> <name>kch357</name> </author> <category term="Cryptography" /> <summary>DES Code #include &amp;lt;stdio.h&amp;gt; #include &amp;lt;string.h&amp;gt; #include &amp;lt;stdint.h&amp;gt; unsigned int IP[] = { ... unsigned int inv_IP[] = { ... unsigned int S[8][4][16] = { ... unsigned int E[] = { ... unsigned int P[] = { ... unsigned int PC1[] = { ... unsigned int PC2[] = { ... uint8_t get_bit(unsigned char *data, int n) { //비트로 변환 // n은 1 ~ 64 int byte_index = (n - 1) / 8; // ...</summary> </entry> <entry><title>[암호학] 2. DES의 심장, f-함수(f-function)를 C언어로 구현해보았다.</title><link href="https://blog.kch357.com//posts/des2/" rel="alternate" type="text/html" title="[암호학] 2. DES의 심장, f-함수(f-function)를 C언어로 구현해보았다." /><published>2026-04-19T20:00:00+09:00</published> <updated>2026-04-19T20:00:00+09:00</updated> <id>https://blog.kch357.com//posts/des2/</id> <content type="text/html" src="https://blog.kch357.com//posts/des2/" /> <author> <name>kch357</name> </author> <category term="Cryptography" /> <summary>DES Code unsigned int IP[] = { ... unsigned int inv_IP[] = { ... unsigned int S[8][4][16] = { ... unsigned int E[] = { ... unsigned int P[] = { ... void f_function(unsigned int *R, unsigned int *Key) { unsigned int ER[49]; for (int i = 1; i &amp;lt; 49; i++){ //Expansion &amp;amp; Key XOR ER[i] = R[E[i-1]]; ER[i] ^= Key[i]; } unsigned int row; unsigned int c...</summary> </entry> </feed>
