fix thme
This commit is contained in:
parent
98f3630082
commit
f9c0c66817
|
@ -12,7 +12,7 @@ params:
|
|||
description: "Hi! I'm Morgan!"
|
||||
keywords: [Blog]
|
||||
author: Me
|
||||
DateFormat: "Jan 2, 2006"
|
||||
DateFormat: "2006-01-02"
|
||||
assets:
|
||||
favicon: "https://blog.morgan.kr/favicon.ico"
|
||||
apple_touch_icon: "https://blog.morgan.kr/favicon.ico"
|
||||
|
|
|
@ -30,7 +30,7 @@ RSA는 일반적으로 알려져 있듯이 매우 큰 소수는 소인수 분해
|
|||
|
||||
원리를 바로 설명하자면, 서로 각자 매우 큰 소수 p, q를 준비한다. (p-1), (q-1)과 서로소인 e에 대해, ed mod (p-1)(q-1)이 1인 d의 값을 찾고, N=pq와 e를 공개한다. 이들이 공개키가 되고, d는 개인키가 된다.
|
||||
|
||||
공개키 N, e로 평서문 m을 암호화하기 위해서는 m^e mod N을 계산하면 된다. 개인키 d를 가지고 있는 사람이 이를 복호화 하기 위해서는 $ (m^e)^d mod N $을 계산하면, m을 알아낼 수 있다. 이 고정에서 페르마의 소정리가 이용되는데, 페르마의 소정리란, 어떤 수 N이 있을 때, 이 수와 서로소인 수 a에 대하여, $ a^(\phi(N)) = 1 mod N $가 성립한다는 법칙이다. 이때 $ \phi(n) $은 오일러 파이 함수로, 1-N까지궁 N와 서로소인 수의 개수를 의미한다. N이 두 소인수로 이루어진 합성수라면, $ \phi(N) = (p-1)(q-1) $로 나타난다. 바로 이 값을 이용해서 복호화를 진행한다. $ E*d $는 $ (p-1)(q-1)A + 1 $ 로 나타낼 수 있고, 따라서 $ m^(ed) = m^(A(p-1)(q-1) +1) $인데, $ m^(p-1)(q-1) $은 1이므로, 이 값이 $m$이 된다.
|
||||
공개키 N, e로 평서문 m을 암호화하기 위해서는 m^e mod N을 계산하면 된다. 개인키 d를 가지고 있는 사람이 이를 복호화 하기 위해서는 $ (m^e)^d mod N $을 계산하면, m을 알아낼 수 있다. 이 고정에서 페르마의 소정리가 이용되는데, 페르마의 소정리란, 어떤 수 N이 있을 때, 이 수와 서로소인 수 a에 대하여, $ a^{\phi(N)} = 1 \mod N $가 성립한다는 법칙이다. 이때 $ \phi(n) $은 오일러 파이 함수로, 1-N까지궁 N와 서로소인 수의 개수를 의미한다. N이 두 소인수로 이루어진 합성수라면, $ \phi(N) = (p-1)(q-1) $로 나타난다. 바로 이 값을 이용해서 복호화를 진행한다. $ E*d $ 는 $ (p-1)(q-1)A + 1 $ 로 나타낼 수 있고, 따라서 $ m^(ed) = m^(A(p-1)(q-1) +1) $인데, $ m^(p-1)(q-1) $은 1이므로, 이 값이 $m$이 된다.
|
||||
|
||||
$M^e mod N$과 $N, $e로는 원문 $m$과 개인키 $d$를 계산할 수 없다. 이를 계산하기 위해서는
|
||||
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
<link rel="shortcut icon" href="/favicon.ico" />
|
||||
<title>{{- block "title" . }}{{ with .Title }}{{ . }} | {{ end }}{{ .Site.Title }}{{- end }}</title>
|
||||
|
||||
<!-- Primary Meta Tags -->
|
||||
<meta name="title" content="{{ with .Title }}{{ . }}{{ else }}{{ .Site.Title }}{{ end }}" />
|
||||
<meta name="description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}" />
|
||||
<meta name="keywords" content="{{ if .IsPage}}{{ range $index, $tag := .Params.tags }}{{ $tag }},{{ end }}{{ else }}{{ range $plural, $terms := .Site.Taxonomies }}{{ range $term, $val := $terms }}{{ printf "%s," $term }}{{ end }}{{ end }}{{ end }}" />
|
||||
|
@ -16,42 +15,31 @@
|
|||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.10/dist/katex.min.css" integrity="sha384-wcIxkf4k558AjM3Yz3BBFQUbk/zgIYC2R0QpeeYb+TwlBVMrlgLqwRjRtGZiK7ww" crossorigin="anonymous">
|
||||
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.10/dist/katex.min.js" integrity="sha384-hIoBPJpTUs74ddyc4bFZSM1TVlQDA60VBbJS0oA934VSz82sBx1X7kSx2ATBDIyd" crossorigin="anonymous"></script>
|
||||
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.10/dist/contrib/auto-render.min.js" integrity="sha384-43gviWU0YVjaDtb/GhzOouOXtZMP/7XUzwPTstBeZFe/+rCMvRwr4yROQP43s0Xk" crossorigin="anonymous"></script>
|
||||
|
||||
<script>
|
||||
document.addEventListener("DOMContentLoaded", function() {
|
||||
renderMathInElement(document.body, {
|
||||
delimiters: [
|
||||
{left: '$$', right: '$$', display: true},
|
||||
{left: '$', right: '$', display: false},
|
||||
{left: '\\(', right: '\\)', display: false},
|
||||
{left: '\\[', right: '\\]', display: true}
|
||||
],
|
||||
throwOnError : false
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<script>
|
||||
document.addEventListener("DOMContentLoaded", function() {
|
||||
renderMathInElement(document.body, {
|
||||
delimiters: [
|
||||
{left: '$$', right: '$$', display: true},
|
||||
{left: '$', right: '$', display: false},
|
||||
{left: '\\(', right: '\\)', display: false},
|
||||
{left: '\\[', right: '\\]', display: true}
|
||||
],
|
||||
throwOnError : false,
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<header>
|
||||
{{ if .IsHome }}
|
||||
<a href="{{ "" | relURL }}" class="title">
|
||||
<h2>{{ .Site.Title }}</h2>
|
||||
</a>
|
||||
{{ end }}
|
||||
<!-- <nav>
|
||||
<a href="{{ "" | relURL }}">Home</a>
|
||||
{{ range .Site.Menus.main }}
|
||||
<a href="{{ .URL }}">{{ .Name }}</a>
|
||||
{{ end }}
|
||||
{{ with .Site.GetPage "/blog" }}
|
||||
<a href="{{ "blog" | relURL }}">Blog</a>
|
||||
{{ end }}
|
||||
</nav> -->
|
||||
</header>
|
||||
{{ if .IsHome }}
|
||||
<header>
|
||||
<a href="{{ "" | relURL }}" class="title">
|
||||
<h2>{{ .Site.Title }}</h2>
|
||||
</a>
|
||||
</header>
|
||||
{{ end }}
|
||||
<main>
|
||||
{{- block "main" . }}{{- end }}
|
||||
{{- block "main" . }}{{- end }}
|
||||
</main>
|
||||
<footer>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
|
@ -10,10 +10,8 @@
|
|||
<ul class="blog-posts">
|
||||
{{ range $pages }}
|
||||
<li>
|
||||
<span>
|
||||
<time datetime='{{ .Date.Format "2006-01-02" }}' pubdate>
|
||||
{{ .Date.Format (default "2006-01-02" .Site.Params.dateFormat) }}
|
||||
</time>
|
||||
<span class="date">
|
||||
{{ .Date.Format "2006-01-02" }} |
|
||||
</span>
|
||||
<a href="{{ .Permalink }}">{{ .Title }}</a>
|
||||
</li>
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
{{ define "main" }}
|
||||
|
||||
<h1>{{ .Title }}</h1>
|
||||
<p>
|
||||
<time datetime='{{ .Date.Format "2006-01-02" }}' pubdate>
|
||||
{{ .Date.Format (default "02 Jan, 2006" .Site.Params.dateFormat) }}
|
||||
</time>
|
||||
</p>
|
||||
<div class="post-header">
|
||||
<div class="post-title">{{ .Title }}</div>
|
||||
<div class="post-date">{{ .Date.Format "2006-01-02" }}</div>
|
||||
<div class="post-divider"></div>
|
||||
</div>
|
||||
|
||||
<content>
|
||||
{{ .Content }}
|
||||
</content>
|
||||
|
|
|
@ -1,80 +1,83 @@
|
|||
<link rel="stylesheet" href="/css/syntax.css">
|
||||
<style>
|
||||
body {
|
||||
font-family: "Noto Sans", "Pretendard", sans-serif;
|
||||
font-size: 18px;
|
||||
font-family: "Source Sans 3", "Pretendard", sans-serif;
|
||||
font-size: 16px;
|
||||
margin: auto;
|
||||
padding: 20px;
|
||||
max-width: 720px;
|
||||
text-align: left;
|
||||
background-color: #fff;
|
||||
background-color: white;
|
||||
word-wrap: break-word;
|
||||
overflow-wrap: break-word;
|
||||
line-height: 1.5;
|
||||
/* color: #444;*/
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6,
|
||||
strong,
|
||||
b {
|
||||
color: #222;
|
||||
h1, h2, h3, h4, h5, h6, b, strong {
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 26px ;
|
||||
font-weight: bold;
|
||||
}
|
||||
h2 {
|
||||
font-size: 24px ;
|
||||
font-weight: bold;
|
||||
}
|
||||
h3 {
|
||||
font-size: 22px ;
|
||||
font-weight: bold;
|
||||
}
|
||||
h4 {
|
||||
font-size: 20px ;
|
||||
font-weight: bold;
|
||||
}
|
||||
h5 {
|
||||
font-size: 18px ;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
h1 { font-size: 26px; }
|
||||
h2 { font-size: 24px; }
|
||||
h3 { font-size: 22px; }
|
||||
h4 { font-size: 20px; }
|
||||
h5 { font-size: 18px; }
|
||||
|
||||
a {
|
||||
color: #3273dc;
|
||||
}
|
||||
|
||||
.katex {
|
||||
font-size: 16px !important;
|
||||
padding: 0 2px;
|
||||
}
|
||||
|
||||
.date {
|
||||
font-family: monospace;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.title {
|
||||
color: black;
|
||||
text-decoration: none;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.title span {
|
||||
font-weight: 400;
|
||||
ul.blog-posts {
|
||||
font-size: 16px;
|
||||
color: #0;
|
||||
list-style-type: none;
|
||||
padding: unset;
|
||||
}
|
||||
|
||||
nav a {
|
||||
margin-right: 10px;
|
||||
ul.blog-posts li a:visited {
|
||||
color: #8b6fcb;
|
||||
}
|
||||
|
||||
textarea {
|
||||
.post-header {
|
||||
text-align: center;
|
||||
margin: 0 auto;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
|
||||
.post-header .post-title {
|
||||
font-size: 26px;
|
||||
padding: 18px 0 14px 0;
|
||||
}
|
||||
|
||||
.post-header .post-date {
|
||||
font-family: monospace;
|
||||
padding-bottom: 30px;
|
||||
}
|
||||
|
||||
.post-header .post-author {
|
||||
font-family: monospace;
|
||||
padding-bottom: 30px;
|
||||
}
|
||||
|
||||
.post-header .post-divider {
|
||||
background-color: black;
|
||||
height: 1px;
|
||||
width: 100%;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
input {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
content {
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
table {
|
||||
|
@ -86,9 +89,9 @@ h5 {
|
|||
}
|
||||
|
||||
code {
|
||||
padding: 2px 5px;
|
||||
background-color: #EEE;
|
||||
font-size: 14px;
|
||||
padding: 2px 5px;
|
||||
background-color: #EEE;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
pre code {
|
||||
|
@ -117,56 +120,10 @@ h5 {
|
|||
font-style: italic;
|
||||
}
|
||||
|
||||
footer {
|
||||
padding: 25px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.helptext {
|
||||
color: #777;
|
||||
font-size: small;
|
||||
}
|
||||
|
||||
.errorlist {
|
||||
color: #eba613;
|
||||
font-size: small;
|
||||
}
|
||||
|
||||
/* blog posts */
|
||||
ul.blog-posts {
|
||||
font-size: 18px;
|
||||
color: #0;
|
||||
list-style-type: none;
|
||||
padding: unset;
|
||||
}
|
||||
|
||||
ul.blog-posts li {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
ul.blog-posts li span {
|
||||
flex: 0 0 130px;
|
||||
}
|
||||
|
||||
ul.blog-posts li a:visited {
|
||||
color: #8b6fcb;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
body {
|
||||
background-color: #333;
|
||||
color: #ddd;
|
||||
}
|
||||
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6,
|
||||
strong,
|
||||
b {
|
||||
color: #eee;
|
||||
color: white;
|
||||
}
|
||||
|
||||
a {
|
||||
|
@ -174,7 +131,7 @@ h5 {
|
|||
}
|
||||
|
||||
code {
|
||||
background-color: #777;
|
||||
background-color: #888;
|
||||
}
|
||||
|
||||
pre code {
|
||||
|
@ -190,10 +147,6 @@ h5 {
|
|||
background-color: #252525;
|
||||
color: #ddd;
|
||||
}
|
||||
|
||||
.helptext {
|
||||
color: #aaa;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
|
|
Loading…
Reference in New Issue