diff options
author | Yigit Sever | 2021-04-19 18:21:06 +0300 |
---|---|---|
committer | Yigit Sever | 2021-04-19 18:21:06 +0300 |
commit | df6fa5f322fc972b3894e720f2c406eb2d8f5f5a (patch) | |
tree | 4864006b54c512dea971d0c50efcacca65b12c6e /site/public/index.html | |
parent | d1b2e4bbd8f1ec5fe40c3d8c85ea4d13c8bfd755 (diff) | |
download | gradecoin-df6fa5f322fc972b3894e720f2c406eb2d8f5f5a.tar.gz gradecoin-df6fa5f322fc972b3894e720f2c406eb2d8f5f5a.tar.bz2 gradecoin-df6fa5f322fc972b3894e720f2c406eb2d8f5f5a.zip |
Moving site to separate repo
Diffstat (limited to 'site/public/index.html')
-rw-r--r-- | site/public/index.html | 362 |
1 files changed, 0 insertions, 362 deletions
diff --git a/site/public/index.html b/site/public/index.html deleted file mode 100644 index ef988ef..0000000 --- a/site/public/index.html +++ /dev/null | |||
@@ -1,362 +0,0 @@ | |||
1 | <!DOCTYPE html> | ||
2 | <html lang="en"> | ||
3 | |||
4 | <head> | ||
5 | <meta charset="UTF-8"> | ||
6 | <title>Gradecoin</title> | ||
7 | <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | ||
8 | <style> | ||
9 | :root { | ||
10 | /* Primary theme color */ | ||
11 | --primary-color: #F8D12F; | ||
12 | /* Primary theme text color */ | ||
13 | --primary-text-color: #1E2329; | ||
14 | /* Primary theme link color */ | ||
15 | --primary-link-color: #2F57F7; | ||
16 | /* Secondary color: the background body color */ | ||
17 | --secondary-color: #FAFAFA; | ||
18 | --secondary-text-color: #303030; | ||
19 | /* Highlight text color of table of content */ | ||
20 | --toc-highlight-text-color: #d46e13; | ||
21 | } | ||
22 | </style> | ||
23 | |||
24 | <link href="https://fonts.googleapis.com/css?family=Alfa+Slab+One&display=swap" rel="stylesheet"> | ||
25 | <link href="https://fonts.googleapis.com/css?family=Fira+Sans:400,500,600&display=swap" rel="stylesheet"> | ||
26 | <link rel="stylesheet" href="/normalize.css"> | ||
27 | <link rel="stylesheet" href="https://gradecoin.xyz/juice.css"> | ||
28 | |||
29 | <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css" /> | ||
30 | <link rel="stylesheet" href="/site.css" /> | ||
31 | |||
32 | </head> | ||
33 | |||
34 | <body> | ||
35 | |||
36 | |||
37 | <header class="pos-absolute" style="background-color: transparent"> | ||
38 | |||
39 | |||
40 | <a href="https://gradecoin.xyz/"> | ||
41 | <div class="logo"> | ||
42 | <img src="https://gradecoin.xyz/gradecoin.png" alt="logo"> | ||
43 | Gradecoin | ||
44 | </div> | ||
45 | </a> | ||
46 | |||
47 | <nav> | ||
48 | |||
49 | <a class="nav-item subtitle-text" href="https://gradecoin.xyz/register-docs/">Register</a> | ||
50 | |||
51 | <a class="nav-item subtitle-text" href="https://gradecoin.xyz/jwt/">JWT</a> | ||
52 | |||
53 | <a class="nav-item subtitle-text" href="https://gradecoin.xyz/transaction-docs/">Transactions</a> | ||
54 | |||
55 | <a class="nav-item subtitle-text" href="https://gradecoin.xyz/block-docs/">Blocks</a> | ||
56 | |||
57 | <a class="nav-item subtitle-text" href="https://gradecoin.xyz/misc-docs/">Misc</a> | ||
58 | |||
59 | |||
60 | |||
61 | <a class="nav-item subtitle-text" href="https://github.com/zhuowei/nft_ptr#why">why?</a> | ||
62 | |||
63 | |||
64 | </nav> | ||
65 | |||
66 | </header> | ||
67 | |||
68 | <div class="hero"> | ||
69 | |||
70 | |||
71 | <section class="text-center"> | ||
72 | <h1 class="heading-text animate__animated animate__jackInTheBox" style="font-size: 50px"> | ||
73 | Mine your own grades | ||
74 | </h1> | ||
75 | <h3 class="title-text"> | ||
76 | <b>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 | ||
77 | </h3> | ||
78 | <div> | ||
79 | </div> | ||
80 | </section> | ||
81 | <img class="hero-image" style="width: 40%" src="https://gradecoin.xyz/gradecoin.png"> | ||
82 | |||
83 | <div class="explore-more text" | ||
84 | onclick="document.getElementById('features').scrollIntoView({behavior: 'smooth'})"> | ||
85 | ⇩ Learn How ⇩ | ||
86 | </div> | ||
87 | |||
88 | <style> | ||
89 | |||
90 | .hero section { | ||
91 | padding: 0 5rem; | ||
92 | } | ||
93 | |||
94 | @media screen and (max-width: 768px) { | ||
95 | .hero section { | ||
96 | padding: 0 2rem; | ||
97 | } | ||
98 | |||
99 | .hero-image { | ||
100 | display: none | ||
101 | } | ||
102 | |||
103 | } | ||
104 | footer { | ||
105 | color: #8b8b8b; | ||
106 | } | ||
107 | </style> | ||
108 | |||
109 | </div> | ||
110 | |||
111 | |||
112 | |||
113 | <main> | ||
114 | |||
115 | |||
116 | |||
117 | |||
118 | |||
119 | <div class="toc"> | ||
120 | <div class="toc-sticky"> | ||
121 | |||
122 | <div class="toc-item"> | ||
123 | <a class="subtext" href="https://gradecoin.xyz/#welcome-to-gradecoin">Welcome to Gradecoin!</a> | ||
124 | </div> | ||
125 | |||
126 | |||
127 | <div class="toc-item"> | ||
128 | <a class="subtext" href="https://gradecoin.xyz/#coinbase">Coinbase</a> | ||
129 | </div> | ||
130 | |||
131 | |||
132 | <div class="toc-item"> | ||
133 | <a class="subtext" href="https://gradecoin.xyz/#public-key-signatures">Public Key Signatures</a> | ||
134 | </div> | ||
135 | |||
136 | |||
137 | <div class="toc-item"> | ||
138 | <a class="subtext" href="https://gradecoin.xyz/#services">Services</a> | ||
139 | </div> | ||
140 | |||
141 | |||
142 | <div class="toc-item-child"> | ||
143 | <a class="subtext" href="https://gradecoin.xyz/#register"><small>- /register</small></a> | ||
144 | </div> | ||
145 | |||
146 | <div class="toc-item-child"> | ||
147 | <a class="subtext" href="https://gradecoin.xyz/#transaction"><small>- /transaction</small></a> | ||
148 | </div> | ||
149 | |||
150 | <div class="toc-item-child"> | ||
151 | <a class="subtext" href="https://gradecoin.xyz/#block"><small>- /block</small></a> | ||
152 | </div> | ||
153 | |||
154 | <div class="toc-item-child"> | ||
155 | <a class="subtext" href="https://gradecoin.xyz/#user"><small>- /user</small></a> | ||
156 | </div> | ||
157 | |||
158 | |||
159 | |||
160 | <div class="toc-item"> | ||
161 | <a class="subtext" href="https://gradecoin.xyz/#questions">Questions</a> | ||
162 | </div> | ||
163 | |||
164 | |||
165 | <div class="toc-item-child"> | ||
166 | <a class="subtext" href="https://gradecoin.xyz/#this-all-sound-complicated"><small>- This all sound complicated!</small></a> | ||
167 | </div> | ||
168 | |||
169 | <div class="toc-item-child"> | ||
170 | <a class="subtext" href="https://gradecoin.xyz/#how-do-you-actually-earn-gradecoin"><small>- How do you actually earn Gradecoin?</small></a> | ||
171 | </div> | ||
172 | |||
173 | <div class="toc-item-child"> | ||
174 | <a class="subtext" href="https://gradecoin.xyz/#i-found-a-bug"><small>- I found a bug!</small></a> | ||
175 | </div> | ||
176 | |||
177 | <div class="toc-item-child"> | ||
178 | <a class="subtext" href="https://gradecoin.xyz/#i-hacked-the-server"><small>- I hacked the server!</small></a> | ||
179 | </div> | ||
180 | |||
181 | <div class="toc-item-child"> | ||
182 | <a class="subtext" href="https://gradecoin.xyz/#submission"><small>- Submission?</small></a> | ||
183 | </div> | ||
184 | |||
185 | <div class="toc-item-child"> | ||
186 | <a class="subtext" href="https://gradecoin.xyz/#can-my-friends-play"><small>- Can my friends play?</small></a> | ||
187 | </div> | ||
188 | |||
189 | <div class="toc-item-child"> | ||
190 | <a class="subtext" href="https://gradecoin.xyz/#how-and-or-why"><small>- How and or Why?</small></a> | ||
191 | </div> | ||
192 | |||
193 | |||
194 | |||
195 | </div> | ||
196 | </div> | ||
197 | |||
198 | |||
199 | |||
200 | <div class="content text"> | ||
201 | |||
202 | <div class="tcontainer" id="features"> | ||
203 | <div class="ticker-wrap"> | ||
204 | <div class="ticker-move"> | ||
205 | <div class="ticker-item"><b>News:</b></div> | ||
206 | <div class="ticker-item">Gradecoin is in testnet mode, API is not stable, everything might reset at any time.</div> | ||
207 | <div class="ticker-item">Transactions are now unique according to their "by" field, sorry for the trouble</div> | ||
208 | <div class="ticker-item">Blocks now require 5 transactions in them, during testnet phase</div> | ||
209 | <div class="ticker-item">It was possible (and hilarious) to mine a new block with just 1 transaction, it is now fixed</div> | ||
210 | </div> | ||
211 | </div> | ||
212 | </div> | ||
213 | <h1 id="welcome-to-gradecoin">Welcome to Gradecoin!</h1> | ||
214 | <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> | ||
215 | <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> | ||
216 | <p><strong>A quick summary</strong>: authenticate yourself to the system using public key encryption. | ||
217 | Craft <a href="https://gradecoin.xyz/transaction-docs/">Transaction</a> proposals and tag them using <a href="https://gradecoin.xyz/jwt/">JWTs</a>. | ||
218 | When there are enough transactions then you can propose <a href="https://gradecoin.xyz/block-docs/">Blocks</a> in the same way. | ||
219 | Blocks need to be <em>mined</em> beforehand using Proof-of-work, or brute force.</p> | ||
220 | <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. | ||
221 | 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> | ||
222 | <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 4-6 minutes.</p> | ||
223 | <blockquote> | ||
224 | <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> | ||
225 | </blockquote> | ||
226 | <p>You might ask,</p> | ||
227 | <blockquote> | ||
228 | <p>But if nobody has any Gradecoin then how do we have transactions?</p> | ||
229 | </blockquote> | ||
230 | <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> | ||
231 | <h1 id="coinbase">Coinbase</h1> | ||
232 | <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> | ||
233 | <h1 id="public-key-signatures">Public Key Signatures</h1> | ||
234 | <p>Gradecoin uses 2048 bit RSA keypairs.</p> | ||
235 | <h1 id="services">Services</h1> | ||
236 | <h2 id="register">/register</h2> | ||
237 | <ul> | ||
238 | <li>Create your own 2048 bit RSA <code>keypair</code></li> | ||
239 | <li>Download <code>Gradecoin</code>'s Public Key from <a href="https://odtuclass.metu.edu.tr/my/">Moodle</a></li> | ||
240 | <li>Encrypt your <a href="https://www.json.org/json-en.html">JSON</a> wrapped <code>Public Key</code>, <code>Student ID</code> and one time <code>passwd</code> using Gradecoin's Public Key</li> | ||
241 | <li>Your public key is now in our database and can be used to sign your JWT's during requests</li> | ||
242 | <li>For more information, check the <a href="https://gradecoin.xyz/register-docs/">register</a> page</li> | ||
243 | </ul> | ||
244 | <h2 id="transaction">/transaction</h2> | ||
245 | <ul> | ||
246 | <li>You can offer a <a href="https://gradecoin.xyz/transaction-docs/">Transaction</a> with a POST request | ||
247 | <ul> | ||
248 | <li>The request should have <code>Authorization</code></li> | ||
249 | <li>The request header should be signed by the Public Key of the <code>by</code> field in the transaction</li> | ||
250 | </ul> | ||
251 | </li> | ||
252 | <li>Fetch the list of <code>Transaction</code>s with a GET request</li> | ||
253 | <li>For more information, check our <a href="https://gradecoin.xyz/transaction-docs/">transaction</a> page</li> | ||
254 | </ul> | ||
255 | <h2 id="block">/block</h2> | ||
256 | <ul> | ||
257 | <li> | ||
258 | <p>Offer a <a href="https://gradecoin.xyz/block-docs/">Block</a> with a POST request</p> | ||
259 | <ul> | ||
260 | <li>The request should have <code>Authorization</code></li> | ||
261 | <li>The <code>transaction_list</code> of the block should be a subset of pending transactions, available on <a href="/transaction">/transaction</a></li> | ||
262 | </ul> | ||
263 | </li> | ||
264 | <li> | ||
265 | <p>Fetch the last accepted <code>Block</code> with a GET request</p> | ||
266 | </li> | ||
267 | <li> | ||
268 | <p>For more information, check our <a href="https://gradecoin.xyz/block-docs/">block</a> page</p> | ||
269 | <p><code>Authorization</code>: The request header should have Bearer JWT.Token signed with Student Public Key</p> | ||
270 | </li> | ||
271 | </ul> | ||
272 | <h2 id="user">/user</h2> | ||
273 | <ul> | ||
274 | <li>Meant to be used in the browser, you can see the current list of users and their balance here</li> | ||
275 | </ul> | ||
276 | <h1 id="questions">Questions</h1> | ||
277 | <h2 id="this-all-sound-complicated">This all sound complicated!</h2> | ||
278 | <ul> | ||
279 | <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> | ||
280 | <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> | ||
281 | <li><a href="https://jwt.io">JWT Debugger</a> and the corresponding <a href="https://tools.ietf.org/html/rfc7519">RFC</a>.</li> | ||
282 | <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> | ||
283 | <li>Check out <a href="https://gradecoin.xyz/misc-docs/">misc</a> for everything else you might be curious about.</li> | ||
284 | </ul> | ||
285 | <h2 id="how-do-you-actually-earn-gradecoin">How do you actually earn Gradecoin?</h2> | ||
286 | <ul> | ||
287 | <li>Register yourself to at <a href="https://gradecoin.xyz/register-docs/">/register</a></li> | ||
288 | <li>Create transactions at <a href="https://gradecoin.xyz/transaction-docs/">/transaction</a></li> | ||
289 | <li>Create blocks to commit transactions at <a href="https://gradecoin.xyz/block-docs/">/block</a></li> | ||
290 | <li>See how everyone is doing and find people to trade with at <a href="/user">/user</a></li> | ||
291 | </ul> | ||
292 | <h2 id="i-found-a-bug">I found a bug!</h2> | ||
293 | <p>Thank you! Please <a href="mailto:yigit@ceng.metu.edu.tr">let me know</a> so we can solve it.</p> | ||
294 | <h2 id="i-hacked-the-server">I hacked the server!</h2> | ||
295 | <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> | ||
296 | <h2 id="submission">Submission?</h2> | ||
297 | <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> | ||
298 | <ul> | ||
299 | <li>c</li> | ||
300 | <li>c++</li> | ||
301 | <li>perl</li> | ||
302 | <li>rust</li> | ||
303 | <li>python</li> | ||
304 | <li>random assortment of bash scripts</li> | ||
305 | </ul> | ||
306 | <p>If your favourite programming language is missing please let me know 🤷?</p> | ||
307 | <h2 id="can-my-friends-play">Can my friends play?</h2> | ||
308 | <p>Sadly, no. Student's who are enrolled to the class will receive one-time-passwords for authentication.</p> | ||
309 | <h2 id="how-and-or-why">How and or Why?</h2> | ||
310 | <ul> | ||
311 | <li><a href="https://xkcd.com/2314/">Built</a>, <a href="https://lofi.cafe/">with</a> <a href="https://xkcd.com/2418/">Rust</a></li> | ||
312 | </ul> | ||
313 | |||
314 | |||
315 | </div> | ||
316 | |||
317 | |||
318 | |||
319 | </main> | ||
320 | |||
321 | |||
322 | <footer> | ||
323 | Built For ⁂ CENG489 ⁂ Introduction to Computer Security | ||
324 | </footer> | ||
325 | |||
326 | </body> | ||
327 | <script> | ||
328 | function highlightNav(heading) { | ||
329 | let pathname = location.pathname; | ||
330 | document.querySelectorAll(".toc a").forEach((item) => { | ||
331 | item.classList.remove("active"); | ||
332 | }); | ||
333 | document.querySelector(".toc a[href$='" + pathname + "#" + heading + "']").classList.add("active"); | ||
334 | } | ||
335 | |||
336 | let currentHeading = ""; | ||
337 | window.onscroll = function () { | ||
338 | let h = document.querySelectorAll("h1,h2,h3,h4,h5,h6"); | ||
339 | let elementArr = []; | ||
340 | |||
341 | h.forEach(item => { | ||
342 | if (item.id !== "") { | ||
343 | elementArr[item.id] = item.getBoundingClientRect().top; | ||
344 | } | ||
345 | }); | ||
346 | elementArr.sort(); | ||
347 | for (let key in elementArr) { | ||
348 | if (!elementArr.hasOwnProperty(key)) { | ||
349 | continue; | ||
350 | } | ||
351 | if (elementArr[key] > 0 && elementArr[key] < 300) { | ||
352 | if (currentHeading !== key) { | ||
353 | highlightNav(key); | ||
354 | currentHeading = key; | ||
355 | } | ||
356 | break; | ||
357 | } | ||
358 | } | ||
359 | } | ||
360 | </script> | ||
361 | |||
362 | </html> | ||