diff options
author | Yigit Sever | 2021-04-15 05:30:53 +0300 |
---|---|---|
committer | Yigit Sever | 2021-04-15 05:30:53 +0300 |
commit | 82f8e6877a57316860a9468f523decaae9f7529b (patch) | |
tree | 174a0d5a0e5918f4eb41cfba1a45a469531d64d2 /site/public/index.html | |
parent | ee5dcba9046cdad96af673446165af0169fe15fe (diff) | |
download | gradecoin-82f8e6877a57316860a9468f523decaae9f7529b.tar.gz gradecoin-82f8e6877a57316860a9468f523decaae9f7529b.tar.bz2 gradecoin-82f8e6877a57316860a9468f523decaae9f7529b.zip |
Start frontend
Diffstat (limited to 'site/public/index.html')
-rw-r--r-- | site/public/index.html | 134 |
1 files changed, 115 insertions, 19 deletions
diff --git a/site/public/index.html b/site/public/index.html index 0177355..05a37a0 100644 --- a/site/public/index.html +++ b/site/public/index.html | |||
@@ -71,31 +71,34 @@ | |||
71 | <b style="color: deepskyblue">Gradecoin</b> is the latest cutting edge blockchain technology agile grading framework that drives organic engagement and other buzzwords, with big data mining search engine optimization | 71 | <b style="color: deepskyblue">Gradecoin</b> is the latest cutting edge blockchain technology agile grading framework that drives organic engagement and other buzzwords, with big data mining search engine optimization |
72 | </h3> | 72 | </h3> |
73 | <div> | 73 | <div> |
74 | <!-- <a class="github-button" href="https://github.com/huhu/juice" data-size="large" data-show-count="true" --> | ||
75 | <!-- aria-label="Star huhu/juice on GitHub">Star</a> --> | ||
76 | <!-- <a class="github-button" href="https://github.com/huhu/juice/fork" data-size="large" --> | ||
77 | <!-- data-show-count="true" aria-label="Fork huhu/juice on GitHub">Fork</a> --> | ||
78 | </div> | 74 | </div> |
79 | </section> | 75 | </section> |
80 | <img class="hero-image" style="width: 50%" src="http://localhost:8080/gradecoin.png"> | 76 | <img class="hero-image" style="width: 45%" src="http://localhost:8080/gradecoin.png"> |
81 | 77 | ||
82 | <div class="explore-more text" | 78 | <div class="explore-more text" |
83 | onclick="document.getElementById('features').scrollIntoView({behavior: 'smooth'})"> | 79 | onclick="document.getElementById('features').scrollIntoView({behavior: 'smooth'})"> |
84 | ⇩ Learn How ⇩ | 80 | ⇩ Learn How ⇩ |
85 | </div> | 81 | </div> |
86 | <style> | 82 | <style> |
83 | |||
87 | .hero section { | 84 | .hero section { |
88 | padding: 0 5rem; | 85 | padding: 0 5rem; |
89 | } | 86 | } |
90 | @media screen and (max-width: 768px) { | 87 | |
91 | .hero section { | 88 | @media screen and (max-width: 768px) { |
92 | padding: 0 2rem; | 89 | .hero section { |
93 | } | 90 | padding: 0 2rem; |
94 | 91 | } | |
95 | .hero-image { | 92 | |
96 | display: none | 93 | .hero-image { |
97 | } | 94 | display: none |
98 | } | 95 | } |
96 | |||
97 | } | ||
98 | footer { | ||
99 | color: #8b8b8b; | ||
100 | } | ||
101 | |||
99 | </style> | 102 | </style> |
100 | 103 | ||
101 | </div> | 104 | </div> |
@@ -112,6 +115,21 @@ | |||
112 | <div class="toc-sticky"> | 115 | <div class="toc-sticky"> |
113 | 116 | ||
114 | <div class="toc-item"> | 117 | <div class="toc-item"> |
118 | <a class="subtext" href="http://localhost:8080/#welcome-to-gradecoin">Welcome to Gradecoin!</a> | ||
119 | </div> | ||
120 | |||
121 | |||
122 | <div class="toc-item"> | ||
123 | <a class="subtext" href="http://localhost:8080/#coinbase">Coinbase</a> | ||
124 | </div> | ||
125 | |||
126 | |||
127 | <div class="toc-item"> | ||
128 | <a class="subtext" href="http://localhost:8080/#public-key-signatures">Public Key Signatures</a> | ||
129 | </div> | ||
130 | |||
131 | |||
132 | <div class="toc-item"> | ||
115 | <a class="subtext" href="http://localhost:8080/#services">Services</a> | 133 | <a class="subtext" href="http://localhost:8080/#services">Services</a> |
116 | </div> | 134 | </div> |
117 | 135 | ||
@@ -130,6 +148,37 @@ | |||
130 | 148 | ||
131 | 149 | ||
132 | 150 | ||
151 | <div class="toc-item"> | ||
152 | <a class="subtext" href="http://localhost:8080/#questions">Questions</a> | ||
153 | </div> | ||
154 | |||
155 | |||
156 | <div class="toc-item-child"> | ||
157 | <a class="subtext" href="http://localhost:8080/#this-all-sound-complicated"><small>- This all sound complicated!</small></a> | ||
158 | </div> | ||
159 | |||
160 | <div class="toc-item-child"> | ||
161 | <a class="subtext" href="http://localhost:8080/#i-found-a-bug"><small>- I found a bug!</small></a> | ||
162 | </div> | ||
163 | |||
164 | <div class="toc-item-child"> | ||
165 | <a class="subtext" href="http://localhost:8080/#i-hacked-the-server"><small>- I hacked the server!</small></a> | ||
166 | </div> | ||
167 | |||
168 | <div class="toc-item-child"> | ||
169 | <a class="subtext" href="http://localhost:8080/#submission"><small>- Submission?</small></a> | ||
170 | </div> | ||
171 | |||
172 | <div class="toc-item-child"> | ||
173 | <a class="subtext" href="http://localhost:8080/#can-my-friends-play"><small>- Can my friends play?</small></a> | ||
174 | </div> | ||
175 | |||
176 | <div class="toc-item-child"> | ||
177 | <a class="subtext" href="http://localhost:8080/#how-and-or-why"><small>- How and or Why?</small></a> | ||
178 | </div> | ||
179 | |||
180 | |||
181 | |||
133 | </div> | 182 | </div> |
134 | </div> | 183 | </div> |
135 | 184 | ||
@@ -138,10 +187,28 @@ | |||
138 | <div class="content text"> | 187 | <div class="content text"> |
139 | 188 | ||
140 | <div id="features" class="heading-text">Overview</div> | 189 | <div id="features" class="heading-text">Overview</div> |
141 | <ul> | 190 | <h1 id="welcome-to-gradecoin">Welcome to Gradecoin!</h1> |
142 | <li>Don't know where to start? Gradecoin uses RESTful API, simple <code>curl</code> commands or even your browser will work! <a href="https://curl.trillworks.com/">This website can help as well</a>.</li> | 191 | <p>Blockchains are incredibly simple yet can appear very complicated, we will see how they work and practice programming <em>production</em> cryptography code.</p> |
143 | <li><a href="https://jwt.io">JWT Debugger</a> and the corresponding <a href="https://tools.ietf.org/html/rfc7519">RFC</a></li> | 192 | <p>This server is the sandbox for the PA1, it's currently running the Gradecoin application. Gradecoin is the faux currency we will use to simulate a blockchain network. At the end of the simulation, the amount of Gradecoin you hold will be your PA1 grade.</p> |
144 | </ul> | 193 | <p><strong>A quick summary</strong>: authenticate yourself to the system using public key encryption. |
194 | Craft <a href="http://localhost:8080/transaction-docs/">Transaction</a> proposals and tag them using <a href="http://localhost:8080/jwt/">JWTs</a>. | ||
195 | When there are enough transactions then you can propose <a href="http://localhost:8080/block-docs/">Blocks</a> in the same way. | ||
196 | Blocks need to be <em>mined</em> beforehand using Proof-of-work, or brute force.</p> | ||
197 | <p>Gradecoin offers 3 endpoints at <a href="/register">/register</a>, <a href="/block">/block</a> and <a href="/transaction">/transaction</a>. You can only send GET requests to /block and /transaction without authorization. | ||
198 | The server is programmed in <a href="https://www.service-architecture.com/articles/web-services/representational_state_transfer_rest.html">RESTful</a> architecture, there are no <code>DELETE</code>, <code>PUT</code> or <code>UPDATE</code> operations, though.</p> | ||
199 | <p>Gradecoin uses a Proof-of-work block accepting mechanism. It uses single round <a href="https://www.blake2.net/">Blake2s</a> hashing which produces 256-bit (64 hexadecimal characters) output. The <a href="https://wiki.bitcoinsv.io/index.php/Target">target</a> hash is <em>24 bits</em> or <em>6 hexadecimal characters</em> of 0. During testing, I could mine a block on average around 2-7 minutes.</p> | ||
200 | <blockquote> | ||
201 | <p>We're expecting you to use existing tools and implementations. Standards are hard. <a href="https://www.reddit.com/r/crypto/comments/2coqsy/dont_roll_your_own/">Don't roll your own crypto</a>. Feel free to ask questions. Collaborate.</p> | ||
202 | </blockquote> | ||
203 | <p>You might ask,</p> | ||
204 | <blockquote> | ||
205 | <p>But if nobody has any Gradecoin then how do we have transactions?</p> | ||
206 | </blockquote> | ||
207 | <p>There is a bank! Their public key is <code>31415926535897932384626433832795028841971693993751058209749445923</code> and they have some amount of Gradecoin preloaded. It's also the only account that you can send transactions requests <em>to</em> yourself.</p> | ||
208 | <h1 id="coinbase">Coinbase</h1> | ||
209 | <p>The first transactions of a block is called the <code>coinbase</code>. They are the <strong>author</strong> of the block proposal and if the block is accepted then they get compensated for their efforts with some Gradecoin.</p> | ||
210 | <h1 id="public-key-signatures">Public Key Signatures</h1> | ||
211 | <p>Gradecoin uses 2048 bit RSA keyspairs.</p> | ||
145 | <h1 id="services">Services</h1> | 212 | <h1 id="services">Services</h1> |
146 | <h2 id="register">/register</h2> | 213 | <h2 id="register">/register</h2> |
147 | <ul> | 214 | <ul> |
@@ -171,6 +238,35 @@ | |||
171 | <li>fetch the last accepted [<code>schema::Block</code>] - GET request</li> | 238 | <li>fetch the last accepted [<code>schema::Block</code>] - GET request</li> |
172 | </ul> | 239 | </ul> |
173 | <p><code>Authorization</code>: The request header should have Bearer JWT.Token signed with Student Public Key</p> | 240 | <p><code>Authorization</code>: The request header should have Bearer JWT.Token signed with Student Public Key</p> |
241 | <h1 id="questions">Questions</h1> | ||
242 | <h2 id="this-all-sound-complicated">This all sound complicated!</h2> | ||
243 | <ul> | ||
244 | <li>I've drawn inspiration from <a href="https://explorer.bitcoin.com/btc">actual Bitcoin transactions</a> and <a href="https://github.com/seanmonstar/warp/blob/master/examples/todos.rs">warp</a>. The simplicity of the system is how little interfaces it has.</li> | ||
245 | <li>Don't know where to start? Gradecoin uses RESTful API; simple <code>curl</code> commands or even your browser will work! <a href="https://curl.trillworks.com/">This website can help as well</a>.</li> | ||
246 | <li><a href="https://jwt.io">JWT Debugger</a> and the corresponding <a href="https://tools.ietf.org/html/rfc7519">RFC</a></li> | ||
247 | <li>Remember that you are absolutely encouraged to grab off-the-shelf implementations for every cryptography primitive you will use. You can start by finding a code snippet to generate a RSA keypair?</li> | ||
248 | </ul> | ||
249 | <h2 id="i-found-a-bug">I found a bug!</h2> | ||
250 | <p>Thank you! Please <a href="mailto:yigit@ceng.metu.edu.tr">let me know</a> so we can solve it.</p> | ||
251 | <h2 id="i-hacked-the-server">I hacked the server!</h2> | ||
252 | <p>That wasn't supposed to happen :( I did not place any intentional vulnerabilities to the system so if you cracked something, it was not intended. Please don't abuse it and let me know so I can patch it.</p> | ||
253 | <h2 id="submission">Submission?</h2> | ||
254 | <p>At the end of the <em>simulation</em>, your Gradecoin balance will be your grade. I will also expect a unique client programmed in either;</p> | ||
255 | <ul> | ||
256 | <li>c</li> | ||
257 | <li>c++</li> | ||
258 | <li>perl</li> | ||
259 | <li>rust</li> | ||
260 | <li>python</li> | ||
261 | <li>random assortment of bash scripts</li> | ||
262 | </ul> | ||
263 | <p>If your favourite programming language is missing please let me know 🤷?</p> | ||
264 | <h2 id="can-my-friends-play">Can my friends play?</h2> | ||
265 | <p>Sadly, no. Student's who are enrolled to the class will receive one-time-passwords for authentication.</p> | ||
266 | <h2 id="how-and-or-why">How and or Why?</h2> | ||
267 | <ul> | ||
268 | <li><a href="https://xkcd.com/2314/">Built</a>, with <a href="https://xkcd.com/2418/">Rust</a></li> | ||
269 | </ul> | ||
174 | 270 | ||
175 | 271 | ||
176 | </div> | 272 | </div> |
@@ -181,7 +277,7 @@ | |||
181 | 277 | ||
182 | 278 | ||
183 | <footer> | 279 | <footer> |
184 | ⁂ | 280 | Built For ⁂ CENG489 ⁂ Introduction to Computer Security |
185 | </footer> | 281 | </footer> |
186 | 282 | ||
187 | </body> | 283 | </body> |