From 7f91412ddf3895214a8b56ac520ea7a60c0d24a1 Mon Sep 17 00:00:00 2001 From: Yigit Sever Date: Thu, 15 Apr 2021 00:32:28 +0300 Subject: [WIP] Add template support --- Cargo.lock | 136 +++++++++++++++++++++++++++++++++++++++++++++++++ Cargo.toml | 1 + src/handlers.rs | 19 ++++++- src/routes.rs | 6 ++- templates/css.html | 8 +++ templates/footer.html | 2 + templates/header.html | 11 ++++ templates/menu.html | 5 ++ templates/welcome.html | 8 +++ 9 files changed, 193 insertions(+), 3 deletions(-) create mode 100644 templates/css.html create mode 100644 templates/footer.html create mode 100644 templates/header.html create mode 100644 templates/menu.html create mode 100644 templates/welcome.html diff --git a/Cargo.lock b/Cargo.lock index b548774..649c923 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -40,6 +40,58 @@ dependencies = [ "memchr", ] +[[package]] +name = "arrayvec" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" + +[[package]] +name = "askama" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d298738b6e47e1034e560e5afe63aa488fea34e25ec11b855a76f0d7b8e73134" +dependencies = [ + "askama_derive", + "askama_escape", + "askama_shared", +] + +[[package]] +name = "askama_derive" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca2925c4c290382f9d2fa3d1c1b6a63fa1427099721ecca4749b154cc9c25522" +dependencies = [ + "askama_shared", + "proc-macro2", + "syn", +] + +[[package]] +name = "askama_escape" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90c108c1a94380c89d2215d0ac54ce09796823cca0fd91b299cfff3b33e346fb" + +[[package]] +name = "askama_shared" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2582b77e0f3c506ec4838a25fa8a5f97b9bed72bb6d3d272ea1c031d8bd373bc" +dependencies = [ + "askama_escape", + "humansize", + "nom", + "num-traits", + "percent-encoding", + "proc-macro2", + "quote", + "serde", + "syn", + "toml", +] + [[package]] name = "atty" version = "0.2.14" @@ -81,6 +133,18 @@ version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" +[[package]] +name = "bitvec" +version = "0.19.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8942c8d352ae1838c9dda0b0ca2ab657696ef2232a20147cf1b30ae1a9cb4321" +dependencies = [ + "funty", + "radium", + "tap", + "wyz", +] + [[package]] name = "blake2" version = "0.9.1" @@ -277,6 +341,12 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" +[[package]] +name = "funty" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fed34cd105917e91daa4da6b3728c47b068749d6a62c59811f06ed2ac71d9da7" + [[package]] name = "futures" version = "0.3.14" @@ -376,6 +446,7 @@ name = "gradecoin" version = "0.1.0" dependencies = [ "aes", + "askama", "base64 0.13.0", "blake2", "block-modes", @@ -495,6 +566,12 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "494b4d60369511e7dea41cf646832512a94e542f68bb9c49e54518e0f468eb47" +[[package]] +name = "humansize" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6cab2627acfc432780848602f3f558f7e9dd427352224b0d9324025796d2a5e" + [[package]] name = "humantime" version = "1.3.0" @@ -615,6 +692,19 @@ dependencies = [ "spin", ] +[[package]] +name = "lexical-core" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21f866863575d0e1d654fbeeabdc927292fdf862873dc3c96c6f753357e13374" +dependencies = [ + "arrayvec", + "bitflags", + "cfg-if 1.0.0", + "ryu", + "static_assertions", +] + [[package]] name = "libc" version = "0.2.93" @@ -744,6 +834,19 @@ dependencies = [ "winapi 0.3.9", ] +[[package]] +name = "nom" +version = "6.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7413f999671bd4745a7b624bd370a569fb6bc574b23c83a3c5ed2e453f3d5e2" +dependencies = [ + "bitvec", + "funty", + "lexical-core", + "memchr", + "version_check", +] + [[package]] name = "num-bigint" version = "0.2.6" @@ -967,6 +1070,12 @@ dependencies = [ "proc-macro2", ] +[[package]] +name = "radium" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "941ba9d78d8e2f7ce474c015eea4d9c6d25b6a3327f9832ee29a4de27f91bbb8" + [[package]] name = "rand" version = "0.7.3" @@ -1278,6 +1387,12 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + [[package]] name = "subtle" version = "2.4.0" @@ -1307,6 +1422,12 @@ dependencies = [ "unicode-xid", ] +[[package]] +name = "tap" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" + [[package]] name = "tempfile" version = "3.2.0" @@ -1431,6 +1552,15 @@ dependencies = [ "tokio", ] +[[package]] +name = "toml" +version = "0.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a31142970826733df8241ef35dc040ef98c679ab14d7c3e54d827099b3acecaa" +dependencies = [ + "serde", +] + [[package]] name = "tower-service" version = "0.3.1" @@ -1744,6 +1874,12 @@ dependencies = [ "winapi-build", ] +[[package]] +name = "wyz" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85e60b0d1b5f99db2556934e21937020776a5d31520bf169e851ac44e6420214" + [[package]] name = "zeroize" version = "1.2.0" diff --git a/Cargo.toml b/Cargo.toml index b5733b2..b505ba4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -25,6 +25,7 @@ base64 = "0.13.0" sha2 = "0.9.3" block-modes = "0.7.0" aes = "0.6.0" +askama = "0.10.5" [dev-dependencies] serde_test = "1.0.117" diff --git a/src/handlers.rs b/src/handlers.rs index a8c9947..b3a6fa8 100644 --- a/src/handlers.rs +++ b/src/handlers.rs @@ -1,5 +1,6 @@ -/// API handlers, the ends of each filter chain use aes::Aes128; +/// API handlers, the ends of each filter chain +use askama::Template; use base64; use blake2::{Blake2s, Digest}; use block_modes::block_padding::Pkcs7; @@ -599,3 +600,19 @@ fn authorize_proposer(jwt_token: String, user_pem: &String) -> Result { + title: &'a str, + body: &'a str, +} + +pub async fn welcome_handler() -> Result { + let template = WelcomeTemplate { + title: "Welcome", + body: "To The Bookstore!", + }; + let res = template.render().unwrap(); + Ok(warp::reply::html(res)) +} diff --git a/src/routes.rs b/src/routes.rs index 280de35..f8d9605 100644 --- a/src/routes.rs +++ b/src/routes.rs @@ -7,7 +7,10 @@ use crate::schema::Db; /// Every route combined pub fn consensus_routes(db: Db) -> impl Filter + Clone { - transaction_list(db.clone()) + let welcome_route = warp::path::end().and_then(handlers::welcome_handler); + + welcome_route + .or(transaction_list(db.clone())) .or(register_user(db.clone())) .or(auth_transaction_propose(db.clone())) .or(auth_block_propose(db.clone())) @@ -60,4 +63,3 @@ pub fn auth_block_propose(db: Db) -> impl Filter + td, th { + padding: 8px; + } + th { + text-align: left; + } + diff --git a/templates/footer.html b/templates/footer.html new file mode 100644 index 0000000..2ab5c0d --- /dev/null +++ b/templates/footer.html @@ -0,0 +1,2 @@ + + diff --git a/templates/header.html b/templates/header.html new file mode 100644 index 0000000..fffbefe --- /dev/null +++ b/templates/header.html @@ -0,0 +1,11 @@ + + + Bookstore + {% include "css.html" %} + + +
+

Bookstore

+
+ {% include "menu.html" %} +
diff --git a/templates/menu.html b/templates/menu.html new file mode 100644 index 0000000..0f4e85f --- /dev/null +++ b/templates/menu.html @@ -0,0 +1,5 @@ + diff --git a/templates/welcome.html b/templates/welcome.html new file mode 100644 index 0000000..ca60f33 --- /dev/null +++ b/templates/welcome.html @@ -0,0 +1,8 @@ +{% include "header.html" %} +
+

{{title}}

+
+ {{body}} +
+
+{% include "footer.html" %} -- cgit v1.2.3-70-g09d2 From 4ae6fb311f906dc5be26d60de5a0a41c72503004 Mon Sep 17 00:00:00 2001 From: alpaylan Date: Thu, 15 Apr 2021 01:11:35 +0300 Subject: python_client halfway through and updated todo --- TODO.md | 24 ++++++++++ scripts/python_client.py | 111 ++++++++++++++++++++++++++++++++++++++++++----- 2 files changed, 123 insertions(+), 12 deletions(-) diff --git a/TODO.md b/TODO.md index b429097..15c317a 100644 --- a/TODO.md +++ b/TODO.md @@ -1,5 +1,29 @@ # TODO +## Office Hour/Recitation +- [ ] Should give a little pointers but not too much, I think at first this is going to seem hard to many students but it should become fairly easy after some little pointers +## Docs +- [ ] Make a better explanation of authorization schema +- [ ] register: give the register message schema(passwd is missing) +- [ ] gradecoin: give narrative explanation +- [ ] how to bank works +- [ ] bank public key +- [ ] how to start(possibly some pointers and links -- blockchain, rest, jwt, rsa, public key) +- [ ] delete CONSTANTS +- [ ] register should have AuthRequest in the explanation +- [ ] link all types in schema.rs to the docs, they need to understand why we have them +- [ ] explain hash type(MD5 is missing in Claims) +- [ ] Initial auth request needs more explanation +- [ ] Explain JSON Wrapped +- [ ] Give links to the functions, their docs are very good. For example, it seems impossible to understand authentication from the first page, but when you go to handlers::authenticate_user many things are clarified. +- [ ] There is todo at handlers::authorized_propose_transaction, fix that +- [ ] authorized_propose_transaction and authorized_propose_block may have more explanation as in the case of + + +### Authorization +- [ ] Pointer to JWT +- [ ] Pointer to Public Key Sign + ## Tests - [ ] User Authentication/Authentication Tests - [ ] Route Tests diff --git a/scripts/python_client.py b/scripts/python_client.py index fe96cc2..2713f47 100644 --- a/scripts/python_client.py +++ b/scripts/python_client.py @@ -20,6 +20,92 @@ hash = "SHA-256" # return priv_key.publickey() +import requests +from jwt import ( + JWT, + jwk_from_dict, + jwk_from_pem, +) +from jwt.utils import get_int_from_datetime +from datetime import datetime, timedelta, timezone + + +def create_hashed_transaction(): + + pass + +def create_jwt(): + instance = JWT() + message = { + 'tha': create_hashed_transaction(), + 'iat': get_int_from_datetime(datetime.now(timezone.utc)), + 'exp': get_int_from_datetime( + datetime.now(timezone.utc) + timedelta(hours=1)), + } + + with open('rsa_private_key.pem', 'rb') as fh: + signing_key = jwk_from_pem(fh.read()) + + compact_jws = instance.encode(message, signing_key, alg='RS256') + + return compact_jws + + +def post_register(): + credentials = { + "c": "", + "iv": "", + "key": "" + } + response = requests.post("localhost:8080/register", data=credentials) + + +def post_transaction_from_bank(): + body = { + "by": "{my_public_key}", + "source": "{bank_public_key}", + "target": "{my_public_key}", + "amount": 0, + "timestamp": get_int_from_datetime(datetime.now(timezone.utc)), + } + header = {'Content-Type': 'application/json', 'Authorization': f'Bearer {create_jwt()}'} + + response = requests.post("localhost:8080/transaction", headers=header, data=body) + print(response.headers) + print(response.content) + +def post_transaction_to_user(): + body = { + "by": "{my_public_key}", + "source": "{my_public_key}", + "target": "{user_public_key}", + "amount": 0, + "timestamp": get_int_from_datetime(datetime.now(timezone.utc)), + } + header = {'Content-Type': 'application/json', 'Authorization': f'Bearer {create_jwt()}'} + + response = requests.post("localhost:8080/transaction", headers=header, data=body) + + +def post_block(): + credentials = { + "c": "", + "iv": "", + "key": "" + } + response = requests.post("localhost:8080/register", params=credentials) + + +def get_transaction(): + response = requests.get("http://localhost:8080/transaction") + print(response.headers) + + +def get_block(): + response = requests.get("http://localhost:8080/block") + print(response.headers) + + def encrypt(message, pub_key): cipher = PKCS1_OAEP.new(pub_key) return cipher.encrypt(message) @@ -39,18 +125,19 @@ AUd927qkxgg/nyyFqwxIbTxebxzpNX8IHMT8PgNdMxVMqnhBWxiw1nborY+pwGVL MwIDAQAB -----END PUBLIC KEY-----""" } - with open("../secrets/gradecoin.pub", "r") as fs: - data = fs.read() - pubkeyobj = RSA.importKey(data) - - cipher = PKCS1_OAEP.new(pubkeyobj) - - ser = json.dumps(myself, separators=(',', ':')) - - a = cipher.encrypt(ser) - - print(f"{a}") - + # with open("../secrets/gradecoin.pub", "r") as fs: + # data = fs.read() + # pubkeyobj = RSA.importKey(data) + # + # cipher = PKCS1_OAEP.new(pubkeyobj) + # + # ser = json.dumps(myself, separators=(',', ':')) + # + # a = cipher.encrypt(ser) + # + # print(f"{a}") + get_block() + get_transaction() -- cgit v1.2.3-70-g09d2 From 5daa99b07e32c2436726a155ead25c7e61532916 Mon Sep 17 00:00:00 2001 From: Yigit Sever Date: Thu, 15 Apr 2021 02:35:45 +0300 Subject: Add static serving support --- src/routes.rs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/routes.rs b/src/routes.rs index f8d9605..59342bb 100644 --- a/src/routes.rs +++ b/src/routes.rs @@ -7,14 +7,19 @@ use crate::schema::Db; /// Every route combined pub fn consensus_routes(db: Db) -> impl Filter + Clone { - let welcome_route = warp::path::end().and_then(handlers::welcome_handler); + // Remember when we wanted to implement templating + // Why would we? Just put a staic webpage under /public (next to Cargo.toml) and place it and + // the end of the filter chain - welcome_route - .or(transaction_list(db.clone())) + // Fully fledged website support, phew! + let static_route = warp::any().and(warp::fs::dir("public")); + + transaction_list(db.clone()) .or(register_user(db.clone())) .or(auth_transaction_propose(db.clone())) .or(auth_block_propose(db.clone())) .or(block_list(db.clone())) + .or(static_route) } /// POST /register warp route -- cgit v1.2.3-70-g09d2 From f04141d2ab699d86d7bfe37a3c77fc9c7ccad74d Mon Sep 17 00:00:00 2001 From: Yigit Sever Date: Thu, 15 Apr 2021 02:42:53 +0300 Subject: Bring Zola over --- .gitmodules | 3 +++ site/config.toml | 18 ++++++++++++++++++ site/content/test_page.md | 11 +++++++++++ site/public/elasticlunr.min.js | 10 ++++++++++ site/public/juice.css | 1 + site/public/search_index.en.js | 1 + site/static/android-chrome-192x192.png | Bin 0 -> 26249 bytes site/static/android-chrome-512x512.png | Bin 0 -> 80376 bytes site/static/apple-touch-icon.png | Bin 0 -> 24023 bytes site/static/favicon-16x16.png | Bin 0 -> 878 bytes site/static/favicon-32x32.png | Bin 0 -> 2463 bytes site/static/favicon.ico | Bin 0 -> 15406 bytes site/static/gradecoin.png | Bin 0 -> 197656 bytes site/themes/juice | 1 + static/android-chrome-192x192.png | Bin 26249 -> 0 bytes static/android-chrome-512x512.png | Bin 80376 -> 0 bytes static/apple-touch-icon.png | Bin 24023 -> 0 bytes static/favicon-16x16.png | Bin 878 -> 0 bytes static/favicon-32x32.png | Bin 2463 -> 0 bytes static/favicon.ico | Bin 15406 -> 0 bytes static/gradecoin.png | Bin 197656 -> 0 bytes 21 files changed, 45 insertions(+) create mode 100644 .gitmodules create mode 100644 site/config.toml create mode 100644 site/content/test_page.md create mode 100644 site/public/elasticlunr.min.js create mode 100644 site/public/juice.css create mode 100644 site/public/search_index.en.js create mode 100644 site/static/android-chrome-192x192.png create mode 100644 site/static/android-chrome-512x512.png create mode 100644 site/static/apple-touch-icon.png create mode 100644 site/static/favicon-16x16.png create mode 100644 site/static/favicon-32x32.png create mode 100644 site/static/favicon.ico create mode 100644 site/static/gradecoin.png create mode 160000 site/themes/juice delete mode 100644 static/android-chrome-192x192.png delete mode 100644 static/android-chrome-512x512.png delete mode 100644 static/apple-touch-icon.png delete mode 100644 static/favicon-16x16.png delete mode 100644 static/favicon-32x32.png delete mode 100644 static/favicon.ico delete mode 100644 static/gradecoin.png diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..3c79e9c --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "site/themes/juice"] + path = site/themes/juice + url = https://github.com/huhu/juice diff --git a/site/config.toml b/site/config.toml new file mode 100644 index 0000000..f03b549 --- /dev/null +++ b/site/config.toml @@ -0,0 +1,18 @@ +# The URL the site will be built for +base_url = "https://gradecoin.xyz" + +theme = "juice" + +# Whether to automatically compile all Sass files in the sass directory +compile_sass = true + +# Whether to build a search index to be used later on by a JavaScript library +build_search_index = true + +[markdown] +# Whether to do syntax highlighting +# Theme can be customised by setting the `highlight_theme` variable to a theme supported by Zola +highlight_code = true + +[extra] +# Put all your custom variables here diff --git a/site/content/test_page.md b/site/content/test_page.md new file mode 100644 index 0000000..1402f9f --- /dev/null +++ b/site/content/test_page.md @@ -0,0 +1,11 @@ ++++ +title = "Changelog" +description = "Changelog" +weight = 2 ++++ + +Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod +tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At +vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd +ubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. + diff --git a/site/public/elasticlunr.min.js b/site/public/elasticlunr.min.js new file mode 100644 index 0000000..79dad65 --- /dev/null +++ b/site/public/elasticlunr.min.js @@ -0,0 +1,10 @@ +/** + * elasticlunr - http://weixsong.github.io + * Lightweight full-text search engine in Javascript for browser search and offline search. - 0.9.6 + * + * Copyright (C) 2017 Oliver Nightingale + * Copyright (C) 2017 Wei Song + * MIT Licensed + * @license + */ +!function(){function e(e){if(null===e||"object"!=typeof e)return e;var t=e.constructor();for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}var t=function(e){var n=new t.Index;return n.pipeline.add(t.trimmer,t.stopWordFilter,t.stemmer),e&&e.call(n,n),n};t.version="0.9.5",lunr=t,t.utils={},t.utils.warn=function(e){return function(t){e.console&&console.warn&&console.warn(t)}}(this),t.utils.toString=function(e){return void 0===e||null===e?"":e.toString()},t.EventEmitter=function(){this.events={}},t.EventEmitter.prototype.addListener=function(){var e=Array.prototype.slice.call(arguments),t=e.pop(),n=e;if("function"!=typeof t)throw new TypeError("last argument must be a function");n.forEach(function(e){this.hasHandler(e)||(this.events[e]=[]),this.events[e].push(t)},this)},t.EventEmitter.prototype.removeListener=function(e,t){if(this.hasHandler(e)){var n=this.events[e].indexOf(t);-1!==n&&(this.events[e].splice(n,1),0==this.events[e].length&&delete this.events[e])}},t.EventEmitter.prototype.emit=function(e){if(this.hasHandler(e)){var t=Array.prototype.slice.call(arguments,1);this.events[e].forEach(function(e){e.apply(void 0,t)},this)}},t.EventEmitter.prototype.hasHandler=function(e){return e in this.events},t.tokenizer=function(e){if(!arguments.length||null===e||void 0===e)return[];if(Array.isArray(e)){var n=e.filter(function(e){return null===e||void 0===e?!1:!0});n=n.map(function(e){return t.utils.toString(e).toLowerCase()});var i=[];return n.forEach(function(e){var n=e.split(t.tokenizer.seperator);i=i.concat(n)},this),i}return e.toString().trim().toLowerCase().split(t.tokenizer.seperator)},t.tokenizer.defaultSeperator=/[\s\-]+/,t.tokenizer.seperator=t.tokenizer.defaultSeperator,t.tokenizer.setSeperator=function(e){null!==e&&void 0!==e&&"object"==typeof e&&(t.tokenizer.seperator=e)},t.tokenizer.resetSeperator=function(){t.tokenizer.seperator=t.tokenizer.defaultSeperator},t.tokenizer.getSeperator=function(){return t.tokenizer.seperator},t.Pipeline=function(){this._queue=[]},t.Pipeline.registeredFunctions={},t.Pipeline.registerFunction=function(e,n){n in t.Pipeline.registeredFunctions&&t.utils.warn("Overwriting existing registered function: "+n),e.label=n,t.Pipeline.registeredFunctions[n]=e},t.Pipeline.getRegisteredFunction=function(e){return e in t.Pipeline.registeredFunctions!=!0?null:t.Pipeline.registeredFunctions[e]},t.Pipeline.warnIfFunctionNotRegistered=function(e){var n=e.label&&e.label in this.registeredFunctions;n||t.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",e)},t.Pipeline.load=function(e){var n=new t.Pipeline;return e.forEach(function(e){var i=t.Pipeline.getRegisteredFunction(e);if(!i)throw new Error("Cannot load un-registered function: "+e);n.add(i)}),n},t.Pipeline.prototype.add=function(){var e=Array.prototype.slice.call(arguments);e.forEach(function(e){t.Pipeline.warnIfFunctionNotRegistered(e),this._queue.push(e)},this)},t.Pipeline.prototype.after=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var i=this._queue.indexOf(e);if(-1===i)throw new Error("Cannot find existingFn");this._queue.splice(i+1,0,n)},t.Pipeline.prototype.before=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var i=this._queue.indexOf(e);if(-1===i)throw new Error("Cannot find existingFn");this._queue.splice(i,0,n)},t.Pipeline.prototype.remove=function(e){var t=this._queue.indexOf(e);-1!==t&&this._queue.splice(t,1)},t.Pipeline.prototype.run=function(e){for(var t=[],n=e.length,i=this._queue.length,o=0;n>o;o++){for(var r=e[o],s=0;i>s&&(r=this._queue[s](r,o,e),void 0!==r&&null!==r);s++);void 0!==r&&null!==r&&t.push(r)}return t},t.Pipeline.prototype.reset=function(){this._queue=[]},t.Pipeline.prototype.get=function(){return this._queue},t.Pipeline.prototype.toJSON=function(){return this._queue.map(function(e){return t.Pipeline.warnIfFunctionNotRegistered(e),e.label})},t.Index=function(){this._fields=[],this._ref="id",this.pipeline=new t.Pipeline,this.documentStore=new t.DocumentStore,this.index={},this.eventEmitter=new t.EventEmitter,this._idfCache={},this.on("add","remove","update",function(){this._idfCache={}}.bind(this))},t.Index.prototype.on=function(){var e=Array.prototype.slice.call(arguments);return this.eventEmitter.addListener.apply(this.eventEmitter,e)},t.Index.prototype.off=function(e,t){return this.eventEmitter.removeListener(e,t)},t.Index.load=function(e){e.version!==t.version&&t.utils.warn("version mismatch: current "+t.version+" importing "+e.version);var n=new this;n._fields=e.fields,n._ref=e.ref,n.documentStore=t.DocumentStore.load(e.documentStore),n.pipeline=t.Pipeline.load(e.pipeline),n.index={};for(var i in e.index)n.index[i]=t.InvertedIndex.load(e.index[i]);return n},t.Index.prototype.addField=function(e){return this._fields.push(e),this.index[e]=new t.InvertedIndex,this},t.Index.prototype.setRef=function(e){return this._ref=e,this},t.Index.prototype.saveDocument=function(e){return this.documentStore=new t.DocumentStore(e),this},t.Index.prototype.addDoc=function(e,n){if(e){var n=void 0===n?!0:n,i=e[this._ref];this.documentStore.addDoc(i,e),this._fields.forEach(function(n){var o=this.pipeline.run(t.tokenizer(e[n]));this.documentStore.addFieldLength(i,n,o.length);var r={};o.forEach(function(e){e in r?r[e]+=1:r[e]=1},this);for(var s in r){var u=r[s];u=Math.sqrt(u),this.index[n].addToken(s,{ref:i,tf:u})}},this),n&&this.eventEmitter.emit("add",e,this)}},t.Index.prototype.removeDocByRef=function(e){if(e&&this.documentStore.isDocStored()!==!1&&this.documentStore.hasDoc(e)){var t=this.documentStore.getDoc(e);this.removeDoc(t,!1)}},t.Index.prototype.removeDoc=function(e,n){if(e){var n=void 0===n?!0:n,i=e[this._ref];this.documentStore.hasDoc(i)&&(this.documentStore.removeDoc(i),this._fields.forEach(function(n){var o=this.pipeline.run(t.tokenizer(e[n]));o.forEach(function(e){this.index[n].removeToken(e,i)},this)},this),n&&this.eventEmitter.emit("remove",e,this))}},t.Index.prototype.updateDoc=function(e,t){var t=void 0===t?!0:t;this.removeDocByRef(e[this._ref],!1),this.addDoc(e,!1),t&&this.eventEmitter.emit("update",e,this)},t.Index.prototype.idf=function(e,t){var n="@"+t+"/"+e;if(Object.prototype.hasOwnProperty.call(this._idfCache,n))return this._idfCache[n];var i=this.index[t].getDocFreq(e),o=1+Math.log(this.documentStore.length/(i+1));return this._idfCache[n]=o,o},t.Index.prototype.getFields=function(){return this._fields.slice()},t.Index.prototype.search=function(e,n){if(!e)return[];e="string"==typeof e?{any:e}:JSON.parse(JSON.stringify(e));var i=null;null!=n&&(i=JSON.stringify(n));for(var o=new t.Configuration(i,this.getFields()).get(),r={},s=Object.keys(e),u=0;u0&&t.push(e);for(var i in n)"docs"!==i&&"df"!==i&&this.expandToken(e+i,t,n[i]);return t},t.InvertedIndex.prototype.toJSON=function(){return{root:this.root}},t.Configuration=function(e,n){var e=e||"";if(void 0==n||null==n)throw new Error("fields should not be null");this.config={};var i;try{i=JSON.parse(e),this.buildUserConfig(i,n)}catch(o){t.utils.warn("user configuration parse failed, will use default configuration"),this.buildDefaultConfig(n)}},t.Configuration.prototype.buildDefaultConfig=function(e){this.reset(),e.forEach(function(e){this.config[e]={boost:1,bool:"OR",expand:!1}},this)},t.Configuration.prototype.buildUserConfig=function(e,n){var i="OR",o=!1;if(this.reset(),"bool"in e&&(i=e.bool||i),"expand"in e&&(o=e.expand||o),"fields"in e)for(var r in e.fields)if(n.indexOf(r)>-1){var s=e.fields[r],u=o;void 0!=s.expand&&(u=s.expand),this.config[r]={boost:s.boost||0===s.boost?s.boost:1,bool:s.bool||i,expand:u}}else t.utils.warn("field name in user configuration not found in index instance fields");else this.addAllFields2UserConfig(i,o,n)},t.Configuration.prototype.addAllFields2UserConfig=function(e,t,n){n.forEach(function(n){this.config[n]={boost:1,bool:e,expand:t}},this)},t.Configuration.prototype.get=function(){return this.config},t.Configuration.prototype.reset=function(){this.config={}},lunr.SortedSet=function(){this.length=0,this.elements=[]},lunr.SortedSet.load=function(e){var t=new this;return t.elements=e,t.length=e.length,t},lunr.SortedSet.prototype.add=function(){var e,t;for(e=0;e1;){if(r===e)return o;e>r&&(t=o),r>e&&(n=o),i=n-t,o=t+Math.floor(i/2),r=this.elements[o]}return r===e?o:-1},lunr.SortedSet.prototype.locationFor=function(e){for(var t=0,n=this.elements.length,i=n-t,o=t+Math.floor(i/2),r=this.elements[o];i>1;)e>r&&(t=o),r>e&&(n=o),i=n-t,o=t+Math.floor(i/2),r=this.elements[o];return r>e?o:e>r?o+1:void 0},lunr.SortedSet.prototype.intersect=function(e){for(var t=new lunr.SortedSet,n=0,i=0,o=this.length,r=e.length,s=this.elements,u=e.elements;;){if(n>o-1||i>r-1)break;s[n]!==u[i]?s[n]u[i]&&i++:(t.add(s[n]),n++,i++)}return t},lunr.SortedSet.prototype.clone=function(){var e=new lunr.SortedSet;return e.elements=this.toArray(),e.length=e.elements.length,e},lunr.SortedSet.prototype.union=function(e){var t,n,i;this.length>=e.length?(t=this,n=e):(t=e,n=this),i=t.clone();for(var o=0,r=n.toArray();oli{padding:0.3rem 0}p>img{width:100%;height:auto}header{background-color:var(--primary-color);color:black;padding:20px 50px;display:flex;align-items:center;justify-content:space-between}.logo{font-family:"Alfa Slab One", serif;font-size:32px;color:var(--primary-text-color);display:flex;align-items:center;margin:0 40px}.logo img{width:60px;margin:0 25px}.nav-item{margin:0 10px;text-decoration:none;font-size:18px;font-weight:bold}.nav-item:hover{color:#000;text-decoration:underline}.hero{display:flex;align-items:center;justify-content:space-evenly;height:100vh;background-color:var(--primary-color);overflow-x:hidden;padding:0 40px}.hero .explore-more{position:absolute;bottom:20px;cursor:pointer}main{display:flex;padding:50px 100px}main .toc{max-width:260px;min-width:240px}main .toc-item{padding:10px 20px;color:#424242}main .toc-item a,main .toc-item-child a{color:var(--secondary-text-color)}main .toc-item a:hover,main .toc-item-child a:hover{cursor:pointer;text-decoration:underline}main .toc-item a.active,main .toc-item-child a.active{color:var(--toc-highlight-text-color)}main .toc-item-child{padding:0 30px 5px;color:#424242}.toc-sticky{border-radius:3px;border-top:5px solid var(--primary-color);background-color:white;position:sticky;position:-webkit-sticky;position:-moz-sticky;position:-ms-sticky;position:-o-sticky;top:10px;padding:10px 0}footer{padding:50px;display:flex;flex-direction:column;justify-content:center;align-items:center;background-color:#202020;color:#fcfcfc}footer a{color:#fcfcfc;text-decoration:underline}@media screen and (min-width: 1280px){.content{max-width:60%;min-width:800px}}@media screen and (max-width: 768px){header{padding:10px 30px;flex-direction:column;align-items:center;justify-content:center}.logo{font-size:28px;margin:10px}.logo img{width:45px;margin:0 10px 0 0}.nav-item{margin:0 5px;font-size:14px}.hero{padding:40px 30px}main{padding:30px}.content{padding:0}.explore-more,.toc{display:none}} diff --git a/site/public/search_index.en.js b/site/public/search_index.en.js new file mode 100644 index 0000000..68c9fc6 --- /dev/null +++ b/site/public/search_index.en.js @@ -0,0 +1 @@ +window.searchIndex = {"fields":["title","body"],"pipeline":["trimmer","stopWordFilter","stemmer"],"ref":"id","version":"0.9.5","index":{"body":{"root":{"docs":{},"df":0}},"title":{"root":{"docs":{},"df":0}}},"documentStore":{"save":true,"docs":{"http://127.0.0.1:1111/":{"body":"","id":"http://127.0.0.1:1111/","title":""}},"docInfo":{"http://127.0.0.1:1111/":{"body":0,"title":0}},"length":1},"lang":"English"}; \ No newline at end of file diff --git a/site/static/android-chrome-192x192.png b/site/static/android-chrome-192x192.png new file mode 100644 index 0000000..023ddbd Binary files /dev/null and b/site/static/android-chrome-192x192.png differ diff --git a/site/static/android-chrome-512x512.png b/site/static/android-chrome-512x512.png new file mode 100644 index 0000000..4251933 Binary files /dev/null and b/site/static/android-chrome-512x512.png differ diff --git a/site/static/apple-touch-icon.png b/site/static/apple-touch-icon.png new file mode 100644 index 0000000..cd8e4c8 Binary files /dev/null and b/site/static/apple-touch-icon.png differ diff --git a/site/static/favicon-16x16.png b/site/static/favicon-16x16.png new file mode 100644 index 0000000..bd63d34 Binary files /dev/null and b/site/static/favicon-16x16.png differ diff --git a/site/static/favicon-32x32.png b/site/static/favicon-32x32.png new file mode 100644 index 0000000..e343587 Binary files /dev/null and b/site/static/favicon-32x32.png differ diff --git a/site/static/favicon.ico b/site/static/favicon.ico new file mode 100644 index 0000000..45d8bfe Binary files /dev/null and b/site/static/favicon.ico differ diff --git a/site/static/gradecoin.png b/site/static/gradecoin.png new file mode 100644 index 0000000..eeb670c Binary files /dev/null and b/site/static/gradecoin.png differ diff --git a/site/themes/juice b/site/themes/juice new file mode 160000 index 0000000..0731032 --- /dev/null +++ b/site/themes/juice @@ -0,0 +1 @@ +Subproject commit 07310323f85e7851c0a1498021b0a02cfb2e215f diff --git a/static/android-chrome-192x192.png b/static/android-chrome-192x192.png deleted file mode 100644 index 023ddbd..0000000 Binary files a/static/android-chrome-192x192.png and /dev/null differ diff --git a/static/android-chrome-512x512.png b/static/android-chrome-512x512.png deleted file mode 100644 index 4251933..0000000 Binary files a/static/android-chrome-512x512.png and /dev/null differ diff --git a/static/apple-touch-icon.png b/static/apple-touch-icon.png deleted file mode 100644 index cd8e4c8..0000000 Binary files a/static/apple-touch-icon.png and /dev/null differ diff --git a/static/favicon-16x16.png b/static/favicon-16x16.png deleted file mode 100644 index bd63d34..0000000 Binary files a/static/favicon-16x16.png and /dev/null differ diff --git a/static/favicon-32x32.png b/static/favicon-32x32.png deleted file mode 100644 index e343587..0000000 Binary files a/static/favicon-32x32.png and /dev/null differ diff --git a/static/favicon.ico b/static/favicon.ico deleted file mode 100644 index 45d8bfe..0000000 Binary files a/static/favicon.ico and /dev/null differ diff --git a/static/gradecoin.png b/static/gradecoin.png deleted file mode 100644 index eeb670c..0000000 Binary files a/static/gradecoin.png and /dev/null differ -- cgit v1.2.3-70-g09d2 From 376ec590ea5da21315a37292817997352e58dee6 Mon Sep 17 00:00:00 2001 From: Yigit Sever Date: Thu, 15 Apr 2021 03:39:36 +0300 Subject: Create the static site DON'T FORGET TO CHANGE site/config.toml BEFORE DEPLOYMENT --- site/config.toml | 7 +- site/content/JWT.md | 11 + site/content/_index.md | 28 +++ site/content/block_docs.md | 11 + site/content/register_docs.md | 42 ++++ site/content/test_page.md | 11 - site/content/transaction_docs.md | 11 + site/public/404.html | 3 + site/public/android-chrome-192x192.png | Bin 0 -> 26249 bytes site/public/android-chrome-512x512.png | Bin 0 -> 80376 bytes site/public/apple-touch-icon.png | Bin 0 -> 24023 bytes site/public/block-docs/index.html | 126 ++++++++++++ site/public/favicon-16x16.png | Bin 0 -> 878 bytes site/public/favicon-32x32.png | Bin 0 -> 2463 bytes site/public/favicon.ico | Bin 0 -> 15406 bytes site/public/gradecoin.png | Bin 0 -> 197656 bytes site/public/index.html | 223 ++++++++++++++++++++ site/public/jwt/index.html | 126 ++++++++++++ site/public/normalize.css | 349 ++++++++++++++++++++++++++++++++ site/public/register-docs/index.html | 188 +++++++++++++++++ site/public/robots.txt | 3 + site/public/search_index.en.js | 2 +- site/public/sitemap.xml | 18 ++ site/public/transaction-docs/index.html | 126 ++++++++++++ site/templates/_variables.html | 15 ++ site/templates/index.html | 44 ++++ 26 files changed, 1331 insertions(+), 13 deletions(-) create mode 100644 site/content/JWT.md create mode 100644 site/content/_index.md create mode 100644 site/content/block_docs.md create mode 100644 site/content/register_docs.md delete mode 100644 site/content/test_page.md create mode 100644 site/content/transaction_docs.md create mode 100644 site/public/404.html create mode 100644 site/public/android-chrome-192x192.png create mode 100644 site/public/android-chrome-512x512.png create mode 100644 site/public/apple-touch-icon.png create mode 100644 site/public/block-docs/index.html create mode 100644 site/public/favicon-16x16.png create mode 100644 site/public/favicon-32x32.png create mode 100644 site/public/favicon.ico create mode 100644 site/public/gradecoin.png create mode 100644 site/public/index.html create mode 100644 site/public/jwt/index.html create mode 100644 site/public/normalize.css create mode 100644 site/public/register-docs/index.html create mode 100644 site/public/robots.txt create mode 100644 site/public/sitemap.xml create mode 100644 site/public/transaction-docs/index.html create mode 100644 site/templates/_variables.html create mode 100644 site/templates/index.html diff --git a/site/config.toml b/site/config.toml index f03b549..93e9468 100644 --- a/site/config.toml +++ b/site/config.toml @@ -1,5 +1,5 @@ # The URL the site will be built for -base_url = "https://gradecoin.xyz" +base_url = "http://localhost:8080" theme = "juice" @@ -16,3 +16,8 @@ highlight_code = true [extra] # Put all your custom variables here +juice_logo_name = "Gradecoin" +juice_logo_path = "gradecoin.png" +juice_extra_menu = [ + { title = "why?", link = "https://github.com/zhuowei/nft_ptr#why"} +] diff --git a/site/content/JWT.md b/site/content/JWT.md new file mode 100644 index 0000000..91a7a73 --- /dev/null +++ b/site/content/JWT.md @@ -0,0 +1,11 @@ ++++ +title = "JWT" +description = "JSON Web Token Documentation" +weight = 5 ++++ + +Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod +tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At +vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd +ubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. + diff --git a/site/content/_index.md b/site/content/_index.md new file mode 100644 index 0000000..7dd7a7c --- /dev/null +++ b/site/content/_index.md @@ -0,0 +1,28 @@ ++++ +title = "Gradecoin" +sort_by = "weight" ++++ + +- Don't know where to start? Gradecoin uses RESTful API, simple `curl` commands or even your browser will work! [This website can help as well](https://curl.trillworks.com/). +- [JWT Debugger](https://jwt.io) and the corresponding [RFC](https://tools.ietf.org/html/rfc7519) + +# Services +## /register +- Student creates their own 2048 bit RSA `keypair` +- Downloads `Gradecoin`'s Public Key from [Moodle](https://odtuclass.metu.edu.tr/my/) +- Encrypts their JSON wrapped `Public Key`, `Student ID` and one time `passwd` using Gradecoin's Public Key +- Their public key is now in our database and can be used to sign their JWT's during requests + +## /transaction +- You can offer a [Transaction](/transaction) - POST request + - The request should have `Authorization` + - The request header should be signed by the Public Key of the `by` field in the transaction +- fetch the list of `Transaction`s - GET request + +## /block +- offer a [`schema::Block`] - POST request + - The request should have `Authorization` + - The [`schema::Block::transaction_list`] of the block should be a subset of [`schema::Db::pending_transactions`] +- fetch the last accepted [`schema::Block`] - GET request + +`Authorization`: The request header should have Bearer JWT.Token signed with Student Public Key diff --git a/site/content/block_docs.md b/site/content/block_docs.md new file mode 100644 index 0000000..26803bd --- /dev/null +++ b/site/content/block_docs.md @@ -0,0 +1,11 @@ ++++ +title = "Blocks" +description = "Block Documentation" +weight = 2 ++++ + +Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod +tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At +vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd +ubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. + diff --git a/site/content/register_docs.md b/site/content/register_docs.md new file mode 100644 index 0000000..45571fb --- /dev/null +++ b/site/content/register_docs.md @@ -0,0 +1,42 @@ ++++ +title = "Register" +description = "Register Documentation" +weight = 3 ++++ + +POST request to /register endpoint +Lets a [`User`] (=student) to authenticate themselves to the system +This `request` can be rejected if the payload is malformed (=not authenticated properly) or if +the [`AuthRequest.user_id`] of the `request` is not in the list of users that can hold a Gradecoin account + +# Authentication Process +- Gradecoin's Public Key (`gradecoin_public_key`) is listed on moodle. +- Gradecoin's Private Key (`gradecoin_private_key`) is loaded here + +- Student picks a short temporary key (`k_temp`) +- Creates a JSON object (`auth_plaintext`) with their `metu_id` and `public key` in base64 (PEM) format (`S_PK`): +{ + student_id: "e12345", + passwd: "15 char secret" + public_key: "---BEGIN PUBLIC KEY..." +} + +- Encrypts the serialized string of `auth_plaintext` with 128 bit block AES in CBC mode with Pkcs7 padding using the temporary key (`k_temp`), the result is `auth_ciphertext` TODO should this be base64'd? +- The temporary key student has picked `k_temp` is encrypted using RSA with OAEP padding scheme +using sha256 with `gradecoin_public_key` (TODO base64? same as above), giving us `key_ciphertext` +- The payload JSON object (`auth_request`) can be JSON serialized now: +{ + c: "auth_ciphertext" + key: "key_ciphertext" +} + +## Gradecoin Side + +- Upon receiving, we first RSA decrypt with OAEP padding scheme using SHA256 with `gradecoin_private_key` as the key and auth_request.key `key` as the ciphertext, receiving `temp_key` (this is the temporary key chosen by stu +- With `temp_key`, we can AES 128 Cbc Pkcs7 decrypt the `auth_request.c`, giving us +auth_plaintext +- The `auth_plaintext` String can be deserialized to [`AuthRequest`] +- We then verify the payload and calculate the User fingerprint +- Finally, create the new [`User`] object, insert to users HashMap `` + + diff --git a/site/content/test_page.md b/site/content/test_page.md deleted file mode 100644 index 1402f9f..0000000 --- a/site/content/test_page.md +++ /dev/null @@ -1,11 +0,0 @@ -+++ -title = "Changelog" -description = "Changelog" -weight = 2 -+++ - -Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod -tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At -vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd -ubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. - diff --git a/site/content/transaction_docs.md b/site/content/transaction_docs.md new file mode 100644 index 0000000..6607fe9 --- /dev/null +++ b/site/content/transaction_docs.md @@ -0,0 +1,11 @@ ++++ +title = "Transactions" +description = "Transaction documentation" +weight = 2 ++++ + +Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod +tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At +vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd +ubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. + diff --git a/site/public/404.html b/site/public/404.html new file mode 100644 index 0000000..f8414f0 --- /dev/null +++ b/site/public/404.html @@ -0,0 +1,3 @@ + +404 Not Found +

404 Not Found

diff --git a/site/public/android-chrome-192x192.png b/site/public/android-chrome-192x192.png new file mode 100644 index 0000000..023ddbd Binary files /dev/null and b/site/public/android-chrome-192x192.png differ diff --git a/site/public/android-chrome-512x512.png b/site/public/android-chrome-512x512.png new file mode 100644 index 0000000..4251933 Binary files /dev/null and b/site/public/android-chrome-512x512.png differ diff --git a/site/public/apple-touch-icon.png b/site/public/apple-touch-icon.png new file mode 100644 index 0000000..cd8e4c8 Binary files /dev/null and b/site/public/apple-touch-icon.png differ diff --git a/site/public/block-docs/index.html b/site/public/block-docs/index.html new file mode 100644 index 0000000..8331952 --- /dev/null +++ b/site/public/block-docs/index.html @@ -0,0 +1,126 @@ + + + + + + Blocks | + + + + + + + + + + + + + +
+ + + + + + + + +
+ + +
+ + + + + +
+ +
Block Documentation
+

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod +tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At +vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd +ubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.

+ + +
+ + + +
+ + +
+ ⁂ +
+ + + + + diff --git a/site/public/favicon-16x16.png b/site/public/favicon-16x16.png new file mode 100644 index 0000000..bd63d34 Binary files /dev/null and b/site/public/favicon-16x16.png differ diff --git a/site/public/favicon-32x32.png b/site/public/favicon-32x32.png new file mode 100644 index 0000000..e343587 Binary files /dev/null and b/site/public/favicon-32x32.png differ diff --git a/site/public/favicon.ico b/site/public/favicon.ico new file mode 100644 index 0000000..45d8bfe Binary files /dev/null and b/site/public/favicon.ico differ diff --git a/site/public/gradecoin.png b/site/public/gradecoin.png new file mode 100644 index 0000000..eeb670c Binary files /dev/null and b/site/public/gradecoin.png differ diff --git a/site/public/index.html b/site/public/index.html new file mode 100644 index 0000000..0177355 --- /dev/null +++ b/site/public/index.html @@ -0,0 +1,223 @@ + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + +
+ +
+ +
+

+ Mine your own grades +

+

+ Gradecoin is the latest cutting edge blockchain technology agile grading framework that drives organic engagement and other buzzwords, with big data mining search engine optimization +

+
+ + + + +
+
+ + +
+ ⇩ Learn How ⇩ +
+ + +
+ + + +
+ + + + + +
+
+ +
+ Services +
+ + + + + + +
+ - /block +
+ + + +
+
+ + + +
+ +
Overview
+ +

Services

+

/register

+
    +
  • Student creates their own 2048 bit RSA keypair
  • +
  • Downloads Gradecoin's Public Key from Moodle
  • +
  • Encrypts their JSON wrapped Public Key, Student ID and one time passwd using Gradecoin's Public Key
  • +
  • Their public key is now in our database and can be used to sign their JWT's during requests
  • +
+

/transaction

+
    +
  • You can offer a Transaction - POST request +
      +
    • The request should have Authorization
    • +
    • The request header should be signed by the Public Key of the by field in the transaction
    • +
    +
  • +
  • fetch the list of Transactions - GET request
  • +
+

/block

+
    +
  • offer a [schema::Block] - POST request +
      +
    • The request should have Authorization
    • +
    • The [schema::Block::transaction_list] of the block should be a subset of [schema::Db::pending_transactions]
    • +
    +
  • +
  • fetch the last accepted [schema::Block] - GET request
  • +
+

Authorization: The request header should have Bearer JWT.Token signed with Student Public Key

+ + +
+ + + +
+ + +
+ ⁂ +
+ + + + + diff --git a/site/public/jwt/index.html b/site/public/jwt/index.html new file mode 100644 index 0000000..899aada --- /dev/null +++ b/site/public/jwt/index.html @@ -0,0 +1,126 @@ + + + + + + JWT | + + + + + + + + + + + + + +
+ + + + + + + + +
+ + +
+ + + + + +
+ +
JSON Web Token Documentation
+

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod +tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At +vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd +ubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.

+ + +
+ + + +
+ + +
+ ⁂ +
+ + + + + diff --git a/site/public/normalize.css b/site/public/normalize.css new file mode 100644 index 0000000..192eb9c --- /dev/null +++ b/site/public/normalize.css @@ -0,0 +1,349 @@ +/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */ + +/* Document + ========================================================================== */ + +/** + * 1. Correct the line height in all browsers. + * 2. Prevent adjustments of font size after orientation changes in iOS. + */ + +html { + line-height: 1.15; /* 1 */ + -webkit-text-size-adjust: 100%; /* 2 */ +} + +/* Sections + ========================================================================== */ + +/** + * Remove the margin in all browsers. + */ + +body { + margin: 0; +} + +/** + * Render the `main` element consistently in IE. + */ + +main { + display: block; +} + +/** + * Correct the font size and margin on `h1` elements within `section` and + * `article` contexts in Chrome, Firefox, and Safari. + */ + +h1 { + font-size: 2em; + margin: 0.67em 0; +} + +/* Grouping content + ========================================================================== */ + +/** + * 1. Add the correct box sizing in Firefox. + * 2. Show the overflow in Edge and IE. + */ + +hr { + box-sizing: content-box; /* 1 */ + height: 0; /* 1 */ + overflow: visible; /* 2 */ +} + +/** + * 1. Correct the inheritance and scaling of font size in all browsers. + * 2. Correct the odd `em` font sizing in all browsers. + */ + +pre { + font-family: monospace, monospace; /* 1 */ + font-size: 1em; /* 2 */ +} + +/* Text-level semantics + ========================================================================== */ + +/** + * Remove the gray background on active links in IE 10. + */ + +a { + background-color: transparent; +} + +/** + * 1. Remove the bottom border in Chrome 57- + * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari. + */ + +abbr[title] { + border-bottom: none; /* 1 */ + text-decoration: underline; /* 2 */ + text-decoration: underline dotted; /* 2 */ +} + +/** + * Add the correct font weight in Chrome, Edge, and Safari. + */ + +b, +strong { + font-weight: bolder; +} + +/** + * 1. Correct the inheritance and scaling of font size in all browsers. + * 2. Correct the odd `em` font sizing in all browsers. + */ + +code, +kbd, +samp { + font-family: monospace, monospace; /* 1 */ + font-size: 1em; /* 2 */ +} + +/** + * Add the correct font size in all browsers. + */ + +small { + font-size: 80%; +} + +/** + * Prevent `sub` and `sup` elements from affecting the line height in + * all browsers. + */ + +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} + +sub { + bottom: -0.25em; +} + +sup { + top: -0.5em; +} + +/* Embedded content + ========================================================================== */ + +/** + * Remove the border on images inside links in IE 10. + */ + +img { + border-style: none; +} + +/* Forms + ========================================================================== */ + +/** + * 1. Change the font styles in all browsers. + * 2. Remove the margin in Firefox and Safari. + */ + +button, +input, +optgroup, +select, +textarea { + font-family: inherit; /* 1 */ + font-size: 100%; /* 1 */ + line-height: 1.15; /* 1 */ + margin: 0; /* 2 */ +} + +/** + * Show the overflow in IE. + * 1. Show the overflow in Edge. + */ + +button, +input { /* 1 */ + overflow: visible; +} + +/** + * Remove the inheritance of text transform in Edge, Firefox, and IE. + * 1. Remove the inheritance of text transform in Firefox. + */ + +button, +select { /* 1 */ + text-transform: none; +} + +/** + * Correct the inability to style clickable types in iOS and Safari. + */ + +button, +[type="button"], +[type="reset"], +[type="submit"] { + -webkit-appearance: button; +} + +/** + * Remove the inner border and padding in Firefox. + */ + +button::-moz-focus-inner, +[type="button"]::-moz-focus-inner, +[type="reset"]::-moz-focus-inner, +[type="submit"]::-moz-focus-inner { + border-style: none; + padding: 0; +} + +/** + * Restore the focus styles unset by the previous rule. + */ + +button:-moz-focusring, +[type="button"]:-moz-focusring, +[type="reset"]:-moz-focusring, +[type="submit"]:-moz-focusring { + outline: 1px dotted ButtonText; +} + +/** + * Correct the padding in Firefox. + */ + +fieldset { + padding: 0.35em 0.75em 0.625em; +} + +/** + * 1. Correct the text wrapping in Edge and IE. + * 2. Correct the color inheritance from `fieldset` elements in IE. + * 3. Remove the padding so developers are not caught out when they zero out + * `fieldset` elements in all browsers. + */ + +legend { + box-sizing: border-box; /* 1 */ + color: inherit; /* 2 */ + display: table; /* 1 */ + max-width: 100%; /* 1 */ + padding: 0; /* 3 */ + white-space: normal; /* 1 */ +} + +/** + * Add the correct vertical alignment in Chrome, Firefox, and Opera. + */ + +progress { + vertical-align: baseline; +} + +/** + * Remove the default vertical scrollbar in IE 10+. + */ + +textarea { + overflow: auto; +} + +/** + * 1. Add the correct box sizing in IE 10. + * 2. Remove the padding in IE 10. + */ + +[type="checkbox"], +[type="radio"] { + box-sizing: border-box; /* 1 */ + padding: 0; /* 2 */ +} + +/** + * Correct the cursor style of increment and decrement buttons in Chrome. + */ + +[type="number"]::-webkit-inner-spin-button, +[type="number"]::-webkit-outer-spin-button { + height: auto; +} + +/** + * 1. Correct the odd appearance in Chrome and Safari. + * 2. Correct the outline style in Safari. + */ + +[type="search"] { + -webkit-appearance: textfield; /* 1 */ + outline-offset: -2px; /* 2 */ +} + +/** + * Remove the inner padding in Chrome and Safari on macOS. + */ + +[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; +} + +/** + * 1. Correct the inability to style clickable types in iOS and Safari. + * 2. Change font properties to `inherit` in Safari. + */ + +::-webkit-file-upload-button { + -webkit-appearance: button; /* 1 */ + font: inherit; /* 2 */ +} + +/* Interactive + ========================================================================== */ + +/* + * Add the correct display in Edge, IE 10+, and Firefox. + */ + +details { + display: block; +} + +/* + * Add the correct display in all browsers. + */ + +summary { + display: list-item; +} + +/* Misc + ========================================================================== */ + +/** + * Add the correct display in IE 10+. + */ + +template { + display: none; +} + +/** + * Add the correct display in IE 10. + */ + +[hidden] { + display: none; +} diff --git a/site/public/register-docs/index.html b/site/public/register-docs/index.html new file mode 100644 index 0000000..10a4d56 --- /dev/null +++ b/site/public/register-docs/index.html @@ -0,0 +1,188 @@ + + + + + + Register | + + + + + + + + + + + + + +
+ + + + + + + + +
+ + +
+ + + + + +
+
+ + + + + + + + +
+
+ + + +
+ +
Register Documentation
+

POST request to /register endpoint +Lets a [User] (=student) to authenticate themselves to the system +This request can be rejected if the payload is malformed (=not authenticated properly) or if +the [AuthRequest.user_id] of the request is not in the list of users that can hold a Gradecoin account

+

Authentication Process

+
    +
  • +

    Gradecoin's Public Key (gradecoin_public_key) is listed on moodle.

    +
  • +
  • +

    Gradecoin's Private Key (gradecoin_private_key) is loaded here

    +
  • +
  • +

    Student picks a short temporary key (k_temp)

    +
  • +
  • +

    Creates a JSON object (auth_plaintext) with their metu_id and public key in base64 (PEM) format (S_PK): +{ +student_id: "e12345", +passwd: "15 char secret" +public_key: "---BEGIN PUBLIC KEY..." +}

    +
  • +
  • +

    Encrypts the serialized string of auth_plaintext with 128 bit block AES in CBC mode with Pkcs7 padding using the temporary key (k_temp), the result is auth_ciphertext TODO should this be base64'd?

    +
  • +
  • +

    The temporary key student has picked k_temp is encrypted using RSA with OAEP padding scheme +using sha256 with gradecoin_public_key (TODO base64? same as above), giving us key_ciphertext

    +
  • +
  • +

    The payload JSON object (auth_request) can be JSON serialized now: +{ +c: "auth_ciphertext" +key: "key_ciphertext" +}

    +
  • +
+

Gradecoin Side

+
    +
  • Upon receiving, we first RSA decrypt with OAEP padding scheme using SHA256 with gradecoin_private_key as the key and auth_request.key key as the ciphertext, receiving temp_key (this is the temporary key chosen by stu
  • +
  • With temp_key, we can AES 128 Cbc Pkcs7 decrypt the auth_request.c, giving us +auth_plaintext
  • +
  • The auth_plaintext String can be deserialized to [AuthRequest]
  • +
  • We then verify the payload and calculate the User fingerprint
  • +
  • Finally, create the new [User] object, insert to users HashMap <fingerprint, User>
  • +
+ + +
+ + + +
+ + +
+ ⁂ +
+ + + + + diff --git a/site/public/robots.txt b/site/public/robots.txt new file mode 100644 index 0000000..c100df9 --- /dev/null +++ b/site/public/robots.txt @@ -0,0 +1,3 @@ +User-agent: * +Allow: / +Sitemap: http://localhost:8080/sitemap.xml diff --git a/site/public/search_index.en.js b/site/public/search_index.en.js index 68c9fc6..03cbfea 100644 --- a/site/public/search_index.en.js +++ b/site/public/search_index.en.js @@ -1 +1 @@ -window.searchIndex = {"fields":["title","body"],"pipeline":["trimmer","stopWordFilter","stemmer"],"ref":"id","version":"0.9.5","index":{"body":{"root":{"docs":{},"df":0}},"title":{"root":{"docs":{},"df":0}}},"documentStore":{"save":true,"docs":{"http://127.0.0.1:1111/":{"body":"","id":"http://127.0.0.1:1111/","title":""}},"docInfo":{"http://127.0.0.1:1111/":{"body":0,"title":0}},"length":1},"lang":"English"}; \ No newline at end of file +window.searchIndex = {"fields":["title","body"],"pipeline":["trimmer","stopWordFilter","stemmer"],"ref":"id","version":"0.9.5","index":{"body":{"root":{"docs":{},"df":0,"1":{"docs":{},"df":0,"2":{"docs":{},"df":0,"8":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":1}},"5":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}},"2":{"docs":{},"df":0,"0":{"docs":{},"df":0,"4":{"docs":{},"df":0,"8":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}},"a":{"docs":{},"df":0,"b":{"docs":{},"df":0,"o":{"docs":{},"df":0,"v":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}},"c":{"docs":{},"df":0,"c":{"docs":{},"df":0,"e":{"docs":{},"df":0,"p":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}},"o":{"docs":{},"df":0,"u":{"docs":{},"df":0,"n":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}},"u":{"docs":{},"df":0,"s":{"docs":{},"df":0,"a":{"docs":{},"df":0,"m":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":3}}}}}},"e":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":1},"l":{"docs":{},"df":0,"i":{"docs":{},"df":0,"q":{"docs":{},"df":0,"u":{"docs":{},"df":0,"y":{"docs":{},"df":0,"a":{"docs":{},"df":0,"m":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":3}}}}}}},"m":{"docs":{},"df":0,"e":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.4142135623730951},"http://localhost:8080/jwt/":{"tf":1.4142135623730951},"http://localhost:8080/transaction-docs/":{"tf":1.4142135623730951}},"df":3}}},"p":{"docs":{},"df":0,"i":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}},"u":{"docs":{},"df":0,"t":{"docs":{},"df":0,"h":{"docs":{},"df":0,"_":{"docs":{},"df":0,"c":{"docs":{},"df":0,"i":{"docs":{},"df":0,"p":{"docs":{},"df":0,"h":{"docs":{},"df":0,"e":{"docs":{},"df":0,"r":{"docs":{},"df":0,"t":{"docs":{},"df":0,"e":{"docs":{},"df":0,"x":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":1}}}}}}}}}},"p":{"docs":{},"df":0,"l":{"docs":{},"df":0,"a":{"docs":{},"df":0,"i":{"docs":{},"df":0,"n":{"docs":{},"df":0,"t":{"docs":{},"df":0,"e":{"docs":{},"df":0,"x":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/register-docs/":{"tf":2.0}},"df":1}}}}}}}}},"r":{"docs":{},"df":0,"e":{"docs":{},"df":0,"q":{"docs":{},"df":0,"u":{"docs":{},"df":0,"e":{"docs":{},"df":0,"s":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1,".":{"docs":{},"df":0,"c":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1},"k":{"docs":{},"df":0,"e":{"docs":{},"df":0,"y":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}}}}}}}}}},"e":{"docs":{},"df":0,"n":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.7320508075688772}},"df":1}}},"o":{"docs":{},"df":0,"r":{"docs":{"http://localhost:8080/":{"tf":1.7320508075688772}},"df":1}},"r":{"docs":{},"df":0,"e":{"docs":{},"df":0,"q":{"docs":{},"df":0,"u":{"docs":{},"df":0,"e":{"docs":{},"df":0,"s":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1,".":{"docs":{},"df":0,"u":{"docs":{},"df":0,"s":{"docs":{},"df":0,"e":{"docs":{},"df":0,"r":{"docs":{},"df":0,"_":{"docs":{},"df":0,"i":{"docs":{},"df":0,"d":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}}}}}}}}}}}}}}}}},"b":{"docs":{},"df":0,"a":{"docs":{},"df":0,"s":{"docs":{},"df":0,"e":{"docs":{},"df":0,"6":{"docs":{},"df":0,"4":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":1,"'":{"docs":{},"df":0,"d":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}}}}},"e":{"docs":{},"df":0,"a":{"docs":{},"df":0,"r":{"docs":{},"df":0,"e":{"docs":{},"df":0,"r":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}},"g":{"docs":{},"df":0,"i":{"docs":{},"df":0,"n":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}},"i":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":1.0},"http://localhost:8080/register-docs/":{"tf":1.0}},"df":2}},"l":{"docs":{},"df":0,"o":{"docs":{},"df":0,"c":{"docs":{},"df":0,"k":{"docs":{"http://localhost:8080/":{"tf":1.4142135623730951},"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/register-docs/":{"tf":1.0}},"df":3}}}},"r":{"docs":{},"df":0,"o":{"docs":{},"df":0,"w":{"docs":{},"df":0,"s":{"docs":{},"df":0,"e":{"docs":{},"df":0,"r":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}}}}},"c":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1,"a":{"docs":{},"df":0,"l":{"docs":{},"df":0,"c":{"docs":{},"df":0,"u":{"docs":{},"df":0,"l":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}}},"b":{"docs":{},"df":0,"c":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":1}},"h":{"docs":{},"df":0,"a":{"docs":{},"df":0,"r":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}},"o":{"docs":{},"df":0,"s":{"docs":{},"df":0,"e":{"docs":{},"df":0,"n":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}}},"i":{"docs":{},"df":0,"p":{"docs":{},"df":0,"h":{"docs":{},"df":0,"e":{"docs":{},"df":0,"r":{"docs":{},"df":0,"t":{"docs":{},"df":0,"e":{"docs":{},"df":0,"x":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}}}}}}},"l":{"docs":{},"df":0,"i":{"docs":{},"df":0,"t":{"docs":{},"df":0,"a":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":3}}}},"o":{"docs":{},"df":0,"m":{"docs":{},"df":0,"m":{"docs":{},"df":0,"a":{"docs":{},"df":0,"n":{"docs":{},"df":0,"d":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}}},"n":{"docs":{},"df":0,"s":{"docs":{},"df":0,"e":{"docs":{},"df":0,"t":{"docs":{},"df":0,"e":{"docs":{},"df":0,"t":{"docs":{},"df":0,"u":{"docs":{},"df":0,"r":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":3}}}}}}}},"r":{"docs":{},"df":0,"r":{"docs":{},"df":0,"e":{"docs":{},"df":0,"s":{"docs":{},"df":0,"p":{"docs":{},"df":0,"o":{"docs":{},"df":0,"n":{"docs":{},"df":0,"d":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}}}}}}},"r":{"docs":{},"df":0,"e":{"docs":{},"df":0,"a":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":1.0},"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":2}}}},"u":{"docs":{},"df":0,"r":{"docs":{},"df":0,"l":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}},"d":{"docs":{},"df":0,"a":{"docs":{},"df":0,"t":{"docs":{},"df":0,"a":{"docs":{},"df":0,"b":{"docs":{},"df":0,"a":{"docs":{},"df":0,"s":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}}}},"e":{"docs":{},"df":0,"b":{"docs":{},"df":0,"u":{"docs":{},"df":0,"g":{"docs":{},"df":0,"g":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}},"c":{"docs":{},"df":0,"r":{"docs":{},"df":0,"y":{"docs":{},"df":0,"p":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":1}}}}},"s":{"docs":{},"df":0,"e":{"docs":{},"df":0,"r":{"docs":{},"df":0,"i":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}}},"i":{"docs":{},"df":0,"a":{"docs":{},"df":0,"m":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.4142135623730951},"http://localhost:8080/jwt/":{"tf":1.4142135623730951},"http://localhost:8080/transaction-docs/":{"tf":1.4142135623730951}},"df":3}}},"o":{"docs":{},"df":0,"l":{"docs":{},"df":0,"o":{"docs":{},"df":0,"r":{"docs":{"http://localhost:8080/block-docs/":{"tf":2.0},"http://localhost:8080/jwt/":{"tf":2.0},"http://localhost:8080/transaction-docs/":{"tf":2.0}},"df":3}}},"n":{"docs":{},"df":0,"'":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}},"w":{"docs":{},"df":0,"n":{"docs":{},"df":0,"l":{"docs":{},"df":0,"o":{"docs":{},"df":0,"a":{"docs":{},"df":0,"d":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}}}}},"u":{"docs":{},"df":0,"o":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":3},"r":{"docs":{},"df":0,"e":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}},"e":{"docs":{},"df":0,"1":{"docs":{},"df":0,"2":{"docs":{},"df":0,"3":{"docs":{},"df":0,"4":{"docs":{},"df":0,"5":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}}},"a":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":3},"i":{"docs":{},"df":0,"r":{"docs":{},"df":0,"m":{"docs":{},"df":0,"o":{"docs":{},"df":0,"d":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":3}}}}},"l":{"docs":{},"df":0,"i":{"docs":{},"df":0,"t":{"docs":{},"df":0,"r":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":3}}}},"n":{"docs":{},"df":0,"c":{"docs":{},"df":0,"r":{"docs":{},"df":0,"y":{"docs":{},"df":0,"p":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":1.0},"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":2}}}}},"d":{"docs":{},"df":0,"p":{"docs":{},"df":0,"o":{"docs":{},"df":0,"i":{"docs":{},"df":0,"n":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}}}}},"o":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":3},"r":{"docs":{},"df":0,"a":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":3}}},"s":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":3}},"t":{"docs":{"http://localhost:8080/block-docs/":{"tf":2.0},"http://localhost:8080/jwt/":{"tf":2.0},"http://localhost:8080/transaction-docs/":{"tf":2.0}},"df":3},"v":{"docs":{},"df":0,"e":{"docs":{},"df":0,"n":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}},"f":{"docs":{},"df":0,"e":{"docs":{},"df":0,"t":{"docs":{},"df":0,"c":{"docs":{},"df":0,"h":{"docs":{"http://localhost:8080/":{"tf":1.4142135623730951}},"df":1}}}},"i":{"docs":{},"df":0,"e":{"docs":{},"df":0,"l":{"docs":{},"df":0,"d":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}},"n":{"docs":{},"df":0,"a":{"docs":{},"df":0,"l":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}},"g":{"docs":{},"df":0,"e":{"docs":{},"df":0,"r":{"docs":{},"df":0,"p":{"docs":{},"df":0,"r":{"docs":{},"df":0,"i":{"docs":{},"df":0,"n":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}}}}}}},"r":{"docs":{},"df":0,"s":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}},"o":{"docs":{},"df":0,"r":{"docs":{},"df":0,"m":{"docs":{},"df":0,"a":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}}}},"g":{"docs":{},"df":0,"i":{"docs":{},"df":0,"v":{"docs":{},"df":0,"e":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":1}}},"r":{"docs":{},"df":0,"a":{"docs":{},"df":0,"d":{"docs":{},"df":0,"e":{"docs":{},"df":0,"c":{"docs":{},"df":0,"o":{"docs":{},"df":0,"i":{"docs":{},"df":0,"n":{"docs":{"http://localhost:8080/":{"tf":1.4142135623730951},"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":2,"'":{"docs":{"http://localhost:8080/":{"tf":1.4142135623730951},"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":2},"_":{"docs":{},"df":0,"p":{"docs":{},"df":0,"r":{"docs":{},"df":0,"i":{"docs":{},"df":0,"v":{"docs":{},"df":0,"a":{"docs":{},"df":0,"t":{"docs":{},"df":0,"e":{"docs":{},"df":0,"_":{"docs":{},"df":0,"k":{"docs":{},"df":0,"e":{"docs":{},"df":0,"y":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":1}}}}}}}}}},"u":{"docs":{},"df":0,"b":{"docs":{},"df":0,"l":{"docs":{},"df":0,"i":{"docs":{},"df":0,"c":{"docs":{},"df":0,"_":{"docs":{},"df":0,"k":{"docs":{},"df":0,"e":{"docs":{},"df":0,"y":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":1}}}}}}}}}}}}}}}}}}}},"h":{"docs":{},"df":0,"a":{"docs":{},"df":0,"s":{"docs":{},"df":0,"h":{"docs":{},"df":0,"m":{"docs":{},"df":0,"a":{"docs":{},"df":0,"p":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}}}},"e":{"docs":{},"df":0,"a":{"docs":{},"df":0,"d":{"docs":{},"df":0,"e":{"docs":{},"df":0,"r":{"docs":{"http://localhost:8080/":{"tf":1.4142135623730951}},"df":1}}}},"l":{"docs":{},"df":0,"p":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}},"r":{"docs":{},"df":0,"e":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}},"o":{"docs":{},"df":0,"l":{"docs":{},"df":0,"d":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}},"i":{"docs":{},"df":0,"d":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1},"n":{"docs":{},"df":0,"s":{"docs":{},"df":0,"e":{"docs":{},"df":0,"r":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}},"v":{"docs":{},"df":0,"i":{"docs":{},"df":0,"d":{"docs":{},"df":0,"u":{"docs":{},"df":0,"n":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":3}}}}}}},"p":{"docs":{},"df":0,"s":{"docs":{},"df":0,"u":{"docs":{},"df":0,"m":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.4142135623730951},"http://localhost:8080/jwt/":{"tf":1.4142135623730951},"http://localhost:8080/transaction-docs/":{"tf":1.4142135623730951}},"df":3}}}}},"j":{"docs":{},"df":0,"s":{"docs":{},"df":0,"o":{"docs":{},"df":0,"n":{"docs":{"http://localhost:8080/":{"tf":1.0},"http://localhost:8080/register-docs/":{"tf":1.7320508075688772}},"df":2}}},"u":{"docs":{},"df":0,"s":{"docs":{},"df":0,"t":{"docs":{},"df":0,"o":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":3}}}},"w":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.0}},"df":2,"'":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1},".":{"docs":{},"df":0,"t":{"docs":{},"df":0,"o":{"docs":{},"df":0,"k":{"docs":{},"df":0,"e":{"docs":{},"df":0,"n":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}}}}}}},"k":{"docs":{},"df":0,"_":{"docs":{},"df":0,"t":{"docs":{},"df":0,"e":{"docs":{},"df":0,"m":{"docs":{},"df":0,"p":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.7320508075688772}},"df":1}}}}},"a":{"docs":{},"df":0,"s":{"docs":{},"df":0,"d":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":3}}},"e":{"docs":{},"df":0,"y":{"docs":{"http://localhost:8080/":{"tf":2.449489742783178},"http://localhost:8080/register-docs/":{"tf":3.3166247903554}},"df":2,"_":{"docs":{},"df":0,"c":{"docs":{},"df":0,"i":{"docs":{},"df":0,"p":{"docs":{},"df":0,"h":{"docs":{},"df":0,"e":{"docs":{},"df":0,"r":{"docs":{},"df":0,"t":{"docs":{},"df":0,"e":{"docs":{},"df":0,"x":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":1}}}}}}}}}}},"p":{"docs":{},"df":0,"a":{"docs":{},"df":0,"i":{"docs":{},"df":0,"r":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}}}},"n":{"docs":{},"df":0,"o":{"docs":{},"df":0,"w":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}},"l":{"docs":{},"df":0,"a":{"docs":{},"df":0,"b":{"docs":{},"df":0,"o":{"docs":{},"df":0,"r":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":3}}},"s":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}},"e":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}},"i":{"docs":{},"df":0,"s":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":1.0},"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":2}}},"o":{"docs":{},"df":0,"a":{"docs":{},"df":0,"d":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}},"r":{"docs":{},"df":0,"e":{"docs":{},"df":0,"m":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.4142135623730951},"http://localhost:8080/jwt/":{"tf":1.4142135623730951},"http://localhost:8080/transaction-docs/":{"tf":1.4142135623730951}},"df":3}}}},"t":{"docs":{},"df":0,";":{"docs":{},"df":0,"f":{"docs":{},"df":0,"i":{"docs":{},"df":0,"n":{"docs":{},"df":0,"g":{"docs":{},"df":0,"e":{"docs":{},"df":0,"r":{"docs":{},"df":0,"p":{"docs":{},"df":0,"r":{"docs":{},"df":0,"i":{"docs":{},"df":0,"n":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}}}}}}}}}}}},"m":{"docs":{},"df":0,"a":{"docs":{},"df":0,"g":{"docs":{},"df":0,"n":{"docs":{},"df":0,"a":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":3}}},"l":{"docs":{},"df":0,"f":{"docs":{},"df":0,"o":{"docs":{},"df":0,"r":{"docs":{},"df":0,"m":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}}}},"e":{"docs":{},"df":0,"t":{"docs":{},"df":0,"u":{"docs":{},"df":0,"_":{"docs":{},"df":0,"i":{"docs":{},"df":0,"d":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}}}},"o":{"docs":{},"df":0,"d":{"docs":{},"df":0,"e":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}},"o":{"docs":{},"df":0,"d":{"docs":{},"df":0,"l":{"docs":{"http://localhost:8080/":{"tf":1.0},"http://localhost:8080/register-docs/":{"tf":1.0}},"df":2}}}}},"n":{"docs":{},"df":0,"e":{"docs":{},"df":0,"w":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}},"o":{"docs":{},"df":0,"n":{"docs":{},"df":0,"u":{"docs":{},"df":0,"m":{"docs":{},"df":0,"i":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":3}}}},"w":{"docs":{"http://localhost:8080/":{"tf":1.0},"http://localhost:8080/register-docs/":{"tf":1.0}},"df":2}}},"o":{"docs":{},"df":0,"a":{"docs":{},"df":0,"e":{"docs":{},"df":0,"p":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":1}}},"b":{"docs":{},"df":0,"j":{"docs":{},"df":0,"e":{"docs":{},"df":0,"c":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.7320508075688772}},"df":1}}}}},"f":{"docs":{},"df":0,"f":{"docs":{},"df":0,"e":{"docs":{},"df":0,"r":{"docs":{"http://localhost:8080/":{"tf":1.4142135623730951}},"df":1}}}},"n":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}},"p":{"docs":{},"df":0,"a":{"docs":{},"df":0,"d":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.7320508075688772}},"df":1},"s":{"docs":{},"df":0,"s":{"docs":{},"df":0,"w":{"docs":{},"df":0,"d":{"docs":{"http://localhost:8080/":{"tf":1.0},"http://localhost:8080/register-docs/":{"tf":1.0}},"df":2}}}},"y":{"docs":{},"df":0,"l":{"docs":{},"df":0,"o":{"docs":{},"df":0,"a":{"docs":{},"df":0,"d":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.7320508075688772}},"df":1}}}}}},"e":{"docs":{},"df":0,"m":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}},"i":{"docs":{},"df":0,"c":{"docs":{},"df":0,"k":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":1}}},"k":{"docs":{},"df":0,"c":{"docs":{},"df":0,"s":{"docs":{},"df":0,"7":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":1}}}},"o":{"docs":{},"df":0,"s":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":1.4142135623730951},"http://localhost:8080/register-docs/":{"tf":1.0}},"df":2}}},"r":{"docs":{},"df":0,"i":{"docs":{},"df":0,"v":{"docs":{},"df":0,"a":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}},"o":{"docs":{},"df":0,"c":{"docs":{},"df":0,"e":{"docs":{},"df":0,"s":{"docs":{},"df":0,"s":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}},"p":{"docs":{},"df":0,"e":{"docs":{},"df":0,"r":{"docs":{},"df":0,"l":{"docs":{},"df":0,"i":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}}}}},"u":{"docs":{},"df":0,"b":{"docs":{},"df":0,"l":{"docs":{},"df":0,"i":{"docs":{},"df":0,"c":{"docs":{"http://localhost:8080/":{"tf":2.449489742783178},"http://localhost:8080/register-docs/":{"tf":1.7320508075688772}},"df":2,"_":{"docs":{},"df":0,"k":{"docs":{},"df":0,"e":{"docs":{},"df":0,"y":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}}}}}}}},"r":{"docs":{},"df":0,"e":{"docs":{},"df":0,"b":{"docs":{},"df":0,"u":{"docs":{},"df":0,"m":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":3}}},"c":{"docs":{},"df":0,"e":{"docs":{},"df":0,"i":{"docs":{},"df":0,"v":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":1}}}},"g":{"docs":{},"df":0,"i":{"docs":{},"df":0,"s":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":1.0},"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":2}}}},"j":{"docs":{},"df":0,"e":{"docs":{},"df":0,"c":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}},"q":{"docs":{},"df":0,"u":{"docs":{},"df":0,"e":{"docs":{},"df":0,"s":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":3.0},"http://localhost:8080/register-docs/":{"tf":1.7320508075688772}},"df":2}}}}},"s":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1},"u":{"docs":{},"df":0,"l":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}}},"f":{"docs":{},"df":0,"c":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}},"s":{"docs":{},"df":0,"a":{"docs":{"http://localhost:8080/":{"tf":1.0},"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":2}}},"s":{"docs":{},"df":0,"_":{"docs":{},"df":0,"p":{"docs":{},"df":0,"k":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}},"a":{"docs":{},"df":0,"d":{"docs":{},"df":0,"i":{"docs":{},"df":0,"p":{"docs":{},"df":0,"s":{"docs":{},"df":0,"c":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":3}}}}},"m":{"docs":{},"df":0,"e":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}},"n":{"docs":{},"df":0,"c":{"docs":{},"df":0,"t":{"docs":{},"df":0,"u":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":3}}}}},"c":{"docs":{},"df":0,"h":{"docs":{},"df":0,"e":{"docs":{},"df":0,"m":{"docs":{},"df":0,"a":{"docs":{},"df":0,":":{"docs":{},"df":0,":":{"docs":{},"df":0,"b":{"docs":{},"df":0,"l":{"docs":{},"df":0,"o":{"docs":{},"df":0,"c":{"docs":{},"df":0,"k":{"docs":{"http://localhost:8080/":{"tf":1.4142135623730951}},"df":1,":":{"docs":{},"df":0,":":{"docs":{},"df":0,"t":{"docs":{},"df":0,"r":{"docs":{},"df":0,"a":{"docs":{},"df":0,"n":{"docs":{},"df":0,"s":{"docs":{},"df":0,"a":{"docs":{},"df":0,"c":{"docs":{},"df":0,"t":{"docs":{},"df":0,"i":{"docs":{},"df":0,"o":{"docs":{},"df":0,"n":{"docs":{},"df":0,"_":{"docs":{},"df":0,"l":{"docs":{},"df":0,"i":{"docs":{},"df":0,"s":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}}}}}}}}}}}}}}}}}}}}},"d":{"docs":{},"df":0,"b":{"docs":{},"df":0,":":{"docs":{},"df":0,":":{"docs":{},"df":0,"p":{"docs":{},"df":0,"e":{"docs":{},"df":0,"n":{"docs":{},"df":0,"d":{"docs":{},"df":0,"i":{"docs":{},"df":0,"n":{"docs":{},"df":0,"g":{"docs":{},"df":0,"_":{"docs":{},"df":0,"t":{"docs":{},"df":0,"r":{"docs":{},"df":0,"a":{"docs":{},"df":0,"n":{"docs":{},"df":0,"s":{"docs":{},"df":0,"a":{"docs":{},"df":0,"c":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}}}}}}}}}}}}}}}}}}}}},"e":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":1}}}}},"e":{"docs":{},"df":0,"a":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":3},"c":{"docs":{},"df":0,"r":{"docs":{},"df":0,"e":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}},"d":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.4142135623730951},"http://localhost:8080/jwt/":{"tf":1.4142135623730951},"http://localhost:8080/transaction-docs/":{"tf":1.4142135623730951}},"df":3},"r":{"docs":{},"df":0,"i":{"docs":{},"df":0,"a":{"docs":{},"df":0,"l":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":1}}},"v":{"docs":{},"df":0,"i":{"docs":{},"df":0,"c":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}}},"h":{"docs":{},"df":0,"a":{"docs":{},"df":0,"2":{"docs":{},"df":0,"5":{"docs":{},"df":0,"6":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":1}}}},"o":{"docs":{},"df":0,"r":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}},"i":{"docs":{},"df":0,"d":{"docs":{},"df":0,"e":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}},"g":{"docs":{},"df":0,"n":{"docs":{"http://localhost:8080/":{"tf":1.7320508075688772}},"df":1}},"m":{"docs":{},"df":0,"p":{"docs":{},"df":0,"l":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}},"t":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.4142135623730951},"http://localhost:8080/jwt/":{"tf":1.4142135623730951},"http://localhost:8080/transaction-docs/":{"tf":1.4142135623730951}},"df":3}},"t":{"docs":{},"df":0,"a":{"docs":{},"df":0,"r":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}},"e":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":3}},"r":{"docs":{},"df":0,"i":{"docs":{},"df":0,"n":{"docs":{},"df":0,"g":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":1}}}},"u":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1,"d":{"docs":{},"df":0,"e":{"docs":{},"df":0,"n":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":1.7320508075688772},"http://localhost:8080/register-docs/":{"tf":1.7320508075688772}},"df":2,"_":{"docs":{},"df":0,"i":{"docs":{},"df":0,"d":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}}}}}}},"u":{"docs":{},"df":0,"b":{"docs":{},"df":0,"s":{"docs":{},"df":0,"e":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}}},"y":{"docs":{},"df":0,"s":{"docs":{},"df":0,"t":{"docs":{},"df":0,"e":{"docs":{},"df":0,"m":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}}}},"t":{"docs":{},"df":0,"a":{"docs":{},"df":0,"k":{"docs":{},"df":0,"i":{"docs":{},"df":0,"m":{"docs":{},"df":0,"a":{"docs":{},"df":0,"t":{"docs":{},"df":0,"a":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":3}}}}}}},"e":{"docs":{},"df":0,"m":{"docs":{},"df":0,"p":{"docs":{},"df":0,"_":{"docs":{},"df":0,"k":{"docs":{},"df":0,"e":{"docs":{},"df":0,"y":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":1}}}},"o":{"docs":{},"df":0,"r":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":3,"a":{"docs":{},"df":0,"r":{"docs":{},"df":0,"i":{"docs":{"http://localhost:8080/register-docs/":{"tf":2.0}},"df":1}}}}}}}},"h":{"docs":{},"df":0,"e":{"docs":{},"df":0,"m":{"docs":{},"df":0,"s":{"docs":{},"df":0,"e":{"docs":{},"df":0,"l":{"docs":{},"df":0,"v":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}}}}},"i":{"docs":{},"df":0,"m":{"docs":{},"df":0,"e":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}},"o":{"docs":{},"df":0,"d":{"docs":{},"df":0,"o":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":1}}},"r":{"docs":{},"df":0,"a":{"docs":{},"df":0,"n":{"docs":{},"df":0,"s":{"docs":{},"df":0,"a":{"docs":{},"df":0,"c":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":2.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":2}}}}}}}},"u":{"docs":{},"df":0,"b":{"docs":{},"df":0,"e":{"docs":{},"df":0,"r":{"docs":{},"df":0,"g":{"docs":{},"df":0,"r":{"docs":{},"df":0,"e":{"docs":{},"df":0,"n":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":3}}}}}}},"p":{"docs":{},"df":0,"o":{"docs":{},"df":0,"n":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}},"s":{"docs":{"http://localhost:8080/":{"tf":1.7320508075688772},"http://localhost:8080/register-docs/":{"tf":2.0}},"df":2,"e":{"docs":{},"df":0,"r":{"docs":{"http://localhost:8080/register-docs/":{"tf":2.23606797749979}},"df":1,"&":{"docs":{},"df":0,"g":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}}}},"t":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":3}},"v":{"docs":{},"df":0,"e":{"docs":{},"df":0,"r":{"docs":{},"df":0,"i":{"docs":{},"df":0,"f":{"docs":{},"df":0,"i":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}},"o":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":3}}},"o":{"docs":{},"df":0,"l":{"docs":{},"df":0,"u":{"docs":{},"df":0,"p":{"docs":{},"df":0,"t":{"docs":{},"df":0,"u":{"docs":{},"df":0,"a":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":3}}}}}}}},"w":{"docs":{},"df":0,"e":{"docs":{},"df":0,"b":{"docs":{},"df":0,"s":{"docs":{},"df":0,"i":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}},"l":{"docs":{},"df":0,"l":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}},"o":{"docs":{},"df":0,"r":{"docs":{},"df":0,"k":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}},"r":{"docs":{},"df":0,"a":{"docs":{},"df":0,"p":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}}}},"title":{"root":{"docs":{},"df":0,"b":{"docs":{},"df":0,"l":{"docs":{},"df":0,"o":{"docs":{},"df":0,"c":{"docs":{},"df":0,"k":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0}},"df":1}}}}},"g":{"docs":{},"df":0,"r":{"docs":{},"df":0,"a":{"docs":{},"df":0,"d":{"docs":{},"df":0,"e":{"docs":{},"df":0,"c":{"docs":{},"df":0,"o":{"docs":{},"df":0,"i":{"docs":{},"df":0,"n":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}}}}}}},"j":{"docs":{},"df":0,"w":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/jwt/":{"tf":1.0}},"df":1}}},"r":{"docs":{},"df":0,"e":{"docs":{},"df":0,"g":{"docs":{},"df":0,"i":{"docs":{},"df":0,"s":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}}}},"t":{"docs":{},"df":0,"r":{"docs":{},"df":0,"a":{"docs":{},"df":0,"n":{"docs":{},"df":0,"s":{"docs":{},"df":0,"a":{"docs":{},"df":0,"c":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":1}}}}}}}}}}},"documentStore":{"save":true,"docs":{"http://localhost:8080/":{"body":"\nDon't know where to start? Gradecoin uses RESTful API, simple curl commands or even your browser will work! This website can help as well.\nJWT Debugger and the corresponding RFC\n\nServices\n/register\n\nStudent creates their own 2048 bit RSA keypair\nDownloads Gradecoin's Public Key from Moodle\nEncrypts their JSON wrapped Public Key, Student ID and one time passwd using Gradecoin's Public Key\nTheir public key is now in our database and can be used to sign their JWT's during requests\n\n/transaction\n\nYou can offer a Transaction - POST request\n\nThe request should have Authorization\nThe request header should be signed by the Public Key of the by field in the transaction\n\n\nfetch the list of Transactions - GET request\n\n/block\n\noffer a [schema::Block] - POST request\n\nThe request should have Authorization\nThe [schema::Block::transaction_list] of the block should be a subset of [schema::Db::pending_transactions]\n\n\nfetch the last accepted [schema::Block] - GET request\n\nAuthorization: The request header should have Bearer JWT.Token signed with Student Public Key\n","id":"http://localhost:8080/","title":"Gradecoin"},"http://localhost:8080/block-docs/":{"body":"Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod\ntempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At\nvero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd\nubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.\n","id":"http://localhost:8080/block-docs/","title":"Blocks"},"http://localhost:8080/jwt/":{"body":"Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod\ntempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At\nvero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd\nubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.\n","id":"http://localhost:8080/jwt/","title":"JWT"},"http://localhost:8080/register-docs/":{"body":"POST request to /register endpoint\nLets a [User] (=student) to authenticate themselves to the system\nThis request can be rejected if the payload is malformed (=not authenticated properly) or if\nthe [AuthRequest.user_id] of the request is not in the list of users that can hold a Gradecoin account\nAuthentication Process\n\n\nGradecoin's Public Key (gradecoin_public_key) is listed on moodle.\n\n\nGradecoin's Private Key (gradecoin_private_key) is loaded here\n\n\nStudent picks a short temporary key (k_temp)\n\n\nCreates a JSON object (auth_plaintext) with their metu_id and public key in base64 (PEM) format (S_PK):\n{\nstudent_id: \"e12345\",\npasswd: \"15 char secret\"\npublic_key: \"---BEGIN PUBLIC KEY...\"\n}\n\n\nEncrypts the serialized string of auth_plaintext with 128 bit block AES in CBC mode with Pkcs7 padding using the temporary key (k_temp), the result is auth_ciphertext TODO should this be base64'd?\n\n\nThe temporary key student has picked k_temp is encrypted using RSA with OAEP padding scheme\nusing sha256 with gradecoin_public_key (TODO base64? same as above), giving us key_ciphertext\n\n\nThe payload JSON object (auth_request) can be JSON serialized now:\n{\nc: \"auth_ciphertext\"\nkey: \"key_ciphertext\"\n}\n\n\nGradecoin Side\n\nUpon receiving, we first RSA decrypt with OAEP padding scheme using SHA256 with gradecoin_private_key as the key and auth_request.key key as the ciphertext, receiving temp_key (this is the temporary key chosen by stu\nWith temp_key, we can AES 128 Cbc Pkcs7 decrypt the auth_request.c, giving us\nauth_plaintext\nThe auth_plaintext String can be deserialized to [AuthRequest]\nWe then verify the payload and calculate the User fingerprint\nFinally, create the new [User] object, insert to users HashMap <fingerprint, User>\n\n","id":"http://localhost:8080/register-docs/","title":"Register"},"http://localhost:8080/transaction-docs/":{"body":"Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod\ntempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At\nvero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd\nubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.\n","id":"http://localhost:8080/transaction-docs/","title":"Transactions"}},"docInfo":{"http://localhost:8080/":{"body":99,"title":1},"http://localhost:8080/block-docs/":{"body":48,"title":1},"http://localhost:8080/jwt/":{"body":48,"title":1},"http://localhost:8080/register-docs/":{"body":166,"title":1},"http://localhost:8080/transaction-docs/":{"body":48,"title":1}},"length":5},"lang":"English"}; \ No newline at end of file diff --git a/site/public/sitemap.xml b/site/public/sitemap.xml new file mode 100644 index 0000000..db9224f --- /dev/null +++ b/site/public/sitemap.xml @@ -0,0 +1,18 @@ + + + + http://localhost:8080/ + + + http://localhost:8080/block-docs/ + + + http://localhost:8080/jwt/ + + + http://localhost:8080/register-docs/ + + + http://localhost:8080/transaction-docs/ + + diff --git a/site/public/transaction-docs/index.html b/site/public/transaction-docs/index.html new file mode 100644 index 0000000..8c35895 --- /dev/null +++ b/site/public/transaction-docs/index.html @@ -0,0 +1,126 @@ + + + + + + Transactions | + + + + + + + + + + + + + +
+ + + + + + + + +
+ + +
+ + + + + +
+ +
Transaction documentation
+

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod +tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At +vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd +ubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.

+ + +
+ + + +
+ + +
+ ⁂ +
+ + + + + diff --git a/site/templates/_variables.html b/site/templates/_variables.html new file mode 100644 index 0000000..3fd05b4 --- /dev/null +++ b/site/templates/_variables.html @@ -0,0 +1,15 @@ + diff --git a/site/templates/index.html b/site/templates/index.html new file mode 100644 index 0000000..70223a5 --- /dev/null +++ b/site/templates/index.html @@ -0,0 +1,44 @@ +{% extends "juice/templates/index.html" %} + +{% block hero %} +
+

+ Mine your own grades +

+

+ Gradecoin is the latest cutting edge blockchain technology agile grading framework that drives organic engagement and other buzzwords, with big data mining search engine optimization +

+
+ + + + +
+
+ + +
+ ⇩ Learn How ⇩ +
+ +{% endblock hero %} + +{% block footer %} +
+ ⁂ +
+{% endblock footer %} -- cgit v1.2.3-70-g09d2 From ca9146db3670cac5a82a3b89b998eee12ff27b44 Mon Sep 17 00:00:00 2001 From: Yigit Sever Date: Thu, 15 Apr 2021 03:40:20 +0300 Subject: shed unused function --- src/handlers.rs | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/handlers.rs b/src/handlers.rs index b3a6fa8..7135190 100644 --- a/src/handlers.rs +++ b/src/handlers.rs @@ -194,17 +194,6 @@ pub async fn authenticate_user( Ok(warp::reply::with_status(res_json, StatusCode::CREATED)) } -// fn shed_pem_header_footer(maybe_key: String) -> Result, String> { -// let der_encoded = maybe_key -// .lines() -// .filter(|line| !line.starts_with("-")) -// .fold(String::new(), |mut data, line| { -// data.push_str(&line); -// data -// }); -// Ok(base64::decode(&der_encoded).expect("failed to decode base64 content")) -// } - /// GET /transaction /// Returns JSON array of transactions /// Cannot fail -- cgit v1.2.3-70-g09d2 From 75d9257d89ebf2a544c8a5db0dc1d21b7f57464d Mon Sep 17 00:00:00 2001 From: Yigit Sever Date: Thu, 15 Apr 2021 03:43:10 +0300 Subject: Move template TODO to brag Apart from CHAOS mode, that seems to be all the _initial_ tasks we've set out for ourselves, yay! --- TODO.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/TODO.md b/TODO.md index 15c317a..f57ae7c 100644 --- a/TODO.md +++ b/TODO.md @@ -17,8 +17,8 @@ - [ ] Explain JSON Wrapped - [ ] Give links to the functions, their docs are very good. For example, it seems impossible to understand authentication from the first page, but when you go to handlers::authenticate_user many things are clarified. - [ ] There is todo at handlers::authorized_propose_transaction, fix that -- [ ] authorized_propose_transaction and authorized_propose_block may have more explanation as in the case of - +- [ ] authorized_propose_transaction and authorized_propose_block may have more explanation as in the case of + ### Authorization - [ ] Pointer to JWT @@ -31,8 +31,6 @@ - [ ] Valid JSON with missing fields - [ ] Valid JSON with extra fields -## Please -- [ ] use [juice](https://www.getzola.org/themes/juice/) theme with [template rendering](https://blog.logrocket.com/template-rendering-in-rust/) to create a landing page. I want it to look handmade & _scammy_, I'm talking [verylegit](https://verylegit.link) shortened urls, botched [this person does not exist](https://www.thispersondoesnotexist.com/) user stories etc. ## Testnet - [ ] CHAOS MODE, 3 different coins, combine them to make 1 gradecoin @@ -58,3 +56,4 @@ - [X] Blocks should "play out" the transactions and execute transactions (2021-04-14 21:29) - [X] "Coinbase" ("by" of the first transaction of the block) should get rewarded for their efforts (2021-04-14 21:48) - [X] Implemented Bank Account (2021-04-14 23:28) +- [x] use [juice](https://www.getzola.org/themes/juice/) theme ~~with [template rendering](https://blog.logrocket.com/template-rendering-in-rust/)~~ zola to create a landing page. (done at 2021-04-15 03:41, in the most hilarious way possible) -- cgit v1.2.3-70-g09d2 From 2b866db08bd20985a570c4f0f292aaecfe1ea052 Mon Sep 17 00:00:00 2001 From: Yigit Sever Date: Thu, 15 Apr 2021 00:32:28 +0300 Subject: Add template support We are now serving static HTML alongside Gradecoin REST --- Cargo.lock | 136 +++++++++++++++++++++++++++++++++++++++++++++++++ Cargo.toml | 1 + src/handlers.rs | 19 ++++++- src/routes.rs | 6 ++- templates/css.html | 8 +++ templates/footer.html | 2 + templates/header.html | 11 ++++ templates/menu.html | 5 ++ templates/welcome.html | 8 +++ 9 files changed, 193 insertions(+), 3 deletions(-) create mode 100644 templates/css.html create mode 100644 templates/footer.html create mode 100644 templates/header.html create mode 100644 templates/menu.html create mode 100644 templates/welcome.html diff --git a/Cargo.lock b/Cargo.lock index b548774..649c923 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -40,6 +40,58 @@ dependencies = [ "memchr", ] +[[package]] +name = "arrayvec" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" + +[[package]] +name = "askama" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d298738b6e47e1034e560e5afe63aa488fea34e25ec11b855a76f0d7b8e73134" +dependencies = [ + "askama_derive", + "askama_escape", + "askama_shared", +] + +[[package]] +name = "askama_derive" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca2925c4c290382f9d2fa3d1c1b6a63fa1427099721ecca4749b154cc9c25522" +dependencies = [ + "askama_shared", + "proc-macro2", + "syn", +] + +[[package]] +name = "askama_escape" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90c108c1a94380c89d2215d0ac54ce09796823cca0fd91b299cfff3b33e346fb" + +[[package]] +name = "askama_shared" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2582b77e0f3c506ec4838a25fa8a5f97b9bed72bb6d3d272ea1c031d8bd373bc" +dependencies = [ + "askama_escape", + "humansize", + "nom", + "num-traits", + "percent-encoding", + "proc-macro2", + "quote", + "serde", + "syn", + "toml", +] + [[package]] name = "atty" version = "0.2.14" @@ -81,6 +133,18 @@ version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" +[[package]] +name = "bitvec" +version = "0.19.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8942c8d352ae1838c9dda0b0ca2ab657696ef2232a20147cf1b30ae1a9cb4321" +dependencies = [ + "funty", + "radium", + "tap", + "wyz", +] + [[package]] name = "blake2" version = "0.9.1" @@ -277,6 +341,12 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" +[[package]] +name = "funty" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fed34cd105917e91daa4da6b3728c47b068749d6a62c59811f06ed2ac71d9da7" + [[package]] name = "futures" version = "0.3.14" @@ -376,6 +446,7 @@ name = "gradecoin" version = "0.1.0" dependencies = [ "aes", + "askama", "base64 0.13.0", "blake2", "block-modes", @@ -495,6 +566,12 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "494b4d60369511e7dea41cf646832512a94e542f68bb9c49e54518e0f468eb47" +[[package]] +name = "humansize" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6cab2627acfc432780848602f3f558f7e9dd427352224b0d9324025796d2a5e" + [[package]] name = "humantime" version = "1.3.0" @@ -615,6 +692,19 @@ dependencies = [ "spin", ] +[[package]] +name = "lexical-core" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21f866863575d0e1d654fbeeabdc927292fdf862873dc3c96c6f753357e13374" +dependencies = [ + "arrayvec", + "bitflags", + "cfg-if 1.0.0", + "ryu", + "static_assertions", +] + [[package]] name = "libc" version = "0.2.93" @@ -744,6 +834,19 @@ dependencies = [ "winapi 0.3.9", ] +[[package]] +name = "nom" +version = "6.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7413f999671bd4745a7b624bd370a569fb6bc574b23c83a3c5ed2e453f3d5e2" +dependencies = [ + "bitvec", + "funty", + "lexical-core", + "memchr", + "version_check", +] + [[package]] name = "num-bigint" version = "0.2.6" @@ -967,6 +1070,12 @@ dependencies = [ "proc-macro2", ] +[[package]] +name = "radium" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "941ba9d78d8e2f7ce474c015eea4d9c6d25b6a3327f9832ee29a4de27f91bbb8" + [[package]] name = "rand" version = "0.7.3" @@ -1278,6 +1387,12 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + [[package]] name = "subtle" version = "2.4.0" @@ -1307,6 +1422,12 @@ dependencies = [ "unicode-xid", ] +[[package]] +name = "tap" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" + [[package]] name = "tempfile" version = "3.2.0" @@ -1431,6 +1552,15 @@ dependencies = [ "tokio", ] +[[package]] +name = "toml" +version = "0.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a31142970826733df8241ef35dc040ef98c679ab14d7c3e54d827099b3acecaa" +dependencies = [ + "serde", +] + [[package]] name = "tower-service" version = "0.3.1" @@ -1744,6 +1874,12 @@ dependencies = [ "winapi-build", ] +[[package]] +name = "wyz" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85e60b0d1b5f99db2556934e21937020776a5d31520bf169e851ac44e6420214" + [[package]] name = "zeroize" version = "1.2.0" diff --git a/Cargo.toml b/Cargo.toml index b5733b2..b505ba4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -25,6 +25,7 @@ base64 = "0.13.0" sha2 = "0.9.3" block-modes = "0.7.0" aes = "0.6.0" +askama = "0.10.5" [dev-dependencies] serde_test = "1.0.117" diff --git a/src/handlers.rs b/src/handlers.rs index a8c9947..b3a6fa8 100644 --- a/src/handlers.rs +++ b/src/handlers.rs @@ -1,5 +1,6 @@ -/// API handlers, the ends of each filter chain use aes::Aes128; +/// API handlers, the ends of each filter chain +use askama::Template; use base64; use blake2::{Blake2s, Digest}; use block_modes::block_padding::Pkcs7; @@ -599,3 +600,19 @@ fn authorize_proposer(jwt_token: String, user_pem: &String) -> Result { + title: &'a str, + body: &'a str, +} + +pub async fn welcome_handler() -> Result { + let template = WelcomeTemplate { + title: "Welcome", + body: "To The Bookstore!", + }; + let res = template.render().unwrap(); + Ok(warp::reply::html(res)) +} diff --git a/src/routes.rs b/src/routes.rs index 280de35..f8d9605 100644 --- a/src/routes.rs +++ b/src/routes.rs @@ -7,7 +7,10 @@ use crate::schema::Db; /// Every route combined pub fn consensus_routes(db: Db) -> impl Filter + Clone { - transaction_list(db.clone()) + let welcome_route = warp::path::end().and_then(handlers::welcome_handler); + + welcome_route + .or(transaction_list(db.clone())) .or(register_user(db.clone())) .or(auth_transaction_propose(db.clone())) .or(auth_block_propose(db.clone())) @@ -60,4 +63,3 @@ pub fn auth_block_propose(db: Db) -> impl Filter + td, th { + padding: 8px; + } + th { + text-align: left; + } + diff --git a/templates/footer.html b/templates/footer.html new file mode 100644 index 0000000..2ab5c0d --- /dev/null +++ b/templates/footer.html @@ -0,0 +1,2 @@ + + diff --git a/templates/header.html b/templates/header.html new file mode 100644 index 0000000..fffbefe --- /dev/null +++ b/templates/header.html @@ -0,0 +1,11 @@ + + + Bookstore + {% include "css.html" %} + + +
+

Bookstore

+
+ {% include "menu.html" %} +
diff --git a/templates/menu.html b/templates/menu.html new file mode 100644 index 0000000..0f4e85f --- /dev/null +++ b/templates/menu.html @@ -0,0 +1,5 @@ + diff --git a/templates/welcome.html b/templates/welcome.html new file mode 100644 index 0000000..ca60f33 --- /dev/null +++ b/templates/welcome.html @@ -0,0 +1,8 @@ +{% include "header.html" %} +
+

{{title}}

+
+ {{body}} +
+
+{% include "footer.html" %} -- cgit v1.2.3-70-g09d2 From 82f8e6877a57316860a9468f523decaae9f7529b Mon Sep 17 00:00:00 2001 From: Yigit Sever Date: Thu, 15 Apr 2021 05:30:53 +0300 Subject: Start frontend --- TODO.md | 16 +- public/404.html | 3 + public/android-chrome-192x192.png | Bin 0 -> 26249 bytes public/android-chrome-512x512.png | Bin 0 -> 80376 bytes public/apple-touch-icon.png | Bin 0 -> 24023 bytes public/block-docs/index.html | 126 ++++++++++++ public/elasticlunr.min.js | 10 + public/favicon-16x16.png | Bin 0 -> 878 bytes public/favicon-32x32.png | Bin 0 -> 2463 bytes public/favicon.ico | Bin 0 -> 15406 bytes public/gradecoin.png | Bin 0 -> 197656 bytes public/index.html | 223 ++++++++++++++++++++ public/juice.css | 1 + public/jwt/index.html | 126 ++++++++++++ public/normalize.css | 349 ++++++++++++++++++++++++++++++++ public/register-docs/index.html | 188 +++++++++++++++++ public/robots.txt | 3 + public/search_index.en.js | 1 + public/sitemap.xml | 18 ++ public/transaction-docs/index.html | 126 ++++++++++++ site/config.toml | 1 + site/content/JWT.md | 38 +++- site/content/_index.md | 61 +++++- site/public/block-docs/index.html | 2 +- site/public/index.html | 134 ++++++++++-- site/public/jwt/index.html | 62 +++++- site/public/register-docs/index.html | 2 +- site/public/search_index.en.js | 2 +- site/public/transaction-docs/index.html | 2 +- site/templates/index.html | 33 +-- 30 files changed, 1470 insertions(+), 57 deletions(-) create mode 100644 public/404.html create mode 100644 public/android-chrome-192x192.png create mode 100644 public/android-chrome-512x512.png create mode 100644 public/apple-touch-icon.png create mode 100644 public/block-docs/index.html create mode 100644 public/elasticlunr.min.js create mode 100644 public/favicon-16x16.png create mode 100644 public/favicon-32x32.png create mode 100644 public/favicon.ico create mode 100644 public/gradecoin.png create mode 100644 public/index.html create mode 100644 public/juice.css create mode 100644 public/jwt/index.html create mode 100644 public/normalize.css create mode 100644 public/register-docs/index.html create mode 100644 public/robots.txt create mode 100644 public/search_index.en.js create mode 100644 public/sitemap.xml create mode 100644 public/transaction-docs/index.html diff --git a/TODO.md b/TODO.md index f57ae7c..0fba155 100644 --- a/TODO.md +++ b/TODO.md @@ -2,27 +2,27 @@ ## Office Hour/Recitation - [ ] Should give a little pointers but not too much, I think at first this is going to seem hard to many students but it should become fairly easy after some little pointers + ## Docs - [ ] Make a better explanation of authorization schema - [ ] register: give the register message schema(passwd is missing) -- [ ] gradecoin: give narrative explanation - [ ] how to bank works -- [ ] bank public key -- [ ] how to start(possibly some pointers and links -- blockchain, rest, jwt, rsa, public key) -- [ ] delete CONSTANTS - [ ] register should have AuthRequest in the explanation - [ ] link all types in schema.rs to the docs, they need to understand why we have them - [ ] explain hash type(MD5 is missing in Claims) - [ ] Initial auth request needs more explanation - [ ] Explain JSON Wrapped - [ ] Give links to the functions, their docs are very good. For example, it seems impossible to understand authentication from the first page, but when you go to handlers::authenticate_user many things are clarified. -- [ ] There is todo at handlers::authorized_propose_transaction, fix that - [ ] authorized_propose_transaction and authorized_propose_block may have more explanation as in the case of - +- [x] how to start(possibly some pointers and links -- blockchain, rest, jwt, rsa, public key) +- [x] There is todo at handlers::authorized_propose_transaction, fix that +- [x] gradecoin: give narrative explanation +- [x] bank public key +- [X] delete CONSTANTS ### Authorization -- [ ] Pointer to JWT -- [ ] Pointer to Public Key Sign +- [x] Pointer to JWT +- [x] Pointer to Public Key Sign ## Tests - [ ] User Authentication/Authentication Tests diff --git a/public/404.html b/public/404.html new file mode 100644 index 0000000..f8414f0 --- /dev/null +++ b/public/404.html @@ -0,0 +1,3 @@ + +404 Not Found +

404 Not Found

diff --git a/public/android-chrome-192x192.png b/public/android-chrome-192x192.png new file mode 100644 index 0000000..023ddbd Binary files /dev/null and b/public/android-chrome-192x192.png differ diff --git a/public/android-chrome-512x512.png b/public/android-chrome-512x512.png new file mode 100644 index 0000000..4251933 Binary files /dev/null and b/public/android-chrome-512x512.png differ diff --git a/public/apple-touch-icon.png b/public/apple-touch-icon.png new file mode 100644 index 0000000..cd8e4c8 Binary files /dev/null and b/public/apple-touch-icon.png differ diff --git a/public/block-docs/index.html b/public/block-docs/index.html new file mode 100644 index 0000000..8331952 --- /dev/null +++ b/public/block-docs/index.html @@ -0,0 +1,126 @@ + + + + + + Blocks | + + + + + + + + + + + + + +
+ + + + + + + + +
+ + +
+ + + + + +
+ +
Block Documentation
+

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod +tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At +vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd +ubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.

+ + +
+ + + +
+ + +
+ ⁂ +
+ + + + + diff --git a/public/elasticlunr.min.js b/public/elasticlunr.min.js new file mode 100644 index 0000000..79dad65 --- /dev/null +++ b/public/elasticlunr.min.js @@ -0,0 +1,10 @@ +/** + * elasticlunr - http://weixsong.github.io + * Lightweight full-text search engine in Javascript for browser search and offline search. - 0.9.6 + * + * Copyright (C) 2017 Oliver Nightingale + * Copyright (C) 2017 Wei Song + * MIT Licensed + * @license + */ +!function(){function e(e){if(null===e||"object"!=typeof e)return e;var t=e.constructor();for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}var t=function(e){var n=new t.Index;return n.pipeline.add(t.trimmer,t.stopWordFilter,t.stemmer),e&&e.call(n,n),n};t.version="0.9.5",lunr=t,t.utils={},t.utils.warn=function(e){return function(t){e.console&&console.warn&&console.warn(t)}}(this),t.utils.toString=function(e){return void 0===e||null===e?"":e.toString()},t.EventEmitter=function(){this.events={}},t.EventEmitter.prototype.addListener=function(){var e=Array.prototype.slice.call(arguments),t=e.pop(),n=e;if("function"!=typeof t)throw new TypeError("last argument must be a function");n.forEach(function(e){this.hasHandler(e)||(this.events[e]=[]),this.events[e].push(t)},this)},t.EventEmitter.prototype.removeListener=function(e,t){if(this.hasHandler(e)){var n=this.events[e].indexOf(t);-1!==n&&(this.events[e].splice(n,1),0==this.events[e].length&&delete this.events[e])}},t.EventEmitter.prototype.emit=function(e){if(this.hasHandler(e)){var t=Array.prototype.slice.call(arguments,1);this.events[e].forEach(function(e){e.apply(void 0,t)},this)}},t.EventEmitter.prototype.hasHandler=function(e){return e in this.events},t.tokenizer=function(e){if(!arguments.length||null===e||void 0===e)return[];if(Array.isArray(e)){var n=e.filter(function(e){return null===e||void 0===e?!1:!0});n=n.map(function(e){return t.utils.toString(e).toLowerCase()});var i=[];return n.forEach(function(e){var n=e.split(t.tokenizer.seperator);i=i.concat(n)},this),i}return e.toString().trim().toLowerCase().split(t.tokenizer.seperator)},t.tokenizer.defaultSeperator=/[\s\-]+/,t.tokenizer.seperator=t.tokenizer.defaultSeperator,t.tokenizer.setSeperator=function(e){null!==e&&void 0!==e&&"object"==typeof e&&(t.tokenizer.seperator=e)},t.tokenizer.resetSeperator=function(){t.tokenizer.seperator=t.tokenizer.defaultSeperator},t.tokenizer.getSeperator=function(){return t.tokenizer.seperator},t.Pipeline=function(){this._queue=[]},t.Pipeline.registeredFunctions={},t.Pipeline.registerFunction=function(e,n){n in t.Pipeline.registeredFunctions&&t.utils.warn("Overwriting existing registered function: "+n),e.label=n,t.Pipeline.registeredFunctions[n]=e},t.Pipeline.getRegisteredFunction=function(e){return e in t.Pipeline.registeredFunctions!=!0?null:t.Pipeline.registeredFunctions[e]},t.Pipeline.warnIfFunctionNotRegistered=function(e){var n=e.label&&e.label in this.registeredFunctions;n||t.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",e)},t.Pipeline.load=function(e){var n=new t.Pipeline;return e.forEach(function(e){var i=t.Pipeline.getRegisteredFunction(e);if(!i)throw new Error("Cannot load un-registered function: "+e);n.add(i)}),n},t.Pipeline.prototype.add=function(){var e=Array.prototype.slice.call(arguments);e.forEach(function(e){t.Pipeline.warnIfFunctionNotRegistered(e),this._queue.push(e)},this)},t.Pipeline.prototype.after=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var i=this._queue.indexOf(e);if(-1===i)throw new Error("Cannot find existingFn");this._queue.splice(i+1,0,n)},t.Pipeline.prototype.before=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var i=this._queue.indexOf(e);if(-1===i)throw new Error("Cannot find existingFn");this._queue.splice(i,0,n)},t.Pipeline.prototype.remove=function(e){var t=this._queue.indexOf(e);-1!==t&&this._queue.splice(t,1)},t.Pipeline.prototype.run=function(e){for(var t=[],n=e.length,i=this._queue.length,o=0;n>o;o++){for(var r=e[o],s=0;i>s&&(r=this._queue[s](r,o,e),void 0!==r&&null!==r);s++);void 0!==r&&null!==r&&t.push(r)}return t},t.Pipeline.prototype.reset=function(){this._queue=[]},t.Pipeline.prototype.get=function(){return this._queue},t.Pipeline.prototype.toJSON=function(){return this._queue.map(function(e){return t.Pipeline.warnIfFunctionNotRegistered(e),e.label})},t.Index=function(){this._fields=[],this._ref="id",this.pipeline=new t.Pipeline,this.documentStore=new t.DocumentStore,this.index={},this.eventEmitter=new t.EventEmitter,this._idfCache={},this.on("add","remove","update",function(){this._idfCache={}}.bind(this))},t.Index.prototype.on=function(){var e=Array.prototype.slice.call(arguments);return this.eventEmitter.addListener.apply(this.eventEmitter,e)},t.Index.prototype.off=function(e,t){return this.eventEmitter.removeListener(e,t)},t.Index.load=function(e){e.version!==t.version&&t.utils.warn("version mismatch: current "+t.version+" importing "+e.version);var n=new this;n._fields=e.fields,n._ref=e.ref,n.documentStore=t.DocumentStore.load(e.documentStore),n.pipeline=t.Pipeline.load(e.pipeline),n.index={};for(var i in e.index)n.index[i]=t.InvertedIndex.load(e.index[i]);return n},t.Index.prototype.addField=function(e){return this._fields.push(e),this.index[e]=new t.InvertedIndex,this},t.Index.prototype.setRef=function(e){return this._ref=e,this},t.Index.prototype.saveDocument=function(e){return this.documentStore=new t.DocumentStore(e),this},t.Index.prototype.addDoc=function(e,n){if(e){var n=void 0===n?!0:n,i=e[this._ref];this.documentStore.addDoc(i,e),this._fields.forEach(function(n){var o=this.pipeline.run(t.tokenizer(e[n]));this.documentStore.addFieldLength(i,n,o.length);var r={};o.forEach(function(e){e in r?r[e]+=1:r[e]=1},this);for(var s in r){var u=r[s];u=Math.sqrt(u),this.index[n].addToken(s,{ref:i,tf:u})}},this),n&&this.eventEmitter.emit("add",e,this)}},t.Index.prototype.removeDocByRef=function(e){if(e&&this.documentStore.isDocStored()!==!1&&this.documentStore.hasDoc(e)){var t=this.documentStore.getDoc(e);this.removeDoc(t,!1)}},t.Index.prototype.removeDoc=function(e,n){if(e){var n=void 0===n?!0:n,i=e[this._ref];this.documentStore.hasDoc(i)&&(this.documentStore.removeDoc(i),this._fields.forEach(function(n){var o=this.pipeline.run(t.tokenizer(e[n]));o.forEach(function(e){this.index[n].removeToken(e,i)},this)},this),n&&this.eventEmitter.emit("remove",e,this))}},t.Index.prototype.updateDoc=function(e,t){var t=void 0===t?!0:t;this.removeDocByRef(e[this._ref],!1),this.addDoc(e,!1),t&&this.eventEmitter.emit("update",e,this)},t.Index.prototype.idf=function(e,t){var n="@"+t+"/"+e;if(Object.prototype.hasOwnProperty.call(this._idfCache,n))return this._idfCache[n];var i=this.index[t].getDocFreq(e),o=1+Math.log(this.documentStore.length/(i+1));return this._idfCache[n]=o,o},t.Index.prototype.getFields=function(){return this._fields.slice()},t.Index.prototype.search=function(e,n){if(!e)return[];e="string"==typeof e?{any:e}:JSON.parse(JSON.stringify(e));var i=null;null!=n&&(i=JSON.stringify(n));for(var o=new t.Configuration(i,this.getFields()).get(),r={},s=Object.keys(e),u=0;u0&&t.push(e);for(var i in n)"docs"!==i&&"df"!==i&&this.expandToken(e+i,t,n[i]);return t},t.InvertedIndex.prototype.toJSON=function(){return{root:this.root}},t.Configuration=function(e,n){var e=e||"";if(void 0==n||null==n)throw new Error("fields should not be null");this.config={};var i;try{i=JSON.parse(e),this.buildUserConfig(i,n)}catch(o){t.utils.warn("user configuration parse failed, will use default configuration"),this.buildDefaultConfig(n)}},t.Configuration.prototype.buildDefaultConfig=function(e){this.reset(),e.forEach(function(e){this.config[e]={boost:1,bool:"OR",expand:!1}},this)},t.Configuration.prototype.buildUserConfig=function(e,n){var i="OR",o=!1;if(this.reset(),"bool"in e&&(i=e.bool||i),"expand"in e&&(o=e.expand||o),"fields"in e)for(var r in e.fields)if(n.indexOf(r)>-1){var s=e.fields[r],u=o;void 0!=s.expand&&(u=s.expand),this.config[r]={boost:s.boost||0===s.boost?s.boost:1,bool:s.bool||i,expand:u}}else t.utils.warn("field name in user configuration not found in index instance fields");else this.addAllFields2UserConfig(i,o,n)},t.Configuration.prototype.addAllFields2UserConfig=function(e,t,n){n.forEach(function(n){this.config[n]={boost:1,bool:e,expand:t}},this)},t.Configuration.prototype.get=function(){return this.config},t.Configuration.prototype.reset=function(){this.config={}},lunr.SortedSet=function(){this.length=0,this.elements=[]},lunr.SortedSet.load=function(e){var t=new this;return t.elements=e,t.length=e.length,t},lunr.SortedSet.prototype.add=function(){var e,t;for(e=0;e1;){if(r===e)return o;e>r&&(t=o),r>e&&(n=o),i=n-t,o=t+Math.floor(i/2),r=this.elements[o]}return r===e?o:-1},lunr.SortedSet.prototype.locationFor=function(e){for(var t=0,n=this.elements.length,i=n-t,o=t+Math.floor(i/2),r=this.elements[o];i>1;)e>r&&(t=o),r>e&&(n=o),i=n-t,o=t+Math.floor(i/2),r=this.elements[o];return r>e?o:e>r?o+1:void 0},lunr.SortedSet.prototype.intersect=function(e){for(var t=new lunr.SortedSet,n=0,i=0,o=this.length,r=e.length,s=this.elements,u=e.elements;;){if(n>o-1||i>r-1)break;s[n]!==u[i]?s[n]u[i]&&i++:(t.add(s[n]),n++,i++)}return t},lunr.SortedSet.prototype.clone=function(){var e=new lunr.SortedSet;return e.elements=this.toArray(),e.length=e.elements.length,e},lunr.SortedSet.prototype.union=function(e){var t,n,i;this.length>=e.length?(t=this,n=e):(t=e,n=this),i=t.clone();for(var o=0,r=n.toArray();o + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + +
+ +
+ +
+

+ Mine your own grades +

+

+ Gradecoin is the latest cutting edge blockchain technology agile grading framework that drives organic engagement and other buzzwords, with big data mining search engine optimization +

+
+ + + + +
+
+ + +
+ ⇩ Learn How ⇩ +
+ + +
+ + + +
+ + + + + +
+
+ +
+ Services +
+ + + + + + +
+ - /block +
+ + + +
+
+ + + +
+ +
Overview
+ +

Services

+

/register

+
    +
  • Student creates their own 2048 bit RSA keypair
  • +
  • Downloads Gradecoin's Public Key from Moodle
  • +
  • Encrypts their JSON wrapped Public Key, Student ID and one time passwd using Gradecoin's Public Key
  • +
  • Their public key is now in our database and can be used to sign their JWT's during requests
  • +
+

/transaction

+
    +
  • You can offer a Transaction - POST request +
      +
    • The request should have Authorization
    • +
    • The request header should be signed by the Public Key of the by field in the transaction
    • +
    +
  • +
  • fetch the list of Transactions - GET request
  • +
+

/block

+
    +
  • offer a [schema::Block] - POST request +
      +
    • The request should have Authorization
    • +
    • The [schema::Block::transaction_list] of the block should be a subset of [schema::Db::pending_transactions]
    • +
    +
  • +
  • fetch the last accepted [schema::Block] - GET request
  • +
+

Authorization: The request header should have Bearer JWT.Token signed with Student Public Key

+ + +
+ + + +
+ + +
+ ⁂ +
+ + + + + diff --git a/public/juice.css b/public/juice.css new file mode 100644 index 0000000..219f864 --- /dev/null +++ b/public/juice.css @@ -0,0 +1 @@ +.text-center{text-align:center}.pos-absolute{right:0;left:0;position:absolute}.box-shadow{box-shadow:0 2px 10px 2px #ddd}.heading-text{font-family:"Fira Sans", sans-serif;font-size:32px;font-weight:600;padding:10px 0 25px 0;color:var(--primary-text-color)}h1,.title-text{font-family:"Fira Sans", sans-serif;font-size:25px;font-weight:500;color:var(--primary-text-color);border-left:var(--primary-color) 8px solid;padding-left:10px}h2,.subtitle-text{font-family:"Fira Sans", sans-serif;font-size:20px;font-weight:500;color:var(--primary-text-color)}.text{font-family:"Fira Sans", sans-serif;font-size:18px;font-weight:400;line-height:26px;letter-spacing:0.2px;color:var(--primary-text-color)}.subtext{font-family:"Fira Sans", sans-serif;font-size:16px;font-weight:400;letter-spacing:0.1px}.content{padding:0 40px;display:flex;flex-direction:column;justify-content:center;overflow-x:auto}.content pre{overflow-x:auto;padding:1.25em 1.5em;white-space:pre;word-wrap:normal;background-color:white;color:#4a4a4a;font-size:.875em;font-family:monospace}.content code{background-color:white;color:#4a4a4a;font-size:.875em;font-weight:normal;padding:0.25em 0.5em;font-family:monospace}.content pre code{padding:0}.content a{color:var(--primary-link-color)}.content a:hover{text-decoration:underline}.content blockquote{border-left:#e2dede 8px solid;margin:0;background-color:#f2f1f0;padding:0 20px}body{padding:0;margin:0;box-sizing:border-box;background-color:var(--secondary-color)}a{text-decoration:none}ul{margin-top:0.5rem}ul>li{padding:0.3rem 0}p>img{width:100%;height:auto}header{background-color:var(--primary-color);color:black;padding:20px 50px;display:flex;align-items:center;justify-content:space-between}.logo{font-family:"Alfa Slab One", serif;font-size:32px;color:var(--primary-text-color);display:flex;align-items:center;margin:0 40px}.logo img{width:60px;margin:0 25px}.nav-item{margin:0 10px;text-decoration:none;font-size:18px;font-weight:bold}.nav-item:hover{color:#000;text-decoration:underline}.hero{display:flex;align-items:center;justify-content:space-evenly;height:100vh;background-color:var(--primary-color);overflow-x:hidden;padding:0 40px}.hero .explore-more{position:absolute;bottom:20px;cursor:pointer}main{display:flex;padding:50px 100px}main .toc{max-width:260px;min-width:240px}main .toc-item{padding:10px 20px;color:#424242}main .toc-item a,main .toc-item-child a{color:var(--secondary-text-color)}main .toc-item a:hover,main .toc-item-child a:hover{cursor:pointer;text-decoration:underline}main .toc-item a.active,main .toc-item-child a.active{color:var(--toc-highlight-text-color)}main .toc-item-child{padding:0 30px 5px;color:#424242}.toc-sticky{border-radius:3px;border-top:5px solid var(--primary-color);background-color:white;position:sticky;position:-webkit-sticky;position:-moz-sticky;position:-ms-sticky;position:-o-sticky;top:10px;padding:10px 0}footer{padding:50px;display:flex;flex-direction:column;justify-content:center;align-items:center;background-color:#202020;color:#fcfcfc}footer a{color:#fcfcfc;text-decoration:underline}@media screen and (min-width: 1280px){.content{max-width:60%;min-width:800px}}@media screen and (max-width: 768px){header{padding:10px 30px;flex-direction:column;align-items:center;justify-content:center}.logo{font-size:28px;margin:10px}.logo img{width:45px;margin:0 10px 0 0}.nav-item{margin:0 5px;font-size:14px}.hero{padding:40px 30px}main{padding:30px}.content{padding:0}.explore-more,.toc{display:none}} diff --git a/public/jwt/index.html b/public/jwt/index.html new file mode 100644 index 0000000..899aada --- /dev/null +++ b/public/jwt/index.html @@ -0,0 +1,126 @@ + + + + + + JWT | + + + + + + + + + + + + + +
+ + + + + + + + +
+ + +
+ + + + + +
+ +
JSON Web Token Documentation
+

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod +tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At +vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd +ubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.

+ + +
+ + + +
+ + +
+ ⁂ +
+ + + + + diff --git a/public/normalize.css b/public/normalize.css new file mode 100644 index 0000000..192eb9c --- /dev/null +++ b/public/normalize.css @@ -0,0 +1,349 @@ +/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */ + +/* Document + ========================================================================== */ + +/** + * 1. Correct the line height in all browsers. + * 2. Prevent adjustments of font size after orientation changes in iOS. + */ + +html { + line-height: 1.15; /* 1 */ + -webkit-text-size-adjust: 100%; /* 2 */ +} + +/* Sections + ========================================================================== */ + +/** + * Remove the margin in all browsers. + */ + +body { + margin: 0; +} + +/** + * Render the `main` element consistently in IE. + */ + +main { + display: block; +} + +/** + * Correct the font size and margin on `h1` elements within `section` and + * `article` contexts in Chrome, Firefox, and Safari. + */ + +h1 { + font-size: 2em; + margin: 0.67em 0; +} + +/* Grouping content + ========================================================================== */ + +/** + * 1. Add the correct box sizing in Firefox. + * 2. Show the overflow in Edge and IE. + */ + +hr { + box-sizing: content-box; /* 1 */ + height: 0; /* 1 */ + overflow: visible; /* 2 */ +} + +/** + * 1. Correct the inheritance and scaling of font size in all browsers. + * 2. Correct the odd `em` font sizing in all browsers. + */ + +pre { + font-family: monospace, monospace; /* 1 */ + font-size: 1em; /* 2 */ +} + +/* Text-level semantics + ========================================================================== */ + +/** + * Remove the gray background on active links in IE 10. + */ + +a { + background-color: transparent; +} + +/** + * 1. Remove the bottom border in Chrome 57- + * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari. + */ + +abbr[title] { + border-bottom: none; /* 1 */ + text-decoration: underline; /* 2 */ + text-decoration: underline dotted; /* 2 */ +} + +/** + * Add the correct font weight in Chrome, Edge, and Safari. + */ + +b, +strong { + font-weight: bolder; +} + +/** + * 1. Correct the inheritance and scaling of font size in all browsers. + * 2. Correct the odd `em` font sizing in all browsers. + */ + +code, +kbd, +samp { + font-family: monospace, monospace; /* 1 */ + font-size: 1em; /* 2 */ +} + +/** + * Add the correct font size in all browsers. + */ + +small { + font-size: 80%; +} + +/** + * Prevent `sub` and `sup` elements from affecting the line height in + * all browsers. + */ + +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} + +sub { + bottom: -0.25em; +} + +sup { + top: -0.5em; +} + +/* Embedded content + ========================================================================== */ + +/** + * Remove the border on images inside links in IE 10. + */ + +img { + border-style: none; +} + +/* Forms + ========================================================================== */ + +/** + * 1. Change the font styles in all browsers. + * 2. Remove the margin in Firefox and Safari. + */ + +button, +input, +optgroup, +select, +textarea { + font-family: inherit; /* 1 */ + font-size: 100%; /* 1 */ + line-height: 1.15; /* 1 */ + margin: 0; /* 2 */ +} + +/** + * Show the overflow in IE. + * 1. Show the overflow in Edge. + */ + +button, +input { /* 1 */ + overflow: visible; +} + +/** + * Remove the inheritance of text transform in Edge, Firefox, and IE. + * 1. Remove the inheritance of text transform in Firefox. + */ + +button, +select { /* 1 */ + text-transform: none; +} + +/** + * Correct the inability to style clickable types in iOS and Safari. + */ + +button, +[type="button"], +[type="reset"], +[type="submit"] { + -webkit-appearance: button; +} + +/** + * Remove the inner border and padding in Firefox. + */ + +button::-moz-focus-inner, +[type="button"]::-moz-focus-inner, +[type="reset"]::-moz-focus-inner, +[type="submit"]::-moz-focus-inner { + border-style: none; + padding: 0; +} + +/** + * Restore the focus styles unset by the previous rule. + */ + +button:-moz-focusring, +[type="button"]:-moz-focusring, +[type="reset"]:-moz-focusring, +[type="submit"]:-moz-focusring { + outline: 1px dotted ButtonText; +} + +/** + * Correct the padding in Firefox. + */ + +fieldset { + padding: 0.35em 0.75em 0.625em; +} + +/** + * 1. Correct the text wrapping in Edge and IE. + * 2. Correct the color inheritance from `fieldset` elements in IE. + * 3. Remove the padding so developers are not caught out when they zero out + * `fieldset` elements in all browsers. + */ + +legend { + box-sizing: border-box; /* 1 */ + color: inherit; /* 2 */ + display: table; /* 1 */ + max-width: 100%; /* 1 */ + padding: 0; /* 3 */ + white-space: normal; /* 1 */ +} + +/** + * Add the correct vertical alignment in Chrome, Firefox, and Opera. + */ + +progress { + vertical-align: baseline; +} + +/** + * Remove the default vertical scrollbar in IE 10+. + */ + +textarea { + overflow: auto; +} + +/** + * 1. Add the correct box sizing in IE 10. + * 2. Remove the padding in IE 10. + */ + +[type="checkbox"], +[type="radio"] { + box-sizing: border-box; /* 1 */ + padding: 0; /* 2 */ +} + +/** + * Correct the cursor style of increment and decrement buttons in Chrome. + */ + +[type="number"]::-webkit-inner-spin-button, +[type="number"]::-webkit-outer-spin-button { + height: auto; +} + +/** + * 1. Correct the odd appearance in Chrome and Safari. + * 2. Correct the outline style in Safari. + */ + +[type="search"] { + -webkit-appearance: textfield; /* 1 */ + outline-offset: -2px; /* 2 */ +} + +/** + * Remove the inner padding in Chrome and Safari on macOS. + */ + +[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; +} + +/** + * 1. Correct the inability to style clickable types in iOS and Safari. + * 2. Change font properties to `inherit` in Safari. + */ + +::-webkit-file-upload-button { + -webkit-appearance: button; /* 1 */ + font: inherit; /* 2 */ +} + +/* Interactive + ========================================================================== */ + +/* + * Add the correct display in Edge, IE 10+, and Firefox. + */ + +details { + display: block; +} + +/* + * Add the correct display in all browsers. + */ + +summary { + display: list-item; +} + +/* Misc + ========================================================================== */ + +/** + * Add the correct display in IE 10+. + */ + +template { + display: none; +} + +/** + * Add the correct display in IE 10. + */ + +[hidden] { + display: none; +} diff --git a/public/register-docs/index.html b/public/register-docs/index.html new file mode 100644 index 0000000..10a4d56 --- /dev/null +++ b/public/register-docs/index.html @@ -0,0 +1,188 @@ + + + + + + Register | + + + + + + + + + + + + + +
+ + + + + + + + +
+ + +
+ + + + + +
+
+ + + + + + + + +
+
+ + + +
+ +
Register Documentation
+

POST request to /register endpoint +Lets a [User] (=student) to authenticate themselves to the system +This request can be rejected if the payload is malformed (=not authenticated properly) or if +the [AuthRequest.user_id] of the request is not in the list of users that can hold a Gradecoin account

+

Authentication Process

+
    +
  • +

    Gradecoin's Public Key (gradecoin_public_key) is listed on moodle.

    +
  • +
  • +

    Gradecoin's Private Key (gradecoin_private_key) is loaded here

    +
  • +
  • +

    Student picks a short temporary key (k_temp)

    +
  • +
  • +

    Creates a JSON object (auth_plaintext) with their metu_id and public key in base64 (PEM) format (S_PK): +{ +student_id: "e12345", +passwd: "15 char secret" +public_key: "---BEGIN PUBLIC KEY..." +}

    +
  • +
  • +

    Encrypts the serialized string of auth_plaintext with 128 bit block AES in CBC mode with Pkcs7 padding using the temporary key (k_temp), the result is auth_ciphertext TODO should this be base64'd?

    +
  • +
  • +

    The temporary key student has picked k_temp is encrypted using RSA with OAEP padding scheme +using sha256 with gradecoin_public_key (TODO base64? same as above), giving us key_ciphertext

    +
  • +
  • +

    The payload JSON object (auth_request) can be JSON serialized now: +{ +c: "auth_ciphertext" +key: "key_ciphertext" +}

    +
  • +
+

Gradecoin Side

+
    +
  • Upon receiving, we first RSA decrypt with OAEP padding scheme using SHA256 with gradecoin_private_key as the key and auth_request.key key as the ciphertext, receiving temp_key (this is the temporary key chosen by stu
  • +
  • With temp_key, we can AES 128 Cbc Pkcs7 decrypt the auth_request.c, giving us +auth_plaintext
  • +
  • The auth_plaintext String can be deserialized to [AuthRequest]
  • +
  • We then verify the payload and calculate the User fingerprint
  • +
  • Finally, create the new [User] object, insert to users HashMap <fingerprint, User>
  • +
+ + +
+ + + +
+ + +
+ ⁂ +
+ + + + + diff --git a/public/robots.txt b/public/robots.txt new file mode 100644 index 0000000..c100df9 --- /dev/null +++ b/public/robots.txt @@ -0,0 +1,3 @@ +User-agent: * +Allow: / +Sitemap: http://localhost:8080/sitemap.xml diff --git a/public/search_index.en.js b/public/search_index.en.js new file mode 100644 index 0000000..03cbfea --- /dev/null +++ b/public/search_index.en.js @@ -0,0 +1 @@ +window.searchIndex = {"fields":["title","body"],"pipeline":["trimmer","stopWordFilter","stemmer"],"ref":"id","version":"0.9.5","index":{"body":{"root":{"docs":{},"df":0,"1":{"docs":{},"df":0,"2":{"docs":{},"df":0,"8":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":1}},"5":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}},"2":{"docs":{},"df":0,"0":{"docs":{},"df":0,"4":{"docs":{},"df":0,"8":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}},"a":{"docs":{},"df":0,"b":{"docs":{},"df":0,"o":{"docs":{},"df":0,"v":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}},"c":{"docs":{},"df":0,"c":{"docs":{},"df":0,"e":{"docs":{},"df":0,"p":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}},"o":{"docs":{},"df":0,"u":{"docs":{},"df":0,"n":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}},"u":{"docs":{},"df":0,"s":{"docs":{},"df":0,"a":{"docs":{},"df":0,"m":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":3}}}}}},"e":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":1},"l":{"docs":{},"df":0,"i":{"docs":{},"df":0,"q":{"docs":{},"df":0,"u":{"docs":{},"df":0,"y":{"docs":{},"df":0,"a":{"docs":{},"df":0,"m":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":3}}}}}}},"m":{"docs":{},"df":0,"e":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.4142135623730951},"http://localhost:8080/jwt/":{"tf":1.4142135623730951},"http://localhost:8080/transaction-docs/":{"tf":1.4142135623730951}},"df":3}}},"p":{"docs":{},"df":0,"i":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}},"u":{"docs":{},"df":0,"t":{"docs":{},"df":0,"h":{"docs":{},"df":0,"_":{"docs":{},"df":0,"c":{"docs":{},"df":0,"i":{"docs":{},"df":0,"p":{"docs":{},"df":0,"h":{"docs":{},"df":0,"e":{"docs":{},"df":0,"r":{"docs":{},"df":0,"t":{"docs":{},"df":0,"e":{"docs":{},"df":0,"x":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":1}}}}}}}}}},"p":{"docs":{},"df":0,"l":{"docs":{},"df":0,"a":{"docs":{},"df":0,"i":{"docs":{},"df":0,"n":{"docs":{},"df":0,"t":{"docs":{},"df":0,"e":{"docs":{},"df":0,"x":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/register-docs/":{"tf":2.0}},"df":1}}}}}}}}},"r":{"docs":{},"df":0,"e":{"docs":{},"df":0,"q":{"docs":{},"df":0,"u":{"docs":{},"df":0,"e":{"docs":{},"df":0,"s":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1,".":{"docs":{},"df":0,"c":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1},"k":{"docs":{},"df":0,"e":{"docs":{},"df":0,"y":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}}}}}}}}}},"e":{"docs":{},"df":0,"n":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.7320508075688772}},"df":1}}},"o":{"docs":{},"df":0,"r":{"docs":{"http://localhost:8080/":{"tf":1.7320508075688772}},"df":1}},"r":{"docs":{},"df":0,"e":{"docs":{},"df":0,"q":{"docs":{},"df":0,"u":{"docs":{},"df":0,"e":{"docs":{},"df":0,"s":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1,".":{"docs":{},"df":0,"u":{"docs":{},"df":0,"s":{"docs":{},"df":0,"e":{"docs":{},"df":0,"r":{"docs":{},"df":0,"_":{"docs":{},"df":0,"i":{"docs":{},"df":0,"d":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}}}}}}}}}}}}}}}}},"b":{"docs":{},"df":0,"a":{"docs":{},"df":0,"s":{"docs":{},"df":0,"e":{"docs":{},"df":0,"6":{"docs":{},"df":0,"4":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":1,"'":{"docs":{},"df":0,"d":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}}}}},"e":{"docs":{},"df":0,"a":{"docs":{},"df":0,"r":{"docs":{},"df":0,"e":{"docs":{},"df":0,"r":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}},"g":{"docs":{},"df":0,"i":{"docs":{},"df":0,"n":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}},"i":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":1.0},"http://localhost:8080/register-docs/":{"tf":1.0}},"df":2}},"l":{"docs":{},"df":0,"o":{"docs":{},"df":0,"c":{"docs":{},"df":0,"k":{"docs":{"http://localhost:8080/":{"tf":1.4142135623730951},"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/register-docs/":{"tf":1.0}},"df":3}}}},"r":{"docs":{},"df":0,"o":{"docs":{},"df":0,"w":{"docs":{},"df":0,"s":{"docs":{},"df":0,"e":{"docs":{},"df":0,"r":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}}}}},"c":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1,"a":{"docs":{},"df":0,"l":{"docs":{},"df":0,"c":{"docs":{},"df":0,"u":{"docs":{},"df":0,"l":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}}},"b":{"docs":{},"df":0,"c":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":1}},"h":{"docs":{},"df":0,"a":{"docs":{},"df":0,"r":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}},"o":{"docs":{},"df":0,"s":{"docs":{},"df":0,"e":{"docs":{},"df":0,"n":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}}},"i":{"docs":{},"df":0,"p":{"docs":{},"df":0,"h":{"docs":{},"df":0,"e":{"docs":{},"df":0,"r":{"docs":{},"df":0,"t":{"docs":{},"df":0,"e":{"docs":{},"df":0,"x":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}}}}}}},"l":{"docs":{},"df":0,"i":{"docs":{},"df":0,"t":{"docs":{},"df":0,"a":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":3}}}},"o":{"docs":{},"df":0,"m":{"docs":{},"df":0,"m":{"docs":{},"df":0,"a":{"docs":{},"df":0,"n":{"docs":{},"df":0,"d":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}}},"n":{"docs":{},"df":0,"s":{"docs":{},"df":0,"e":{"docs":{},"df":0,"t":{"docs":{},"df":0,"e":{"docs":{},"df":0,"t":{"docs":{},"df":0,"u":{"docs":{},"df":0,"r":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":3}}}}}}}},"r":{"docs":{},"df":0,"r":{"docs":{},"df":0,"e":{"docs":{},"df":0,"s":{"docs":{},"df":0,"p":{"docs":{},"df":0,"o":{"docs":{},"df":0,"n":{"docs":{},"df":0,"d":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}}}}}}},"r":{"docs":{},"df":0,"e":{"docs":{},"df":0,"a":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":1.0},"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":2}}}},"u":{"docs":{},"df":0,"r":{"docs":{},"df":0,"l":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}},"d":{"docs":{},"df":0,"a":{"docs":{},"df":0,"t":{"docs":{},"df":0,"a":{"docs":{},"df":0,"b":{"docs":{},"df":0,"a":{"docs":{},"df":0,"s":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}}}},"e":{"docs":{},"df":0,"b":{"docs":{},"df":0,"u":{"docs":{},"df":0,"g":{"docs":{},"df":0,"g":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}},"c":{"docs":{},"df":0,"r":{"docs":{},"df":0,"y":{"docs":{},"df":0,"p":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":1}}}}},"s":{"docs":{},"df":0,"e":{"docs":{},"df":0,"r":{"docs":{},"df":0,"i":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}}},"i":{"docs":{},"df":0,"a":{"docs":{},"df":0,"m":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.4142135623730951},"http://localhost:8080/jwt/":{"tf":1.4142135623730951},"http://localhost:8080/transaction-docs/":{"tf":1.4142135623730951}},"df":3}}},"o":{"docs":{},"df":0,"l":{"docs":{},"df":0,"o":{"docs":{},"df":0,"r":{"docs":{"http://localhost:8080/block-docs/":{"tf":2.0},"http://localhost:8080/jwt/":{"tf":2.0},"http://localhost:8080/transaction-docs/":{"tf":2.0}},"df":3}}},"n":{"docs":{},"df":0,"'":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}},"w":{"docs":{},"df":0,"n":{"docs":{},"df":0,"l":{"docs":{},"df":0,"o":{"docs":{},"df":0,"a":{"docs":{},"df":0,"d":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}}}}},"u":{"docs":{},"df":0,"o":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":3},"r":{"docs":{},"df":0,"e":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}},"e":{"docs":{},"df":0,"1":{"docs":{},"df":0,"2":{"docs":{},"df":0,"3":{"docs":{},"df":0,"4":{"docs":{},"df":0,"5":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}}},"a":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":3},"i":{"docs":{},"df":0,"r":{"docs":{},"df":0,"m":{"docs":{},"df":0,"o":{"docs":{},"df":0,"d":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":3}}}}},"l":{"docs":{},"df":0,"i":{"docs":{},"df":0,"t":{"docs":{},"df":0,"r":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":3}}}},"n":{"docs":{},"df":0,"c":{"docs":{},"df":0,"r":{"docs":{},"df":0,"y":{"docs":{},"df":0,"p":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":1.0},"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":2}}}}},"d":{"docs":{},"df":0,"p":{"docs":{},"df":0,"o":{"docs":{},"df":0,"i":{"docs":{},"df":0,"n":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}}}}},"o":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":3},"r":{"docs":{},"df":0,"a":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":3}}},"s":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":3}},"t":{"docs":{"http://localhost:8080/block-docs/":{"tf":2.0},"http://localhost:8080/jwt/":{"tf":2.0},"http://localhost:8080/transaction-docs/":{"tf":2.0}},"df":3},"v":{"docs":{},"df":0,"e":{"docs":{},"df":0,"n":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}},"f":{"docs":{},"df":0,"e":{"docs":{},"df":0,"t":{"docs":{},"df":0,"c":{"docs":{},"df":0,"h":{"docs":{"http://localhost:8080/":{"tf":1.4142135623730951}},"df":1}}}},"i":{"docs":{},"df":0,"e":{"docs":{},"df":0,"l":{"docs":{},"df":0,"d":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}},"n":{"docs":{},"df":0,"a":{"docs":{},"df":0,"l":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}},"g":{"docs":{},"df":0,"e":{"docs":{},"df":0,"r":{"docs":{},"df":0,"p":{"docs":{},"df":0,"r":{"docs":{},"df":0,"i":{"docs":{},"df":0,"n":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}}}}}}},"r":{"docs":{},"df":0,"s":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}},"o":{"docs":{},"df":0,"r":{"docs":{},"df":0,"m":{"docs":{},"df":0,"a":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}}}},"g":{"docs":{},"df":0,"i":{"docs":{},"df":0,"v":{"docs":{},"df":0,"e":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":1}}},"r":{"docs":{},"df":0,"a":{"docs":{},"df":0,"d":{"docs":{},"df":0,"e":{"docs":{},"df":0,"c":{"docs":{},"df":0,"o":{"docs":{},"df":0,"i":{"docs":{},"df":0,"n":{"docs":{"http://localhost:8080/":{"tf":1.4142135623730951},"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":2,"'":{"docs":{"http://localhost:8080/":{"tf":1.4142135623730951},"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":2},"_":{"docs":{},"df":0,"p":{"docs":{},"df":0,"r":{"docs":{},"df":0,"i":{"docs":{},"df":0,"v":{"docs":{},"df":0,"a":{"docs":{},"df":0,"t":{"docs":{},"df":0,"e":{"docs":{},"df":0,"_":{"docs":{},"df":0,"k":{"docs":{},"df":0,"e":{"docs":{},"df":0,"y":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":1}}}}}}}}}},"u":{"docs":{},"df":0,"b":{"docs":{},"df":0,"l":{"docs":{},"df":0,"i":{"docs":{},"df":0,"c":{"docs":{},"df":0,"_":{"docs":{},"df":0,"k":{"docs":{},"df":0,"e":{"docs":{},"df":0,"y":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":1}}}}}}}}}}}}}}}}}}}},"h":{"docs":{},"df":0,"a":{"docs":{},"df":0,"s":{"docs":{},"df":0,"h":{"docs":{},"df":0,"m":{"docs":{},"df":0,"a":{"docs":{},"df":0,"p":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}}}},"e":{"docs":{},"df":0,"a":{"docs":{},"df":0,"d":{"docs":{},"df":0,"e":{"docs":{},"df":0,"r":{"docs":{"http://localhost:8080/":{"tf":1.4142135623730951}},"df":1}}}},"l":{"docs":{},"df":0,"p":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}},"r":{"docs":{},"df":0,"e":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}},"o":{"docs":{},"df":0,"l":{"docs":{},"df":0,"d":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}},"i":{"docs":{},"df":0,"d":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1},"n":{"docs":{},"df":0,"s":{"docs":{},"df":0,"e":{"docs":{},"df":0,"r":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}},"v":{"docs":{},"df":0,"i":{"docs":{},"df":0,"d":{"docs":{},"df":0,"u":{"docs":{},"df":0,"n":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":3}}}}}}},"p":{"docs":{},"df":0,"s":{"docs":{},"df":0,"u":{"docs":{},"df":0,"m":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.4142135623730951},"http://localhost:8080/jwt/":{"tf":1.4142135623730951},"http://localhost:8080/transaction-docs/":{"tf":1.4142135623730951}},"df":3}}}}},"j":{"docs":{},"df":0,"s":{"docs":{},"df":0,"o":{"docs":{},"df":0,"n":{"docs":{"http://localhost:8080/":{"tf":1.0},"http://localhost:8080/register-docs/":{"tf":1.7320508075688772}},"df":2}}},"u":{"docs":{},"df":0,"s":{"docs":{},"df":0,"t":{"docs":{},"df":0,"o":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":3}}}},"w":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.0}},"df":2,"'":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1},".":{"docs":{},"df":0,"t":{"docs":{},"df":0,"o":{"docs":{},"df":0,"k":{"docs":{},"df":0,"e":{"docs":{},"df":0,"n":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}}}}}}},"k":{"docs":{},"df":0,"_":{"docs":{},"df":0,"t":{"docs":{},"df":0,"e":{"docs":{},"df":0,"m":{"docs":{},"df":0,"p":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.7320508075688772}},"df":1}}}}},"a":{"docs":{},"df":0,"s":{"docs":{},"df":0,"d":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":3}}},"e":{"docs":{},"df":0,"y":{"docs":{"http://localhost:8080/":{"tf":2.449489742783178},"http://localhost:8080/register-docs/":{"tf":3.3166247903554}},"df":2,"_":{"docs":{},"df":0,"c":{"docs":{},"df":0,"i":{"docs":{},"df":0,"p":{"docs":{},"df":0,"h":{"docs":{},"df":0,"e":{"docs":{},"df":0,"r":{"docs":{},"df":0,"t":{"docs":{},"df":0,"e":{"docs":{},"df":0,"x":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":1}}}}}}}}}}},"p":{"docs":{},"df":0,"a":{"docs":{},"df":0,"i":{"docs":{},"df":0,"r":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}}}},"n":{"docs":{},"df":0,"o":{"docs":{},"df":0,"w":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}},"l":{"docs":{},"df":0,"a":{"docs":{},"df":0,"b":{"docs":{},"df":0,"o":{"docs":{},"df":0,"r":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":3}}},"s":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}},"e":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}},"i":{"docs":{},"df":0,"s":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":1.0},"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":2}}},"o":{"docs":{},"df":0,"a":{"docs":{},"df":0,"d":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}},"r":{"docs":{},"df":0,"e":{"docs":{},"df":0,"m":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.4142135623730951},"http://localhost:8080/jwt/":{"tf":1.4142135623730951},"http://localhost:8080/transaction-docs/":{"tf":1.4142135623730951}},"df":3}}}},"t":{"docs":{},"df":0,";":{"docs":{},"df":0,"f":{"docs":{},"df":0,"i":{"docs":{},"df":0,"n":{"docs":{},"df":0,"g":{"docs":{},"df":0,"e":{"docs":{},"df":0,"r":{"docs":{},"df":0,"p":{"docs":{},"df":0,"r":{"docs":{},"df":0,"i":{"docs":{},"df":0,"n":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}}}}}}}}}}}},"m":{"docs":{},"df":0,"a":{"docs":{},"df":0,"g":{"docs":{},"df":0,"n":{"docs":{},"df":0,"a":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":3}}},"l":{"docs":{},"df":0,"f":{"docs":{},"df":0,"o":{"docs":{},"df":0,"r":{"docs":{},"df":0,"m":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}}}},"e":{"docs":{},"df":0,"t":{"docs":{},"df":0,"u":{"docs":{},"df":0,"_":{"docs":{},"df":0,"i":{"docs":{},"df":0,"d":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}}}},"o":{"docs":{},"df":0,"d":{"docs":{},"df":0,"e":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}},"o":{"docs":{},"df":0,"d":{"docs":{},"df":0,"l":{"docs":{"http://localhost:8080/":{"tf":1.0},"http://localhost:8080/register-docs/":{"tf":1.0}},"df":2}}}}},"n":{"docs":{},"df":0,"e":{"docs":{},"df":0,"w":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}},"o":{"docs":{},"df":0,"n":{"docs":{},"df":0,"u":{"docs":{},"df":0,"m":{"docs":{},"df":0,"i":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":3}}}},"w":{"docs":{"http://localhost:8080/":{"tf":1.0},"http://localhost:8080/register-docs/":{"tf":1.0}},"df":2}}},"o":{"docs":{},"df":0,"a":{"docs":{},"df":0,"e":{"docs":{},"df":0,"p":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":1}}},"b":{"docs":{},"df":0,"j":{"docs":{},"df":0,"e":{"docs":{},"df":0,"c":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.7320508075688772}},"df":1}}}}},"f":{"docs":{},"df":0,"f":{"docs":{},"df":0,"e":{"docs":{},"df":0,"r":{"docs":{"http://localhost:8080/":{"tf":1.4142135623730951}},"df":1}}}},"n":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}},"p":{"docs":{},"df":0,"a":{"docs":{},"df":0,"d":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.7320508075688772}},"df":1},"s":{"docs":{},"df":0,"s":{"docs":{},"df":0,"w":{"docs":{},"df":0,"d":{"docs":{"http://localhost:8080/":{"tf":1.0},"http://localhost:8080/register-docs/":{"tf":1.0}},"df":2}}}},"y":{"docs":{},"df":0,"l":{"docs":{},"df":0,"o":{"docs":{},"df":0,"a":{"docs":{},"df":0,"d":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.7320508075688772}},"df":1}}}}}},"e":{"docs":{},"df":0,"m":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}},"i":{"docs":{},"df":0,"c":{"docs":{},"df":0,"k":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":1}}},"k":{"docs":{},"df":0,"c":{"docs":{},"df":0,"s":{"docs":{},"df":0,"7":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":1}}}},"o":{"docs":{},"df":0,"s":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":1.4142135623730951},"http://localhost:8080/register-docs/":{"tf":1.0}},"df":2}}},"r":{"docs":{},"df":0,"i":{"docs":{},"df":0,"v":{"docs":{},"df":0,"a":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}},"o":{"docs":{},"df":0,"c":{"docs":{},"df":0,"e":{"docs":{},"df":0,"s":{"docs":{},"df":0,"s":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}},"p":{"docs":{},"df":0,"e":{"docs":{},"df":0,"r":{"docs":{},"df":0,"l":{"docs":{},"df":0,"i":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}}}}},"u":{"docs":{},"df":0,"b":{"docs":{},"df":0,"l":{"docs":{},"df":0,"i":{"docs":{},"df":0,"c":{"docs":{"http://localhost:8080/":{"tf":2.449489742783178},"http://localhost:8080/register-docs/":{"tf":1.7320508075688772}},"df":2,"_":{"docs":{},"df":0,"k":{"docs":{},"df":0,"e":{"docs":{},"df":0,"y":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}}}}}}}},"r":{"docs":{},"df":0,"e":{"docs":{},"df":0,"b":{"docs":{},"df":0,"u":{"docs":{},"df":0,"m":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":3}}},"c":{"docs":{},"df":0,"e":{"docs":{},"df":0,"i":{"docs":{},"df":0,"v":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":1}}}},"g":{"docs":{},"df":0,"i":{"docs":{},"df":0,"s":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":1.0},"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":2}}}},"j":{"docs":{},"df":0,"e":{"docs":{},"df":0,"c":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}},"q":{"docs":{},"df":0,"u":{"docs":{},"df":0,"e":{"docs":{},"df":0,"s":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":3.0},"http://localhost:8080/register-docs/":{"tf":1.7320508075688772}},"df":2}}}}},"s":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1},"u":{"docs":{},"df":0,"l":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}}},"f":{"docs":{},"df":0,"c":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}},"s":{"docs":{},"df":0,"a":{"docs":{"http://localhost:8080/":{"tf":1.0},"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":2}}},"s":{"docs":{},"df":0,"_":{"docs":{},"df":0,"p":{"docs":{},"df":0,"k":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}},"a":{"docs":{},"df":0,"d":{"docs":{},"df":0,"i":{"docs":{},"df":0,"p":{"docs":{},"df":0,"s":{"docs":{},"df":0,"c":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":3}}}}},"m":{"docs":{},"df":0,"e":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}},"n":{"docs":{},"df":0,"c":{"docs":{},"df":0,"t":{"docs":{},"df":0,"u":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":3}}}}},"c":{"docs":{},"df":0,"h":{"docs":{},"df":0,"e":{"docs":{},"df":0,"m":{"docs":{},"df":0,"a":{"docs":{},"df":0,":":{"docs":{},"df":0,":":{"docs":{},"df":0,"b":{"docs":{},"df":0,"l":{"docs":{},"df":0,"o":{"docs":{},"df":0,"c":{"docs":{},"df":0,"k":{"docs":{"http://localhost:8080/":{"tf":1.4142135623730951}},"df":1,":":{"docs":{},"df":0,":":{"docs":{},"df":0,"t":{"docs":{},"df":0,"r":{"docs":{},"df":0,"a":{"docs":{},"df":0,"n":{"docs":{},"df":0,"s":{"docs":{},"df":0,"a":{"docs":{},"df":0,"c":{"docs":{},"df":0,"t":{"docs":{},"df":0,"i":{"docs":{},"df":0,"o":{"docs":{},"df":0,"n":{"docs":{},"df":0,"_":{"docs":{},"df":0,"l":{"docs":{},"df":0,"i":{"docs":{},"df":0,"s":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}}}}}}}}}}}}}}}}}}}}},"d":{"docs":{},"df":0,"b":{"docs":{},"df":0,":":{"docs":{},"df":0,":":{"docs":{},"df":0,"p":{"docs":{},"df":0,"e":{"docs":{},"df":0,"n":{"docs":{},"df":0,"d":{"docs":{},"df":0,"i":{"docs":{},"df":0,"n":{"docs":{},"df":0,"g":{"docs":{},"df":0,"_":{"docs":{},"df":0,"t":{"docs":{},"df":0,"r":{"docs":{},"df":0,"a":{"docs":{},"df":0,"n":{"docs":{},"df":0,"s":{"docs":{},"df":0,"a":{"docs":{},"df":0,"c":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}}}}}}}}}}}}}}}}}}}}},"e":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":1}}}}},"e":{"docs":{},"df":0,"a":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":3},"c":{"docs":{},"df":0,"r":{"docs":{},"df":0,"e":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}},"d":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.4142135623730951},"http://localhost:8080/jwt/":{"tf":1.4142135623730951},"http://localhost:8080/transaction-docs/":{"tf":1.4142135623730951}},"df":3},"r":{"docs":{},"df":0,"i":{"docs":{},"df":0,"a":{"docs":{},"df":0,"l":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":1}}},"v":{"docs":{},"df":0,"i":{"docs":{},"df":0,"c":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}}},"h":{"docs":{},"df":0,"a":{"docs":{},"df":0,"2":{"docs":{},"df":0,"5":{"docs":{},"df":0,"6":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":1}}}},"o":{"docs":{},"df":0,"r":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}},"i":{"docs":{},"df":0,"d":{"docs":{},"df":0,"e":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}},"g":{"docs":{},"df":0,"n":{"docs":{"http://localhost:8080/":{"tf":1.7320508075688772}},"df":1}},"m":{"docs":{},"df":0,"p":{"docs":{},"df":0,"l":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}},"t":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.4142135623730951},"http://localhost:8080/jwt/":{"tf":1.4142135623730951},"http://localhost:8080/transaction-docs/":{"tf":1.4142135623730951}},"df":3}},"t":{"docs":{},"df":0,"a":{"docs":{},"df":0,"r":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}},"e":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":3}},"r":{"docs":{},"df":0,"i":{"docs":{},"df":0,"n":{"docs":{},"df":0,"g":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":1}}}},"u":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1,"d":{"docs":{},"df":0,"e":{"docs":{},"df":0,"n":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":1.7320508075688772},"http://localhost:8080/register-docs/":{"tf":1.7320508075688772}},"df":2,"_":{"docs":{},"df":0,"i":{"docs":{},"df":0,"d":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}}}}}}},"u":{"docs":{},"df":0,"b":{"docs":{},"df":0,"s":{"docs":{},"df":0,"e":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}}},"y":{"docs":{},"df":0,"s":{"docs":{},"df":0,"t":{"docs":{},"df":0,"e":{"docs":{},"df":0,"m":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}}}},"t":{"docs":{},"df":0,"a":{"docs":{},"df":0,"k":{"docs":{},"df":0,"i":{"docs":{},"df":0,"m":{"docs":{},"df":0,"a":{"docs":{},"df":0,"t":{"docs":{},"df":0,"a":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":3}}}}}}},"e":{"docs":{},"df":0,"m":{"docs":{},"df":0,"p":{"docs":{},"df":0,"_":{"docs":{},"df":0,"k":{"docs":{},"df":0,"e":{"docs":{},"df":0,"y":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":1}}}},"o":{"docs":{},"df":0,"r":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":3,"a":{"docs":{},"df":0,"r":{"docs":{},"df":0,"i":{"docs":{"http://localhost:8080/register-docs/":{"tf":2.0}},"df":1}}}}}}}},"h":{"docs":{},"df":0,"e":{"docs":{},"df":0,"m":{"docs":{},"df":0,"s":{"docs":{},"df":0,"e":{"docs":{},"df":0,"l":{"docs":{},"df":0,"v":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}}}}},"i":{"docs":{},"df":0,"m":{"docs":{},"df":0,"e":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}},"o":{"docs":{},"df":0,"d":{"docs":{},"df":0,"o":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":1}}},"r":{"docs":{},"df":0,"a":{"docs":{},"df":0,"n":{"docs":{},"df":0,"s":{"docs":{},"df":0,"a":{"docs":{},"df":0,"c":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":2.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":2}}}}}}}},"u":{"docs":{},"df":0,"b":{"docs":{},"df":0,"e":{"docs":{},"df":0,"r":{"docs":{},"df":0,"g":{"docs":{},"df":0,"r":{"docs":{},"df":0,"e":{"docs":{},"df":0,"n":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":3}}}}}}},"p":{"docs":{},"df":0,"o":{"docs":{},"df":0,"n":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}},"s":{"docs":{"http://localhost:8080/":{"tf":1.7320508075688772},"http://localhost:8080/register-docs/":{"tf":2.0}},"df":2,"e":{"docs":{},"df":0,"r":{"docs":{"http://localhost:8080/register-docs/":{"tf":2.23606797749979}},"df":1,"&":{"docs":{},"df":0,"g":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}}}},"t":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":3}},"v":{"docs":{},"df":0,"e":{"docs":{},"df":0,"r":{"docs":{},"df":0,"i":{"docs":{},"df":0,"f":{"docs":{},"df":0,"i":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}},"o":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":3}}},"o":{"docs":{},"df":0,"l":{"docs":{},"df":0,"u":{"docs":{},"df":0,"p":{"docs":{},"df":0,"t":{"docs":{},"df":0,"u":{"docs":{},"df":0,"a":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":3}}}}}}}},"w":{"docs":{},"df":0,"e":{"docs":{},"df":0,"b":{"docs":{},"df":0,"s":{"docs":{},"df":0,"i":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}},"l":{"docs":{},"df":0,"l":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}},"o":{"docs":{},"df":0,"r":{"docs":{},"df":0,"k":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}},"r":{"docs":{},"df":0,"a":{"docs":{},"df":0,"p":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}}}},"title":{"root":{"docs":{},"df":0,"b":{"docs":{},"df":0,"l":{"docs":{},"df":0,"o":{"docs":{},"df":0,"c":{"docs":{},"df":0,"k":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0}},"df":1}}}}},"g":{"docs":{},"df":0,"r":{"docs":{},"df":0,"a":{"docs":{},"df":0,"d":{"docs":{},"df":0,"e":{"docs":{},"df":0,"c":{"docs":{},"df":0,"o":{"docs":{},"df":0,"i":{"docs":{},"df":0,"n":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}}}}}}},"j":{"docs":{},"df":0,"w":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/jwt/":{"tf":1.0}},"df":1}}},"r":{"docs":{},"df":0,"e":{"docs":{},"df":0,"g":{"docs":{},"df":0,"i":{"docs":{},"df":0,"s":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}}}},"t":{"docs":{},"df":0,"r":{"docs":{},"df":0,"a":{"docs":{},"df":0,"n":{"docs":{},"df":0,"s":{"docs":{},"df":0,"a":{"docs":{},"df":0,"c":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":1}}}}}}}}}}},"documentStore":{"save":true,"docs":{"http://localhost:8080/":{"body":"\nDon't know where to start? Gradecoin uses RESTful API, simple curl commands or even your browser will work! This website can help as well.\nJWT Debugger and the corresponding RFC\n\nServices\n/register\n\nStudent creates their own 2048 bit RSA keypair\nDownloads Gradecoin's Public Key from Moodle\nEncrypts their JSON wrapped Public Key, Student ID and one time passwd using Gradecoin's Public Key\nTheir public key is now in our database and can be used to sign their JWT's during requests\n\n/transaction\n\nYou can offer a Transaction - POST request\n\nThe request should have Authorization\nThe request header should be signed by the Public Key of the by field in the transaction\n\n\nfetch the list of Transactions - GET request\n\n/block\n\noffer a [schema::Block] - POST request\n\nThe request should have Authorization\nThe [schema::Block::transaction_list] of the block should be a subset of [schema::Db::pending_transactions]\n\n\nfetch the last accepted [schema::Block] - GET request\n\nAuthorization: The request header should have Bearer JWT.Token signed with Student Public Key\n","id":"http://localhost:8080/","title":"Gradecoin"},"http://localhost:8080/block-docs/":{"body":"Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod\ntempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At\nvero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd\nubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.\n","id":"http://localhost:8080/block-docs/","title":"Blocks"},"http://localhost:8080/jwt/":{"body":"Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod\ntempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At\nvero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd\nubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.\n","id":"http://localhost:8080/jwt/","title":"JWT"},"http://localhost:8080/register-docs/":{"body":"POST request to /register endpoint\nLets a [User] (=student) to authenticate themselves to the system\nThis request can be rejected if the payload is malformed (=not authenticated properly) or if\nthe [AuthRequest.user_id] of the request is not in the list of users that can hold a Gradecoin account\nAuthentication Process\n\n\nGradecoin's Public Key (gradecoin_public_key) is listed on moodle.\n\n\nGradecoin's Private Key (gradecoin_private_key) is loaded here\n\n\nStudent picks a short temporary key (k_temp)\n\n\nCreates a JSON object (auth_plaintext) with their metu_id and public key in base64 (PEM) format (S_PK):\n{\nstudent_id: \"e12345\",\npasswd: \"15 char secret\"\npublic_key: \"---BEGIN PUBLIC KEY...\"\n}\n\n\nEncrypts the serialized string of auth_plaintext with 128 bit block AES in CBC mode with Pkcs7 padding using the temporary key (k_temp), the result is auth_ciphertext TODO should this be base64'd?\n\n\nThe temporary key student has picked k_temp is encrypted using RSA with OAEP padding scheme\nusing sha256 with gradecoin_public_key (TODO base64? same as above), giving us key_ciphertext\n\n\nThe payload JSON object (auth_request) can be JSON serialized now:\n{\nc: \"auth_ciphertext\"\nkey: \"key_ciphertext\"\n}\n\n\nGradecoin Side\n\nUpon receiving, we first RSA decrypt with OAEP padding scheme using SHA256 with gradecoin_private_key as the key and auth_request.key key as the ciphertext, receiving temp_key (this is the temporary key chosen by stu\nWith temp_key, we can AES 128 Cbc Pkcs7 decrypt the auth_request.c, giving us\nauth_plaintext\nThe auth_plaintext String can be deserialized to [AuthRequest]\nWe then verify the payload and calculate the User fingerprint\nFinally, create the new [User] object, insert to users HashMap <fingerprint, User>\n\n","id":"http://localhost:8080/register-docs/","title":"Register"},"http://localhost:8080/transaction-docs/":{"body":"Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod\ntempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At\nvero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd\nubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.\n","id":"http://localhost:8080/transaction-docs/","title":"Transactions"}},"docInfo":{"http://localhost:8080/":{"body":99,"title":1},"http://localhost:8080/block-docs/":{"body":48,"title":1},"http://localhost:8080/jwt/":{"body":48,"title":1},"http://localhost:8080/register-docs/":{"body":166,"title":1},"http://localhost:8080/transaction-docs/":{"body":48,"title":1}},"length":5},"lang":"English"}; \ No newline at end of file diff --git a/public/sitemap.xml b/public/sitemap.xml new file mode 100644 index 0000000..db9224f --- /dev/null +++ b/public/sitemap.xml @@ -0,0 +1,18 @@ + + + + http://localhost:8080/ + + + http://localhost:8080/block-docs/ + + + http://localhost:8080/jwt/ + + + http://localhost:8080/register-docs/ + + + http://localhost:8080/transaction-docs/ + + diff --git a/public/transaction-docs/index.html b/public/transaction-docs/index.html new file mode 100644 index 0000000..8c35895 --- /dev/null +++ b/public/transaction-docs/index.html @@ -0,0 +1,126 @@ + + + + + + Transactions | + + + + + + + + + + + + + +
+ + + + + + + + +
+ + +
+ + + + + +
+ +
Transaction documentation
+

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod +tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At +vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd +ubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.

+ + +
+ + + +
+ + +
+ ⁂ +
+ + + + + diff --git a/site/config.toml b/site/config.toml index 93e9468..8754d85 100644 --- a/site/config.toml +++ b/site/config.toml @@ -13,6 +13,7 @@ build_search_index = true # Whether to do syntax highlighting # Theme can be customised by setting the `highlight_theme` variable to a theme supported by Zola highlight_code = true +highlight_theme = "subway-moscow" [extra] # Put all your custom variables here diff --git a/site/content/JWT.md b/site/content/JWT.md index 91a7a73..f55ab17 100644 --- a/site/content/JWT.md +++ b/site/content/JWT.md @@ -4,8 +4,38 @@ description = "JSON Web Token Documentation" weight = 5 +++ -Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod -tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At -vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd -ubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. +> JSON Web Tokens are representations of claims, or authorization proofs that fit into the `Header` of HTTP requests. + +# How? + +JWTs are used as the [MAC](https://en.wikipedia.org/wiki/Message_authentication_code) of operations that require authorization: +- block proposal +- transaction proposal. + +They are send alongside the JSON request body in the `Header`; + +```html +Authorization: Bearer aaaaaa.bbbbbb.ccccc +``` + +Gradecoin uses 3 fields for the JWTs; + +```json +{ +"tha": "Hash of the payload, check invididual references", +"iat": "Issued At, Unix Time", +"exp": "Expiration Time, epoch" +} +``` + +- `tha` is explained in [blocks](@/block_docs.md) and [transactions](@/transaction_docs.md) documentations. +- `iat` when the JWT was created in [Unix Time](https://en.wikipedia.org/wiki/Unix_time) format +- `exp` when the JWT will expire & be rejected in [Unix Time](https://en.wikipedia.org/wiki/Unix_time) + +# Algorithm +We are using [RS256](https://www.rfc-editor.org/rfc/rfc7518.html#section-3.1), `RSASSA-PKCS1-v1_5 using SHA-256`. The JWTs you encode with your private RSA key will be decoded using the public key you have authenticated with. You can see how the process works [here](https://jwt.io/). + +# References +- [RFC, the ultimate reference](https://tools.ietf.org/html/rfc7519) +- [JWT Debugger](https://jwt.io/) diff --git a/site/content/_index.md b/site/content/_index.md index 7dd7a7c..bf33eef 100644 --- a/site/content/_index.md +++ b/site/content/_index.md @@ -3,8 +3,35 @@ title = "Gradecoin" sort_by = "weight" +++ -- Don't know where to start? Gradecoin uses RESTful API, simple `curl` commands or even your browser will work! [This website can help as well](https://curl.trillworks.com/). -- [JWT Debugger](https://jwt.io) and the corresponding [RFC](https://tools.ietf.org/html/rfc7519) +# Welcome to Gradecoin! + +Blockchains are incredibly simple yet can appear very complicated, we will see how they work and practice programming _production_ cryptography code. + +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. + +**A quick summary**: authenticate yourself to the system using public key encryption. +Craft [Transaction](@/transaction_docs.md) proposals and tag them using [JWTs](@/JWT.md). +When there are enough transactions then you can propose [Blocks](@/block_docs.md) in the same way. +Blocks need to be _mined_ beforehand using Proof-of-work, or brute force. + +Gradecoin offers 3 endpoints at [/register](/register), [/block](/block) and [/transaction](/transaction). You can only send GET requests to /block and /transaction without authorization. +The server is programmed in [RESTful](https://www.service-architecture.com/articles/web-services/representational_state_transfer_rest.html) architecture, there are no `DELETE`, `PUT` or `UPDATE` operations, though. + +Gradecoin uses a Proof-of-work block accepting mechanism. It uses single round [Blake2s](https://www.blake2.net/) hashing which produces 256-bit (64 hexadecimal characters) output. The [target](https://wiki.bitcoinsv.io/index.php/Target) hash is _24 bits_ or _6 hexadecimal characters_ of 0. During testing, I could mine a block on average around 2-7 minutes. + +> We're expecting you to use existing tools and implementations. Standards are hard. [Don't roll your own crypto](https://www.reddit.com/r/crypto/comments/2coqsy/dont_roll_your_own/). Feel free to ask questions. Collaborate. + +You might ask, + +> But if nobody has any Gradecoin then how do we have transactions? + +There is a bank! Their public key is `31415926535897932384626433832795028841971693993751058209749445923` and they have some amount of Gradecoin preloaded. It's also the only account that you can send transactions requests _to_ yourself. + +# Coinbase +The first transactions of a block is called the `coinbase`. They are the **author** of the block proposal and if the block is accepted then they get compensated for their efforts with some Gradecoin. + +# Public Key Signatures +Gradecoin uses 2048 bit RSA keyspairs. # Services ## /register @@ -26,3 +53,33 @@ sort_by = "weight" - fetch the last accepted [`schema::Block`] - GET request `Authorization`: The request header should have Bearer JWT.Token signed with Student Public Key + +# Questions +## This all sound complicated! +- I've drawn inspiration from [actual Bitcoin transactions](https://explorer.bitcoin.com/btc) and [warp](https://github.com/seanmonstar/warp/blob/master/examples/todos.rs). The simplicity of the system is how little interfaces it has. +- Don't know where to start? Gradecoin uses RESTful API; simple `curl` commands or even your browser will work! [This website can help as well](https://curl.trillworks.com/). +- [JWT Debugger](https://jwt.io) and the corresponding [RFC](https://tools.ietf.org/html/rfc7519) +- 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? + +## I found a bug! +Thank you! Please [let me know](mailto:yigit@ceng.metu.edu.tr) so we can solve it. + +## I hacked the server! +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. + +## Submission? +At the end of the _simulation_, your Gradecoin balance will be your grade. I will also expect a unique client programmed in either; +- c +- c++ +- perl +- rust +- python +- random assortment of bash scripts + +If your favourite programming language is missing please let me know 🤷? + +## Can my friends play? +Sadly, no. Student's who are enrolled to the class will receive one-time-passwords for authentication. + +## How and or Why? +- [Built](https://xkcd.com/2314/), with [Rust](https://xkcd.com/2418/) diff --git a/site/public/block-docs/index.html b/site/public/block-docs/index.html index 8331952..3da4e8b 100644 --- a/site/public/block-docs/index.html +++ b/site/public/block-docs/index.html @@ -84,7 +84,7 @@ ubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.

- ⁂ +Built For ⁂ CENG489 ⁂ Introduction to Computer Security
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 @@ Gradecoin is the latest cutting edge blockchain technology agile grading framework that drives organic engagement and other buzzwords, with big data mining search engine optimization
- - - -
- +
⇩ Learn How ⇩
@@ -111,6 +114,21 @@
+ + + +
+ Coinbase +
+ + + + + @@ -130,6 +148,37 @@ +
+ Questions +
+ + + + + + + + + + + + + + + +
@@ -138,10 +187,28 @@
Overview
- +

Welcome to Gradecoin!

+

Blockchains are incredibly simple yet can appear very complicated, we will see how they work and practice programming production cryptography code.

+

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.

+

A quick summary: authenticate yourself to the system using public key encryption. +Craft Transaction proposals and tag them using JWTs. +When there are enough transactions then you can propose Blocks in the same way. +Blocks need to be mined beforehand using Proof-of-work, or brute force.

+

Gradecoin offers 3 endpoints at /register, /block and /transaction. You can only send GET requests to /block and /transaction without authorization. +The server is programmed in RESTful architecture, there are no DELETE, PUT or UPDATE operations, though.

+

Gradecoin uses a Proof-of-work block accepting mechanism. It uses single round Blake2s hashing which produces 256-bit (64 hexadecimal characters) output. The target hash is 24 bits or 6 hexadecimal characters of 0. During testing, I could mine a block on average around 2-7 minutes.

+
+

We're expecting you to use existing tools and implementations. Standards are hard. Don't roll your own crypto. Feel free to ask questions. Collaborate.

+
+

You might ask,

+
+

But if nobody has any Gradecoin then how do we have transactions?

+
+

There is a bank! Their public key is 31415926535897932384626433832795028841971693993751058209749445923 and they have some amount of Gradecoin preloaded. It's also the only account that you can send transactions requests to yourself.

+

Coinbase

+

The first transactions of a block is called the coinbase. They are the author of the block proposal and if the block is accepted then they get compensated for their efforts with some Gradecoin.

+

Public Key Signatures

+

Gradecoin uses 2048 bit RSA keyspairs.

Services

/register

    @@ -171,6 +238,35 @@
  • fetch the last accepted [schema::Block] - GET request

Authorization: The request header should have Bearer JWT.Token signed with Student Public Key

+

Questions

+

This all sound complicated!

+
    +
  • I've drawn inspiration from actual Bitcoin transactions and warp. The simplicity of the system is how little interfaces it has.
  • +
  • Don't know where to start? Gradecoin uses RESTful API; simple curl commands or even your browser will work! This website can help as well.
  • +
  • JWT Debugger and the corresponding RFC
  • +
  • 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?
  • +
+

I found a bug!

+

Thank you! Please let me know so we can solve it.

+

I hacked the server!

+

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.

+

Submission?

+

At the end of the simulation, your Gradecoin balance will be your grade. I will also expect a unique client programmed in either;

+
    +
  • c
  • +
  • c++
  • +
  • perl
  • +
  • rust
  • +
  • python
  • +
  • random assortment of bash scripts
  • +
+

If your favourite programming language is missing please let me know 🤷?

+

Can my friends play?

+

Sadly, no. Student's who are enrolled to the class will receive one-time-passwords for authentication.

+

How and or Why?

+
@@ -181,7 +277,7 @@
- ⁂ +Built For ⁂ CENG489 ⁂ Introduction to Computer Security
diff --git a/site/public/jwt/index.html b/site/public/jwt/index.html index 899aada..c32fb31 100644 --- a/site/public/jwt/index.html +++ b/site/public/jwt/index.html @@ -66,14 +66,66 @@ + +
+
+ +
+ How? +
+ + +
+ Algorithm +
+ + + + + +
+
+ +
JSON Web Token Documentation
-

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod -tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At -vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd -ubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.

+
+

JSON Web Tokens are representations of claims, or authorization proofs that fit into the Header of HTTP requests.

+
+

How?

+

JWTs are used as the MAC of operations that require authorization:

+
    +
  • block proposal
  • +
  • transaction proposal.
  • +
+

They are send alongside the JSON request body in the Header;

+
+Authorization: Bearer aaaaaa.bbbbbb.ccccc
+
+

Gradecoin uses 3 fields for the JWTs;

+
+{
+"tha": "Hash of the payload, check invididual references",
+"iat": "Issued At, Unix Time",
+"exp": "Expiration Time, epoch"
+}
+
+ +

Algorithm

+

We are using RS256, RSASSA-PKCS1-v1_5 using SHA-256. The JWTs you encode with your private RSA key will be decoded using the public key you have authenticated with. You can see how the process works here.

+

References

+
@@ -84,7 +136,7 @@ ubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.

- ⁂ +Built For ⁂ CENG489 ⁂ Introduction to Computer Security
diff --git a/site/public/register-docs/index.html b/site/public/register-docs/index.html index 10a4d56..abf30c1 100644 --- a/site/public/register-docs/index.html +++ b/site/public/register-docs/index.html @@ -146,7 +146,7 @@ auth_plaintext
- ⁂ +Built For ⁂ CENG489 ⁂ Introduction to Computer Security
diff --git a/site/public/search_index.en.js b/site/public/search_index.en.js index 03cbfea..7de6e5c 100644 --- a/site/public/search_index.en.js +++ b/site/public/search_index.en.js @@ -1 +1 @@ -window.searchIndex = {"fields":["title","body"],"pipeline":["trimmer","stopWordFilter","stemmer"],"ref":"id","version":"0.9.5","index":{"body":{"root":{"docs":{},"df":0,"1":{"docs":{},"df":0,"2":{"docs":{},"df":0,"8":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":1}},"5":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}},"2":{"docs":{},"df":0,"0":{"docs":{},"df":0,"4":{"docs":{},"df":0,"8":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}},"a":{"docs":{},"df":0,"b":{"docs":{},"df":0,"o":{"docs":{},"df":0,"v":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}},"c":{"docs":{},"df":0,"c":{"docs":{},"df":0,"e":{"docs":{},"df":0,"p":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}},"o":{"docs":{},"df":0,"u":{"docs":{},"df":0,"n":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}},"u":{"docs":{},"df":0,"s":{"docs":{},"df":0,"a":{"docs":{},"df":0,"m":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":3}}}}}},"e":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":1},"l":{"docs":{},"df":0,"i":{"docs":{},"df":0,"q":{"docs":{},"df":0,"u":{"docs":{},"df":0,"y":{"docs":{},"df":0,"a":{"docs":{},"df":0,"m":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":3}}}}}}},"m":{"docs":{},"df":0,"e":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.4142135623730951},"http://localhost:8080/jwt/":{"tf":1.4142135623730951},"http://localhost:8080/transaction-docs/":{"tf":1.4142135623730951}},"df":3}}},"p":{"docs":{},"df":0,"i":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}},"u":{"docs":{},"df":0,"t":{"docs":{},"df":0,"h":{"docs":{},"df":0,"_":{"docs":{},"df":0,"c":{"docs":{},"df":0,"i":{"docs":{},"df":0,"p":{"docs":{},"df":0,"h":{"docs":{},"df":0,"e":{"docs":{},"df":0,"r":{"docs":{},"df":0,"t":{"docs":{},"df":0,"e":{"docs":{},"df":0,"x":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":1}}}}}}}}}},"p":{"docs":{},"df":0,"l":{"docs":{},"df":0,"a":{"docs":{},"df":0,"i":{"docs":{},"df":0,"n":{"docs":{},"df":0,"t":{"docs":{},"df":0,"e":{"docs":{},"df":0,"x":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/register-docs/":{"tf":2.0}},"df":1}}}}}}}}},"r":{"docs":{},"df":0,"e":{"docs":{},"df":0,"q":{"docs":{},"df":0,"u":{"docs":{},"df":0,"e":{"docs":{},"df":0,"s":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1,".":{"docs":{},"df":0,"c":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1},"k":{"docs":{},"df":0,"e":{"docs":{},"df":0,"y":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}}}}}}}}}},"e":{"docs":{},"df":0,"n":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.7320508075688772}},"df":1}}},"o":{"docs":{},"df":0,"r":{"docs":{"http://localhost:8080/":{"tf":1.7320508075688772}},"df":1}},"r":{"docs":{},"df":0,"e":{"docs":{},"df":0,"q":{"docs":{},"df":0,"u":{"docs":{},"df":0,"e":{"docs":{},"df":0,"s":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1,".":{"docs":{},"df":0,"u":{"docs":{},"df":0,"s":{"docs":{},"df":0,"e":{"docs":{},"df":0,"r":{"docs":{},"df":0,"_":{"docs":{},"df":0,"i":{"docs":{},"df":0,"d":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}}}}}}}}}}}}}}}}},"b":{"docs":{},"df":0,"a":{"docs":{},"df":0,"s":{"docs":{},"df":0,"e":{"docs":{},"df":0,"6":{"docs":{},"df":0,"4":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":1,"'":{"docs":{},"df":0,"d":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}}}}},"e":{"docs":{},"df":0,"a":{"docs":{},"df":0,"r":{"docs":{},"df":0,"e":{"docs":{},"df":0,"r":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}},"g":{"docs":{},"df":0,"i":{"docs":{},"df":0,"n":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}},"i":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":1.0},"http://localhost:8080/register-docs/":{"tf":1.0}},"df":2}},"l":{"docs":{},"df":0,"o":{"docs":{},"df":0,"c":{"docs":{},"df":0,"k":{"docs":{"http://localhost:8080/":{"tf":1.4142135623730951},"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/register-docs/":{"tf":1.0}},"df":3}}}},"r":{"docs":{},"df":0,"o":{"docs":{},"df":0,"w":{"docs":{},"df":0,"s":{"docs":{},"df":0,"e":{"docs":{},"df":0,"r":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}}}}},"c":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1,"a":{"docs":{},"df":0,"l":{"docs":{},"df":0,"c":{"docs":{},"df":0,"u":{"docs":{},"df":0,"l":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}}},"b":{"docs":{},"df":0,"c":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":1}},"h":{"docs":{},"df":0,"a":{"docs":{},"df":0,"r":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}},"o":{"docs":{},"df":0,"s":{"docs":{},"df":0,"e":{"docs":{},"df":0,"n":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}}},"i":{"docs":{},"df":0,"p":{"docs":{},"df":0,"h":{"docs":{},"df":0,"e":{"docs":{},"df":0,"r":{"docs":{},"df":0,"t":{"docs":{},"df":0,"e":{"docs":{},"df":0,"x":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}}}}}}},"l":{"docs":{},"df":0,"i":{"docs":{},"df":0,"t":{"docs":{},"df":0,"a":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":3}}}},"o":{"docs":{},"df":0,"m":{"docs":{},"df":0,"m":{"docs":{},"df":0,"a":{"docs":{},"df":0,"n":{"docs":{},"df":0,"d":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}}},"n":{"docs":{},"df":0,"s":{"docs":{},"df":0,"e":{"docs":{},"df":0,"t":{"docs":{},"df":0,"e":{"docs":{},"df":0,"t":{"docs":{},"df":0,"u":{"docs":{},"df":0,"r":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":3}}}}}}}},"r":{"docs":{},"df":0,"r":{"docs":{},"df":0,"e":{"docs":{},"df":0,"s":{"docs":{},"df":0,"p":{"docs":{},"df":0,"o":{"docs":{},"df":0,"n":{"docs":{},"df":0,"d":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}}}}}}},"r":{"docs":{},"df":0,"e":{"docs":{},"df":0,"a":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":1.0},"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":2}}}},"u":{"docs":{},"df":0,"r":{"docs":{},"df":0,"l":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}},"d":{"docs":{},"df":0,"a":{"docs":{},"df":0,"t":{"docs":{},"df":0,"a":{"docs":{},"df":0,"b":{"docs":{},"df":0,"a":{"docs":{},"df":0,"s":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}}}},"e":{"docs":{},"df":0,"b":{"docs":{},"df":0,"u":{"docs":{},"df":0,"g":{"docs":{},"df":0,"g":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}},"c":{"docs":{},"df":0,"r":{"docs":{},"df":0,"y":{"docs":{},"df":0,"p":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":1}}}}},"s":{"docs":{},"df":0,"e":{"docs":{},"df":0,"r":{"docs":{},"df":0,"i":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}}},"i":{"docs":{},"df":0,"a":{"docs":{},"df":0,"m":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.4142135623730951},"http://localhost:8080/jwt/":{"tf":1.4142135623730951},"http://localhost:8080/transaction-docs/":{"tf":1.4142135623730951}},"df":3}}},"o":{"docs":{},"df":0,"l":{"docs":{},"df":0,"o":{"docs":{},"df":0,"r":{"docs":{"http://localhost:8080/block-docs/":{"tf":2.0},"http://localhost:8080/jwt/":{"tf":2.0},"http://localhost:8080/transaction-docs/":{"tf":2.0}},"df":3}}},"n":{"docs":{},"df":0,"'":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}},"w":{"docs":{},"df":0,"n":{"docs":{},"df":0,"l":{"docs":{},"df":0,"o":{"docs":{},"df":0,"a":{"docs":{},"df":0,"d":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}}}}},"u":{"docs":{},"df":0,"o":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":3},"r":{"docs":{},"df":0,"e":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}},"e":{"docs":{},"df":0,"1":{"docs":{},"df":0,"2":{"docs":{},"df":0,"3":{"docs":{},"df":0,"4":{"docs":{},"df":0,"5":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}}},"a":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":3},"i":{"docs":{},"df":0,"r":{"docs":{},"df":0,"m":{"docs":{},"df":0,"o":{"docs":{},"df":0,"d":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":3}}}}},"l":{"docs":{},"df":0,"i":{"docs":{},"df":0,"t":{"docs":{},"df":0,"r":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":3}}}},"n":{"docs":{},"df":0,"c":{"docs":{},"df":0,"r":{"docs":{},"df":0,"y":{"docs":{},"df":0,"p":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":1.0},"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":2}}}}},"d":{"docs":{},"df":0,"p":{"docs":{},"df":0,"o":{"docs":{},"df":0,"i":{"docs":{},"df":0,"n":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}}}}},"o":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":3},"r":{"docs":{},"df":0,"a":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":3}}},"s":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":3}},"t":{"docs":{"http://localhost:8080/block-docs/":{"tf":2.0},"http://localhost:8080/jwt/":{"tf":2.0},"http://localhost:8080/transaction-docs/":{"tf":2.0}},"df":3},"v":{"docs":{},"df":0,"e":{"docs":{},"df":0,"n":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}},"f":{"docs":{},"df":0,"e":{"docs":{},"df":0,"t":{"docs":{},"df":0,"c":{"docs":{},"df":0,"h":{"docs":{"http://localhost:8080/":{"tf":1.4142135623730951}},"df":1}}}},"i":{"docs":{},"df":0,"e":{"docs":{},"df":0,"l":{"docs":{},"df":0,"d":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}},"n":{"docs":{},"df":0,"a":{"docs":{},"df":0,"l":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}},"g":{"docs":{},"df":0,"e":{"docs":{},"df":0,"r":{"docs":{},"df":0,"p":{"docs":{},"df":0,"r":{"docs":{},"df":0,"i":{"docs":{},"df":0,"n":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}}}}}}},"r":{"docs":{},"df":0,"s":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}},"o":{"docs":{},"df":0,"r":{"docs":{},"df":0,"m":{"docs":{},"df":0,"a":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}}}},"g":{"docs":{},"df":0,"i":{"docs":{},"df":0,"v":{"docs":{},"df":0,"e":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":1}}},"r":{"docs":{},"df":0,"a":{"docs":{},"df":0,"d":{"docs":{},"df":0,"e":{"docs":{},"df":0,"c":{"docs":{},"df":0,"o":{"docs":{},"df":0,"i":{"docs":{},"df":0,"n":{"docs":{"http://localhost:8080/":{"tf":1.4142135623730951},"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":2,"'":{"docs":{"http://localhost:8080/":{"tf":1.4142135623730951},"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":2},"_":{"docs":{},"df":0,"p":{"docs":{},"df":0,"r":{"docs":{},"df":0,"i":{"docs":{},"df":0,"v":{"docs":{},"df":0,"a":{"docs":{},"df":0,"t":{"docs":{},"df":0,"e":{"docs":{},"df":0,"_":{"docs":{},"df":0,"k":{"docs":{},"df":0,"e":{"docs":{},"df":0,"y":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":1}}}}}}}}}},"u":{"docs":{},"df":0,"b":{"docs":{},"df":0,"l":{"docs":{},"df":0,"i":{"docs":{},"df":0,"c":{"docs":{},"df":0,"_":{"docs":{},"df":0,"k":{"docs":{},"df":0,"e":{"docs":{},"df":0,"y":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":1}}}}}}}}}}}}}}}}}}}},"h":{"docs":{},"df":0,"a":{"docs":{},"df":0,"s":{"docs":{},"df":0,"h":{"docs":{},"df":0,"m":{"docs":{},"df":0,"a":{"docs":{},"df":0,"p":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}}}},"e":{"docs":{},"df":0,"a":{"docs":{},"df":0,"d":{"docs":{},"df":0,"e":{"docs":{},"df":0,"r":{"docs":{"http://localhost:8080/":{"tf":1.4142135623730951}},"df":1}}}},"l":{"docs":{},"df":0,"p":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}},"r":{"docs":{},"df":0,"e":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}},"o":{"docs":{},"df":0,"l":{"docs":{},"df":0,"d":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}},"i":{"docs":{},"df":0,"d":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1},"n":{"docs":{},"df":0,"s":{"docs":{},"df":0,"e":{"docs":{},"df":0,"r":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}},"v":{"docs":{},"df":0,"i":{"docs":{},"df":0,"d":{"docs":{},"df":0,"u":{"docs":{},"df":0,"n":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":3}}}}}}},"p":{"docs":{},"df":0,"s":{"docs":{},"df":0,"u":{"docs":{},"df":0,"m":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.4142135623730951},"http://localhost:8080/jwt/":{"tf":1.4142135623730951},"http://localhost:8080/transaction-docs/":{"tf":1.4142135623730951}},"df":3}}}}},"j":{"docs":{},"df":0,"s":{"docs":{},"df":0,"o":{"docs":{},"df":0,"n":{"docs":{"http://localhost:8080/":{"tf":1.0},"http://localhost:8080/register-docs/":{"tf":1.7320508075688772}},"df":2}}},"u":{"docs":{},"df":0,"s":{"docs":{},"df":0,"t":{"docs":{},"df":0,"o":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":3}}}},"w":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.0}},"df":2,"'":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1},".":{"docs":{},"df":0,"t":{"docs":{},"df":0,"o":{"docs":{},"df":0,"k":{"docs":{},"df":0,"e":{"docs":{},"df":0,"n":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}}}}}}},"k":{"docs":{},"df":0,"_":{"docs":{},"df":0,"t":{"docs":{},"df":0,"e":{"docs":{},"df":0,"m":{"docs":{},"df":0,"p":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.7320508075688772}},"df":1}}}}},"a":{"docs":{},"df":0,"s":{"docs":{},"df":0,"d":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":3}}},"e":{"docs":{},"df":0,"y":{"docs":{"http://localhost:8080/":{"tf":2.449489742783178},"http://localhost:8080/register-docs/":{"tf":3.3166247903554}},"df":2,"_":{"docs":{},"df":0,"c":{"docs":{},"df":0,"i":{"docs":{},"df":0,"p":{"docs":{},"df":0,"h":{"docs":{},"df":0,"e":{"docs":{},"df":0,"r":{"docs":{},"df":0,"t":{"docs":{},"df":0,"e":{"docs":{},"df":0,"x":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":1}}}}}}}}}}},"p":{"docs":{},"df":0,"a":{"docs":{},"df":0,"i":{"docs":{},"df":0,"r":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}}}},"n":{"docs":{},"df":0,"o":{"docs":{},"df":0,"w":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}},"l":{"docs":{},"df":0,"a":{"docs":{},"df":0,"b":{"docs":{},"df":0,"o":{"docs":{},"df":0,"r":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":3}}},"s":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}},"e":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}},"i":{"docs":{},"df":0,"s":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":1.0},"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":2}}},"o":{"docs":{},"df":0,"a":{"docs":{},"df":0,"d":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}},"r":{"docs":{},"df":0,"e":{"docs":{},"df":0,"m":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.4142135623730951},"http://localhost:8080/jwt/":{"tf":1.4142135623730951},"http://localhost:8080/transaction-docs/":{"tf":1.4142135623730951}},"df":3}}}},"t":{"docs":{},"df":0,";":{"docs":{},"df":0,"f":{"docs":{},"df":0,"i":{"docs":{},"df":0,"n":{"docs":{},"df":0,"g":{"docs":{},"df":0,"e":{"docs":{},"df":0,"r":{"docs":{},"df":0,"p":{"docs":{},"df":0,"r":{"docs":{},"df":0,"i":{"docs":{},"df":0,"n":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}}}}}}}}}}}},"m":{"docs":{},"df":0,"a":{"docs":{},"df":0,"g":{"docs":{},"df":0,"n":{"docs":{},"df":0,"a":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":3}}},"l":{"docs":{},"df":0,"f":{"docs":{},"df":0,"o":{"docs":{},"df":0,"r":{"docs":{},"df":0,"m":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}}}},"e":{"docs":{},"df":0,"t":{"docs":{},"df":0,"u":{"docs":{},"df":0,"_":{"docs":{},"df":0,"i":{"docs":{},"df":0,"d":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}}}},"o":{"docs":{},"df":0,"d":{"docs":{},"df":0,"e":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}},"o":{"docs":{},"df":0,"d":{"docs":{},"df":0,"l":{"docs":{"http://localhost:8080/":{"tf":1.0},"http://localhost:8080/register-docs/":{"tf":1.0}},"df":2}}}}},"n":{"docs":{},"df":0,"e":{"docs":{},"df":0,"w":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}},"o":{"docs":{},"df":0,"n":{"docs":{},"df":0,"u":{"docs":{},"df":0,"m":{"docs":{},"df":0,"i":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":3}}}},"w":{"docs":{"http://localhost:8080/":{"tf":1.0},"http://localhost:8080/register-docs/":{"tf":1.0}},"df":2}}},"o":{"docs":{},"df":0,"a":{"docs":{},"df":0,"e":{"docs":{},"df":0,"p":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":1}}},"b":{"docs":{},"df":0,"j":{"docs":{},"df":0,"e":{"docs":{},"df":0,"c":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.7320508075688772}},"df":1}}}}},"f":{"docs":{},"df":0,"f":{"docs":{},"df":0,"e":{"docs":{},"df":0,"r":{"docs":{"http://localhost:8080/":{"tf":1.4142135623730951}},"df":1}}}},"n":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}},"p":{"docs":{},"df":0,"a":{"docs":{},"df":0,"d":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.7320508075688772}},"df":1},"s":{"docs":{},"df":0,"s":{"docs":{},"df":0,"w":{"docs":{},"df":0,"d":{"docs":{"http://localhost:8080/":{"tf":1.0},"http://localhost:8080/register-docs/":{"tf":1.0}},"df":2}}}},"y":{"docs":{},"df":0,"l":{"docs":{},"df":0,"o":{"docs":{},"df":0,"a":{"docs":{},"df":0,"d":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.7320508075688772}},"df":1}}}}}},"e":{"docs":{},"df":0,"m":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}},"i":{"docs":{},"df":0,"c":{"docs":{},"df":0,"k":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":1}}},"k":{"docs":{},"df":0,"c":{"docs":{},"df":0,"s":{"docs":{},"df":0,"7":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":1}}}},"o":{"docs":{},"df":0,"s":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":1.4142135623730951},"http://localhost:8080/register-docs/":{"tf":1.0}},"df":2}}},"r":{"docs":{},"df":0,"i":{"docs":{},"df":0,"v":{"docs":{},"df":0,"a":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}},"o":{"docs":{},"df":0,"c":{"docs":{},"df":0,"e":{"docs":{},"df":0,"s":{"docs":{},"df":0,"s":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}},"p":{"docs":{},"df":0,"e":{"docs":{},"df":0,"r":{"docs":{},"df":0,"l":{"docs":{},"df":0,"i":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}}}}},"u":{"docs":{},"df":0,"b":{"docs":{},"df":0,"l":{"docs":{},"df":0,"i":{"docs":{},"df":0,"c":{"docs":{"http://localhost:8080/":{"tf":2.449489742783178},"http://localhost:8080/register-docs/":{"tf":1.7320508075688772}},"df":2,"_":{"docs":{},"df":0,"k":{"docs":{},"df":0,"e":{"docs":{},"df":0,"y":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}}}}}}}},"r":{"docs":{},"df":0,"e":{"docs":{},"df":0,"b":{"docs":{},"df":0,"u":{"docs":{},"df":0,"m":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":3}}},"c":{"docs":{},"df":0,"e":{"docs":{},"df":0,"i":{"docs":{},"df":0,"v":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":1}}}},"g":{"docs":{},"df":0,"i":{"docs":{},"df":0,"s":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":1.0},"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":2}}}},"j":{"docs":{},"df":0,"e":{"docs":{},"df":0,"c":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}},"q":{"docs":{},"df":0,"u":{"docs":{},"df":0,"e":{"docs":{},"df":0,"s":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":3.0},"http://localhost:8080/register-docs/":{"tf":1.7320508075688772}},"df":2}}}}},"s":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1},"u":{"docs":{},"df":0,"l":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}}},"f":{"docs":{},"df":0,"c":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}},"s":{"docs":{},"df":0,"a":{"docs":{"http://localhost:8080/":{"tf":1.0},"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":2}}},"s":{"docs":{},"df":0,"_":{"docs":{},"df":0,"p":{"docs":{},"df":0,"k":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}},"a":{"docs":{},"df":0,"d":{"docs":{},"df":0,"i":{"docs":{},"df":0,"p":{"docs":{},"df":0,"s":{"docs":{},"df":0,"c":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":3}}}}},"m":{"docs":{},"df":0,"e":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}},"n":{"docs":{},"df":0,"c":{"docs":{},"df":0,"t":{"docs":{},"df":0,"u":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":3}}}}},"c":{"docs":{},"df":0,"h":{"docs":{},"df":0,"e":{"docs":{},"df":0,"m":{"docs":{},"df":0,"a":{"docs":{},"df":0,":":{"docs":{},"df":0,":":{"docs":{},"df":0,"b":{"docs":{},"df":0,"l":{"docs":{},"df":0,"o":{"docs":{},"df":0,"c":{"docs":{},"df":0,"k":{"docs":{"http://localhost:8080/":{"tf":1.4142135623730951}},"df":1,":":{"docs":{},"df":0,":":{"docs":{},"df":0,"t":{"docs":{},"df":0,"r":{"docs":{},"df":0,"a":{"docs":{},"df":0,"n":{"docs":{},"df":0,"s":{"docs":{},"df":0,"a":{"docs":{},"df":0,"c":{"docs":{},"df":0,"t":{"docs":{},"df":0,"i":{"docs":{},"df":0,"o":{"docs":{},"df":0,"n":{"docs":{},"df":0,"_":{"docs":{},"df":0,"l":{"docs":{},"df":0,"i":{"docs":{},"df":0,"s":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}}}}}}}}}}}}}}}}}}}}},"d":{"docs":{},"df":0,"b":{"docs":{},"df":0,":":{"docs":{},"df":0,":":{"docs":{},"df":0,"p":{"docs":{},"df":0,"e":{"docs":{},"df":0,"n":{"docs":{},"df":0,"d":{"docs":{},"df":0,"i":{"docs":{},"df":0,"n":{"docs":{},"df":0,"g":{"docs":{},"df":0,"_":{"docs":{},"df":0,"t":{"docs":{},"df":0,"r":{"docs":{},"df":0,"a":{"docs":{},"df":0,"n":{"docs":{},"df":0,"s":{"docs":{},"df":0,"a":{"docs":{},"df":0,"c":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}}}}}}}}}}}}}}}}}}}}},"e":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":1}}}}},"e":{"docs":{},"df":0,"a":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":3},"c":{"docs":{},"df":0,"r":{"docs":{},"df":0,"e":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}},"d":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.4142135623730951},"http://localhost:8080/jwt/":{"tf":1.4142135623730951},"http://localhost:8080/transaction-docs/":{"tf":1.4142135623730951}},"df":3},"r":{"docs":{},"df":0,"i":{"docs":{},"df":0,"a":{"docs":{},"df":0,"l":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":1}}},"v":{"docs":{},"df":0,"i":{"docs":{},"df":0,"c":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}}},"h":{"docs":{},"df":0,"a":{"docs":{},"df":0,"2":{"docs":{},"df":0,"5":{"docs":{},"df":0,"6":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":1}}}},"o":{"docs":{},"df":0,"r":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}},"i":{"docs":{},"df":0,"d":{"docs":{},"df":0,"e":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}},"g":{"docs":{},"df":0,"n":{"docs":{"http://localhost:8080/":{"tf":1.7320508075688772}},"df":1}},"m":{"docs":{},"df":0,"p":{"docs":{},"df":0,"l":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}},"t":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.4142135623730951},"http://localhost:8080/jwt/":{"tf":1.4142135623730951},"http://localhost:8080/transaction-docs/":{"tf":1.4142135623730951}},"df":3}},"t":{"docs":{},"df":0,"a":{"docs":{},"df":0,"r":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}},"e":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":3}},"r":{"docs":{},"df":0,"i":{"docs":{},"df":0,"n":{"docs":{},"df":0,"g":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":1}}}},"u":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1,"d":{"docs":{},"df":0,"e":{"docs":{},"df":0,"n":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":1.7320508075688772},"http://localhost:8080/register-docs/":{"tf":1.7320508075688772}},"df":2,"_":{"docs":{},"df":0,"i":{"docs":{},"df":0,"d":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}}}}}}},"u":{"docs":{},"df":0,"b":{"docs":{},"df":0,"s":{"docs":{},"df":0,"e":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}}},"y":{"docs":{},"df":0,"s":{"docs":{},"df":0,"t":{"docs":{},"df":0,"e":{"docs":{},"df":0,"m":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}}}},"t":{"docs":{},"df":0,"a":{"docs":{},"df":0,"k":{"docs":{},"df":0,"i":{"docs":{},"df":0,"m":{"docs":{},"df":0,"a":{"docs":{},"df":0,"t":{"docs":{},"df":0,"a":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":3}}}}}}},"e":{"docs":{},"df":0,"m":{"docs":{},"df":0,"p":{"docs":{},"df":0,"_":{"docs":{},"df":0,"k":{"docs":{},"df":0,"e":{"docs":{},"df":0,"y":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":1}}}},"o":{"docs":{},"df":0,"r":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":3,"a":{"docs":{},"df":0,"r":{"docs":{},"df":0,"i":{"docs":{"http://localhost:8080/register-docs/":{"tf":2.0}},"df":1}}}}}}}},"h":{"docs":{},"df":0,"e":{"docs":{},"df":0,"m":{"docs":{},"df":0,"s":{"docs":{},"df":0,"e":{"docs":{},"df":0,"l":{"docs":{},"df":0,"v":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}}}}},"i":{"docs":{},"df":0,"m":{"docs":{},"df":0,"e":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}},"o":{"docs":{},"df":0,"d":{"docs":{},"df":0,"o":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":1}}},"r":{"docs":{},"df":0,"a":{"docs":{},"df":0,"n":{"docs":{},"df":0,"s":{"docs":{},"df":0,"a":{"docs":{},"df":0,"c":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":2.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":2}}}}}}}},"u":{"docs":{},"df":0,"b":{"docs":{},"df":0,"e":{"docs":{},"df":0,"r":{"docs":{},"df":0,"g":{"docs":{},"df":0,"r":{"docs":{},"df":0,"e":{"docs":{},"df":0,"n":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":3}}}}}}},"p":{"docs":{},"df":0,"o":{"docs":{},"df":0,"n":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}},"s":{"docs":{"http://localhost:8080/":{"tf":1.7320508075688772},"http://localhost:8080/register-docs/":{"tf":2.0}},"df":2,"e":{"docs":{},"df":0,"r":{"docs":{"http://localhost:8080/register-docs/":{"tf":2.23606797749979}},"df":1,"&":{"docs":{},"df":0,"g":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}}}},"t":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":3}},"v":{"docs":{},"df":0,"e":{"docs":{},"df":0,"r":{"docs":{},"df":0,"i":{"docs":{},"df":0,"f":{"docs":{},"df":0,"i":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}},"o":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":3}}},"o":{"docs":{},"df":0,"l":{"docs":{},"df":0,"u":{"docs":{},"df":0,"p":{"docs":{},"df":0,"t":{"docs":{},"df":0,"u":{"docs":{},"df":0,"a":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":3}}}}}}}},"w":{"docs":{},"df":0,"e":{"docs":{},"df":0,"b":{"docs":{},"df":0,"s":{"docs":{},"df":0,"i":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}},"l":{"docs":{},"df":0,"l":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}},"o":{"docs":{},"df":0,"r":{"docs":{},"df":0,"k":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}},"r":{"docs":{},"df":0,"a":{"docs":{},"df":0,"p":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}}}},"title":{"root":{"docs":{},"df":0,"b":{"docs":{},"df":0,"l":{"docs":{},"df":0,"o":{"docs":{},"df":0,"c":{"docs":{},"df":0,"k":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0}},"df":1}}}}},"g":{"docs":{},"df":0,"r":{"docs":{},"df":0,"a":{"docs":{},"df":0,"d":{"docs":{},"df":0,"e":{"docs":{},"df":0,"c":{"docs":{},"df":0,"o":{"docs":{},"df":0,"i":{"docs":{},"df":0,"n":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}}}}}}},"j":{"docs":{},"df":0,"w":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/jwt/":{"tf":1.0}},"df":1}}},"r":{"docs":{},"df":0,"e":{"docs":{},"df":0,"g":{"docs":{},"df":0,"i":{"docs":{},"df":0,"s":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}}}},"t":{"docs":{},"df":0,"r":{"docs":{},"df":0,"a":{"docs":{},"df":0,"n":{"docs":{},"df":0,"s":{"docs":{},"df":0,"a":{"docs":{},"df":0,"c":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":1}}}}}}}}}}},"documentStore":{"save":true,"docs":{"http://localhost:8080/":{"body":"\nDon't know where to start? Gradecoin uses RESTful API, simple curl commands or even your browser will work! This website can help as well.\nJWT Debugger and the corresponding RFC\n\nServices\n/register\n\nStudent creates their own 2048 bit RSA keypair\nDownloads Gradecoin's Public Key from Moodle\nEncrypts their JSON wrapped Public Key, Student ID and one time passwd using Gradecoin's Public Key\nTheir public key is now in our database and can be used to sign their JWT's during requests\n\n/transaction\n\nYou can offer a Transaction - POST request\n\nThe request should have Authorization\nThe request header should be signed by the Public Key of the by field in the transaction\n\n\nfetch the list of Transactions - GET request\n\n/block\n\noffer a [schema::Block] - POST request\n\nThe request should have Authorization\nThe [schema::Block::transaction_list] of the block should be a subset of [schema::Db::pending_transactions]\n\n\nfetch the last accepted [schema::Block] - GET request\n\nAuthorization: The request header should have Bearer JWT.Token signed with Student Public Key\n","id":"http://localhost:8080/","title":"Gradecoin"},"http://localhost:8080/block-docs/":{"body":"Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod\ntempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At\nvero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd\nubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.\n","id":"http://localhost:8080/block-docs/","title":"Blocks"},"http://localhost:8080/jwt/":{"body":"Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod\ntempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At\nvero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd\nubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.\n","id":"http://localhost:8080/jwt/","title":"JWT"},"http://localhost:8080/register-docs/":{"body":"POST request to /register endpoint\nLets a [User] (=student) to authenticate themselves to the system\nThis request can be rejected if the payload is malformed (=not authenticated properly) or if\nthe [AuthRequest.user_id] of the request is not in the list of users that can hold a Gradecoin account\nAuthentication Process\n\n\nGradecoin's Public Key (gradecoin_public_key) is listed on moodle.\n\n\nGradecoin's Private Key (gradecoin_private_key) is loaded here\n\n\nStudent picks a short temporary key (k_temp)\n\n\nCreates a JSON object (auth_plaintext) with their metu_id and public key in base64 (PEM) format (S_PK):\n{\nstudent_id: \"e12345\",\npasswd: \"15 char secret\"\npublic_key: \"---BEGIN PUBLIC KEY...\"\n}\n\n\nEncrypts the serialized string of auth_plaintext with 128 bit block AES in CBC mode with Pkcs7 padding using the temporary key (k_temp), the result is auth_ciphertext TODO should this be base64'd?\n\n\nThe temporary key student has picked k_temp is encrypted using RSA with OAEP padding scheme\nusing sha256 with gradecoin_public_key (TODO base64? same as above), giving us key_ciphertext\n\n\nThe payload JSON object (auth_request) can be JSON serialized now:\n{\nc: \"auth_ciphertext\"\nkey: \"key_ciphertext\"\n}\n\n\nGradecoin Side\n\nUpon receiving, we first RSA decrypt with OAEP padding scheme using SHA256 with gradecoin_private_key as the key and auth_request.key key as the ciphertext, receiving temp_key (this is the temporary key chosen by stu\nWith temp_key, we can AES 128 Cbc Pkcs7 decrypt the auth_request.c, giving us\nauth_plaintext\nThe auth_plaintext String can be deserialized to [AuthRequest]\nWe then verify the payload and calculate the User fingerprint\nFinally, create the new [User] object, insert to users HashMap <fingerprint, User>\n\n","id":"http://localhost:8080/register-docs/","title":"Register"},"http://localhost:8080/transaction-docs/":{"body":"Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod\ntempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At\nvero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd\nubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.\n","id":"http://localhost:8080/transaction-docs/","title":"Transactions"}},"docInfo":{"http://localhost:8080/":{"body":99,"title":1},"http://localhost:8080/block-docs/":{"body":48,"title":1},"http://localhost:8080/jwt/":{"body":48,"title":1},"http://localhost:8080/register-docs/":{"body":166,"title":1},"http://localhost:8080/transaction-docs/":{"body":48,"title":1}},"length":5},"lang":"English"}; \ No newline at end of file +window.searchIndex = {"fields":["title","body"],"pipeline":["trimmer","stopWordFilter","stemmer"],"ref":"id","version":"0.9.5","index":{"body":{"root":{"docs":{},"df":0,"0":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1},"1":{"docs":{},"df":0,"2":{"docs":{},"df":0,"8":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":1}},"5":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}},"2":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1,"0":{"docs":{},"df":0,"4":{"docs":{},"df":0,"8":{"docs":{"http://localhost:8080/":{"tf":1.4142135623730951}},"df":1}}},"4":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1},"5":{"docs":{},"df":0,"6":{"docs":{"http://localhost:8080/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.0}},"df":2}}},"3":{"docs":{"http://localhost:8080/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.0}},"df":2,"1":{"docs":{},"df":0,"4":{"docs":{},"df":0,"1":{"docs":{},"df":0,"5":{"docs":{},"df":0,"9":{"docs":{},"df":0,"2":{"docs":{},"df":0,"6":{"docs":{},"df":0,"5":{"docs":{},"df":0,"3":{"docs":{},"df":0,"5":{"docs":{},"df":0,"8":{"docs":{},"df":0,"9":{"docs":{},"df":0,"7":{"docs":{},"df":0,"9":{"docs":{},"df":0,"3":{"docs":{},"df":0,"2":{"docs":{},"df":0,"3":{"docs":{},"df":0,"8":{"docs":{},"df":0,"4":{"docs":{},"df":0,"6":{"docs":{},"df":0,"2":{"docs":{},"df":0,"6":{"docs":{},"df":0,"4":{"docs":{},"df":0,"3":{"docs":{},"df":0,"3":{"docs":{},"df":0,"8":{"docs":{},"df":0,"3":{"docs":{},"df":0,"2":{"docs":{},"df":0,"7":{"docs":{},"df":0,"9":{"docs":{},"df":0,"5":{"docs":{},"df":0,"0":{"docs":{},"df":0,"2":{"docs":{},"df":0,"8":{"docs":{},"df":0,"8":{"docs":{},"df":0,"4":{"docs":{},"df":0,"1":{"docs":{},"df":0,"9":{"docs":{},"df":0,"7":{"docs":{},"df":0,"1":{"docs":{},"df":0,"6":{"docs":{},"df":0,"9":{"docs":{},"df":0,"3":{"docs":{},"df":0,"9":{"docs":{},"df":0,"9":{"docs":{},"df":0,"3":{"docs":{},"df":0,"7":{"docs":{},"df":0,"5":{"docs":{},"df":0,"1":{"docs":{},"df":0,"0":{"docs":{},"df":0,"5":{"docs":{},"df":0,"8":{"docs":{},"df":0,"2":{"docs":{},"df":0,"0":{"docs":{},"df":0,"9":{"docs":{},"df":0,"7":{"docs":{},"df":0,"4":{"docs":{},"df":0,"9":{"docs":{},"df":0,"4":{"docs":{},"df":0,"4":{"docs":{},"df":0,"5":{"docs":{},"df":0,"9":{"docs":{},"df":0,"2":{"docs":{},"df":0,"3":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},"6":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1,"4":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}},"7":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1},"a":{"docs":{},"df":0,"a":{"docs":{},"df":0,"a":{"docs":{},"df":0,"a":{"docs":{},"df":0,"a":{"docs":{},"df":0,"a":{"docs":{},"df":0,".":{"docs":{},"df":0,"b":{"docs":{},"df":0,"b":{"docs":{},"df":0,"b":{"docs":{},"df":0,"b":{"docs":{},"df":0,"b":{"docs":{},"df":0,"b":{"docs":{},"df":0,".":{"docs":{},"df":0,"c":{"docs":{},"df":0,"c":{"docs":{},"df":0,"c":{"docs":{},"df":0,"c":{"docs":{},"df":0,"c":{"docs":{"http://localhost:8080/jwt/":{"tf":1.0}},"df":1}}}}}}}}}}}}}}}}}},"b":{"docs":{},"df":0,"o":{"docs":{},"df":0,"v":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}},"s":{"docs":{},"df":0,"o":{"docs":{},"df":0,"l":{"docs":{},"df":0,"u":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}}},"u":{"docs":{},"df":0,"s":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}},"c":{"docs":{},"df":0,"c":{"docs":{},"df":0,"e":{"docs":{},"df":0,"p":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":1.7320508075688772}},"df":1}}},"o":{"docs":{},"df":0,"u":{"docs":{},"df":0,"n":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":1.0},"http://localhost:8080/register-docs/":{"tf":1.0}},"df":2}}}},"u":{"docs":{},"df":0,"s":{"docs":{},"df":0,"a":{"docs":{},"df":0,"m":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":2}}}}},"t":{"docs":{},"df":0,"u":{"docs":{},"df":0,"a":{"docs":{},"df":0,"l":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}}},"e":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":1},"l":{"docs":{},"df":0,"g":{"docs":{},"df":0,"o":{"docs":{},"df":0,"r":{"docs":{},"df":0,"i":{"docs":{},"df":0,"t":{"docs":{},"df":0,"h":{"docs":{},"df":0,"m":{"docs":{"http://localhost:8080/jwt/":{"tf":1.0}},"df":1}}}}}}},"i":{"docs":{},"df":0,"q":{"docs":{},"df":0,"u":{"docs":{},"df":0,"y":{"docs":{},"df":0,"a":{"docs":{},"df":0,"m":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":2}}}}}},"o":{"docs":{},"df":0,"n":{"docs":{},"df":0,"g":{"docs":{},"df":0,"s":{"docs":{},"df":0,"i":{"docs":{},"df":0,"d":{"docs":{"http://localhost:8080/jwt/":{"tf":1.0}},"df":1}}}}}}},"m":{"docs":{},"df":0,"e":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.4142135623730951},"http://localhost:8080/transaction-docs/":{"tf":1.4142135623730951}},"df":2}},"o":{"docs":{},"df":0,"u":{"docs":{},"df":0,"n":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":1.4142135623730951}},"df":1}}}},"p":{"docs":{"http://localhost:8080/jwt/":{"tf":1.0}},"df":1}},"p":{"docs":{},"df":0,"i":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1},"p":{"docs":{},"df":0,"e":{"docs":{},"df":0,"a":{"docs":{},"df":0,"r":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}},"l":{"docs":{},"df":0,"i":{"docs":{},"df":0,"c":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}}},"r":{"docs":{},"df":0,"c":{"docs":{},"df":0,"h":{"docs":{},"df":0,"i":{"docs":{},"df":0,"t":{"docs":{},"df":0,"e":{"docs":{},"df":0,"c":{"docs":{},"df":0,"t":{"docs":{},"df":0,"u":{"docs":{},"df":0,"r":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}}}}}}},"o":{"docs":{},"df":0,"u":{"docs":{},"df":0,"n":{"docs":{},"df":0,"d":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}}},"s":{"docs":{},"df":0,"k":{"docs":{"http://localhost:8080/":{"tf":1.4142135623730951}},"df":1},"s":{"docs":{},"df":0,"o":{"docs":{},"df":0,"r":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}}},"u":{"docs":{},"df":0,"t":{"docs":{},"df":0,"h":{"docs":{},"df":0,"_":{"docs":{},"df":0,"c":{"docs":{},"df":0,"i":{"docs":{},"df":0,"p":{"docs":{},"df":0,"h":{"docs":{},"df":0,"e":{"docs":{},"df":0,"r":{"docs":{},"df":0,"t":{"docs":{},"df":0,"e":{"docs":{},"df":0,"x":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":1}}}}}}}}}},"p":{"docs":{},"df":0,"l":{"docs":{},"df":0,"a":{"docs":{},"df":0,"i":{"docs":{},"df":0,"n":{"docs":{},"df":0,"t":{"docs":{},"df":0,"e":{"docs":{},"df":0,"x":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/register-docs/":{"tf":2.0}},"df":1}}}}}}}}},"r":{"docs":{},"df":0,"e":{"docs":{},"df":0,"q":{"docs":{},"df":0,"u":{"docs":{},"df":0,"e":{"docs":{},"df":0,"s":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1,".":{"docs":{},"df":0,"c":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1},"k":{"docs":{},"df":0,"e":{"docs":{},"df":0,"y":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}}}}}}}}}},"e":{"docs":{},"df":0,"n":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":1.4142135623730951},"http://localhost:8080/jwt/":{"tf":1.0},"http://localhost:8080/register-docs/":{"tf":1.7320508075688772}},"df":3}}},"o":{"docs":{},"df":0,"r":{"docs":{"http://localhost:8080/":{"tf":2.23606797749979},"http://localhost:8080/jwt/":{"tf":1.7320508075688772}},"df":2}},"r":{"docs":{},"df":0,"e":{"docs":{},"df":0,"q":{"docs":{},"df":0,"u":{"docs":{},"df":0,"e":{"docs":{},"df":0,"s":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1,".":{"docs":{},"df":0,"u":{"docs":{},"df":0,"s":{"docs":{},"df":0,"e":{"docs":{},"df":0,"r":{"docs":{},"df":0,"_":{"docs":{},"df":0,"i":{"docs":{},"df":0,"d":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}}}}}}}}}}}}}}}},"v":{"docs":{},"df":0,"e":{"docs":{},"df":0,"r":{"docs":{},"df":0,"a":{"docs":{},"df":0,"g":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}}}},"b":{"docs":{},"df":0,"a":{"docs":{},"df":0,"l":{"docs":{},"df":0,"a":{"docs":{},"df":0,"n":{"docs":{},"df":0,"c":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}},"n":{"docs":{},"df":0,"k":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}},"s":{"docs":{},"df":0,"e":{"docs":{},"df":0,"6":{"docs":{},"df":0,"4":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":1,"'":{"docs":{},"df":0,"d":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}}},"h":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}},"e":{"docs":{},"df":0,"a":{"docs":{},"df":0,"r":{"docs":{},"df":0,"e":{"docs":{},"df":0,"r":{"docs":{"http://localhost:8080/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.0}},"df":2}}}},"f":{"docs":{},"df":0,"o":{"docs":{},"df":0,"r":{"docs":{},"df":0,"e":{"docs":{},"df":0,"h":{"docs":{},"df":0,"a":{"docs":{},"df":0,"n":{"docs":{},"df":0,"d":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}}}}}},"g":{"docs":{},"df":0,"i":{"docs":{},"df":0,"n":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}},"i":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":2.0},"http://localhost:8080/register-docs/":{"tf":1.0}},"df":2,"c":{"docs":{},"df":0,"o":{"docs":{},"df":0,"i":{"docs":{},"df":0,"n":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}}}},"l":{"docs":{},"df":0,"a":{"docs":{},"df":0,"k":{"docs":{},"df":0,"e":{"docs":{},"df":0,"2":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}},"o":{"docs":{},"df":0,"c":{"docs":{},"df":0,"k":{"docs":{"http://localhost:8080/":{"tf":3.3166247903554},"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.4142135623730951},"http://localhost:8080/register-docs/":{"tf":1.0}},"df":4,"c":{"docs":{},"df":0,"h":{"docs":{},"df":0,"a":{"docs":{},"df":0,"i":{"docs":{},"df":0,"n":{"docs":{"http://localhost:8080/":{"tf":1.4142135623730951}},"df":1}}}}}}}}},"o":{"docs":{},"df":0,"d":{"docs":{},"df":0,"i":{"docs":{"http://localhost:8080/jwt/":{"tf":1.0}},"df":1}}},"r":{"docs":{},"df":0,"o":{"docs":{},"df":0,"w":{"docs":{},"df":0,"s":{"docs":{},"df":0,"e":{"docs":{},"df":0,"r":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}}},"u":{"docs":{},"df":0,"t":{"docs":{},"df":0,"e":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}},"u":{"docs":{},"df":0,"g":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1},"i":{"docs":{},"df":0,"l":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}}},"c":{"docs":{"http://localhost:8080/":{"tf":1.4142135623730951},"http://localhost:8080/register-docs/":{"tf":1.0}},"df":2,"a":{"docs":{},"df":0,"l":{"docs":{},"df":0,"c":{"docs":{},"df":0,"u":{"docs":{},"df":0,"l":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}},"l":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}},"b":{"docs":{},"df":0,"c":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":1}},"h":{"docs":{},"df":0,"a":{"docs":{},"df":0,"r":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1,"a":{"docs":{},"df":0,"c":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":1.4142135623730951}},"df":1}}}}},"e":{"docs":{},"df":0,"c":{"docs":{},"df":0,"k":{"docs":{"http://localhost:8080/jwt/":{"tf":1.0}},"df":1}}},"o":{"docs":{},"df":0,"s":{"docs":{},"df":0,"e":{"docs":{},"df":0,"n":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}}},"i":{"docs":{},"df":0,"p":{"docs":{},"df":0,"h":{"docs":{},"df":0,"e":{"docs":{},"df":0,"r":{"docs":{},"df":0,"t":{"docs":{},"df":0,"e":{"docs":{},"df":0,"x":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}}}}}}},"l":{"docs":{},"df":0,"a":{"docs":{},"df":0,"i":{"docs":{},"df":0,"m":{"docs":{"http://localhost:8080/jwt/":{"tf":1.0}},"df":1}},"s":{"docs":{},"df":0,"s":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}},"i":{"docs":{},"df":0,"e":{"docs":{},"df":0,"n":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}},"t":{"docs":{},"df":0,"a":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":2}}}},"o":{"docs":{},"df":0,"d":{"docs":{},"df":0,"e":{"docs":{"http://localhost:8080/":{"tf":1.4142135623730951}},"df":1}},"i":{"docs":{},"df":0,"n":{"docs":{},"df":0,"b":{"docs":{},"df":0,"a":{"docs":{},"df":0,"s":{"docs":{"http://localhost:8080/":{"tf":1.4142135623730951}},"df":1}}}}},"l":{"docs":{},"df":0,"l":{"docs":{},"df":0,"a":{"docs":{},"df":0,"b":{"docs":{},"df":0,"o":{"docs":{},"df":0,"r":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}}}},"m":{"docs":{},"df":0,"m":{"docs":{},"df":0,"a":{"docs":{},"df":0,"n":{"docs":{},"df":0,"d":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}},"p":{"docs":{},"df":0,"e":{"docs":{},"df":0,"n":{"docs":{},"df":0,"s":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}},"l":{"docs":{},"df":0,"i":{"docs":{},"df":0,"c":{"docs":{"http://localhost:8080/":{"tf":1.4142135623730951}},"df":1}}}}},"n":{"docs":{},"df":0,"s":{"docs":{},"df":0,"e":{"docs":{},"df":0,"t":{"docs":{},"df":0,"e":{"docs":{},"df":0,"t":{"docs":{},"df":0,"u":{"docs":{},"df":0,"r":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":2}}}}}}}},"r":{"docs":{},"df":0,"r":{"docs":{},"df":0,"e":{"docs":{},"df":0,"s":{"docs":{},"df":0,"p":{"docs":{},"df":0,"o":{"docs":{},"df":0,"n":{"docs":{},"df":0,"d":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}}}}}}},"r":{"docs":{},"df":0,"a":{"docs":{},"df":0,"c":{"docs":{},"df":0,"k":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}},"f":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}},"e":{"docs":{},"df":0,"a":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.0},"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":3}}},"y":{"docs":{},"df":0,"p":{"docs":{},"df":0,"t":{"docs":{},"df":0,"o":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1,"g":{"docs":{},"df":0,"r":{"docs":{},"df":0,"a":{"docs":{},"df":0,"p":{"docs":{},"df":0,"h":{"docs":{},"df":0,"i":{"docs":{"http://localhost:8080/":{"tf":1.4142135623730951}},"df":1}}}}}}}}}}},"u":{"docs":{},"df":0,"r":{"docs":{},"df":0,"l":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1},"r":{"docs":{},"df":0,"e":{"docs":{},"df":0,"n":{"docs":{},"df":0,"c":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1},"t":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}}}}},"d":{"docs":{},"df":0,"a":{"docs":{},"df":0,"t":{"docs":{},"df":0,"a":{"docs":{},"df":0,"b":{"docs":{},"df":0,"a":{"docs":{},"df":0,"s":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}}}},"e":{"docs":{},"df":0,"b":{"docs":{},"df":0,"u":{"docs":{},"df":0,"g":{"docs":{},"df":0,"g":{"docs":{"http://localhost:8080/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.0}},"df":2}}}},"c":{"docs":{},"df":0,"o":{"docs":{},"df":0,"d":{"docs":{"http://localhost:8080/jwt/":{"tf":1.0}},"df":1}},"r":{"docs":{},"df":0,"y":{"docs":{},"df":0,"p":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":1}}}}},"l":{"docs":{},"df":0,"e":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}},"s":{"docs":{},"df":0,"e":{"docs":{},"df":0,"r":{"docs":{},"df":0,"i":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}}},"i":{"docs":{},"df":0,"a":{"docs":{},"df":0,"m":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.4142135623730951},"http://localhost:8080/transaction-docs/":{"tf":1.4142135623730951}},"df":2}}},"o":{"docs":{},"df":0,"c":{"docs":{},"df":0,"u":{"docs":{},"df":0,"m":{"docs":{},"df":0,"e":{"docs":{},"df":0,"n":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/jwt/":{"tf":1.0}},"df":1}}}}}},"l":{"docs":{},"df":0,"o":{"docs":{},"df":0,"r":{"docs":{"http://localhost:8080/block-docs/":{"tf":2.0},"http://localhost:8080/transaction-docs/":{"tf":2.0}},"df":2}}},"n":{"docs":{},"df":0,"'":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":1.7320508075688772}},"df":1}}},"w":{"docs":{},"df":0,"n":{"docs":{},"df":0,"l":{"docs":{},"df":0,"o":{"docs":{},"df":0,"a":{"docs":{},"df":0,"d":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}}}}},"r":{"docs":{},"df":0,"a":{"docs":{},"df":0,"w":{"docs":{},"df":0,"n":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}},"u":{"docs":{},"df":0,"o":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":2},"r":{"docs":{},"df":0,"e":{"docs":{"http://localhost:8080/":{"tf":1.4142135623730951}},"df":1}}}},"e":{"docs":{},"df":0,"1":{"docs":{},"df":0,"2":{"docs":{},"df":0,"3":{"docs":{},"df":0,"4":{"docs":{},"df":0,"5":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}}},"a":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":2},"f":{"docs":{},"df":0,"f":{"docs":{},"df":0,"o":{"docs":{},"df":0,"r":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}}},"i":{"docs":{},"df":0,"r":{"docs":{},"df":0,"m":{"docs":{},"df":0,"o":{"docs":{},"df":0,"d":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":2}}}}},"l":{"docs":{},"df":0,"i":{"docs":{},"df":0,"t":{"docs":{},"df":0,"r":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":2}}}},"n":{"docs":{},"df":0,"c":{"docs":{},"df":0,"o":{"docs":{},"df":0,"d":{"docs":{"http://localhost:8080/jwt/":{"tf":1.0}},"df":1},"u":{"docs":{},"df":0,"r":{"docs":{},"df":0,"a":{"docs":{},"df":0,"g":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}}},"r":{"docs":{},"df":0,"y":{"docs":{},"df":0,"p":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":1.4142135623730951},"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":2}}}}},"d":{"docs":{"http://localhost:8080/":{"tf":1.4142135623730951}},"df":1,"p":{"docs":{},"df":0,"o":{"docs":{},"df":0,"i":{"docs":{},"df":0,"n":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":1.0},"http://localhost:8080/register-docs/":{"tf":1.0}},"df":2}}}}}},"o":{"docs":{},"df":0,"u":{"docs":{},"df":0,"g":{"docs":{},"df":0,"h":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}},"r":{"docs":{},"df":0,"o":{"docs":{},"df":0,"l":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}},"o":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":2},"p":{"docs":{},"df":0,"o":{"docs":{},"df":0,"c":{"docs":{},"df":0,"h":{"docs":{"http://localhost:8080/jwt/":{"tf":1.0}},"df":1}}}},"r":{"docs":{},"df":0,"a":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":2}}},"s":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":2}},"t":{"docs":{"http://localhost:8080/block-docs/":{"tf":2.0},"http://localhost:8080/transaction-docs/":{"tf":2.0}},"df":2},"v":{"docs":{},"df":0,"e":{"docs":{},"df":0,"n":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}},"x":{"docs":{},"df":0,"i":{"docs":{},"df":0,"s":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}},"p":{"docs":{"http://localhost:8080/jwt/":{"tf":1.4142135623730951}},"df":1,"e":{"docs":{},"df":0,"c":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":1.4142135623730951}},"df":1}}},"i":{"docs":{},"df":0,"r":{"docs":{"http://localhost:8080/jwt/":{"tf":1.4142135623730951}},"df":1}},"l":{"docs":{},"df":0,"a":{"docs":{},"df":0,"i":{"docs":{},"df":0,"n":{"docs":{"http://localhost:8080/jwt/":{"tf":1.0}},"df":1}}}}}}},"f":{"docs":{},"df":0,"a":{"docs":{},"df":0,"u":{"docs":{},"df":0,"x":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}},"v":{"docs":{},"df":0,"o":{"docs":{},"df":0,"u":{"docs":{},"df":0,"r":{"docs":{},"df":0,"i":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}}}}},"e":{"docs":{},"df":0,"e":{"docs":{},"df":0,"l":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}},"t":{"docs":{},"df":0,"c":{"docs":{},"df":0,"h":{"docs":{"http://localhost:8080/":{"tf":1.4142135623730951}},"df":1}}}},"i":{"docs":{},"df":0,"e":{"docs":{},"df":0,"l":{"docs":{},"df":0,"d":{"docs":{"http://localhost:8080/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.0}},"df":2}}},"n":{"docs":{},"df":0,"a":{"docs":{},"df":0,"l":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}},"d":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1},"g":{"docs":{},"df":0,"e":{"docs":{},"df":0,"r":{"docs":{},"df":0,"p":{"docs":{},"df":0,"r":{"docs":{},"df":0,"i":{"docs":{},"df":0,"n":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}}}}}}},"r":{"docs":{},"df":0,"s":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":1.0},"http://localhost:8080/register-docs/":{"tf":1.0}},"df":2}}},"t":{"docs":{"http://localhost:8080/jwt/":{"tf":1.0}},"df":1}},"o":{"docs":{},"df":0,"r":{"docs":{},"df":0,"c":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1},"m":{"docs":{},"df":0,"a":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/jwt/":{"tf":1.0},"http://localhost:8080/register-docs/":{"tf":1.0}},"df":2}}}},"u":{"docs":{},"df":0,"n":{"docs":{},"df":0,"d":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}},"r":{"docs":{},"df":0,"e":{"docs":{},"df":0,"e":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}},"i":{"docs":{},"df":0,"e":{"docs":{},"df":0,"n":{"docs":{},"df":0,"d":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}}}},"g":{"docs":{},"df":0,"e":{"docs":{},"df":0,"n":{"docs":{},"df":0,"e":{"docs":{},"df":0,"r":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}},"i":{"docs":{},"df":0,"v":{"docs":{},"df":0,"e":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":1}}},"r":{"docs":{},"df":0,"a":{"docs":{},"df":0,"b":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1},"d":{"docs":{},"df":0,"e":{"docs":{"http://localhost:8080/":{"tf":1.4142135623730951}},"df":1,"c":{"docs":{},"df":0,"o":{"docs":{},"df":0,"i":{"docs":{},"df":0,"n":{"docs":{"http://localhost:8080/":{"tf":3.605551275463989},"http://localhost:8080/jwt/":{"tf":1.0},"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":3,"'":{"docs":{"http://localhost:8080/":{"tf":1.4142135623730951},"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":2},"_":{"docs":{},"df":0,"p":{"docs":{},"df":0,"r":{"docs":{},"df":0,"i":{"docs":{},"df":0,"v":{"docs":{},"df":0,"a":{"docs":{},"df":0,"t":{"docs":{},"df":0,"e":{"docs":{},"df":0,"_":{"docs":{},"df":0,"k":{"docs":{},"df":0,"e":{"docs":{},"df":0,"y":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":1}}}}}}}}}},"u":{"docs":{},"df":0,"b":{"docs":{},"df":0,"l":{"docs":{},"df":0,"i":{"docs":{},"df":0,"c":{"docs":{},"df":0,"_":{"docs":{},"df":0,"k":{"docs":{},"df":0,"e":{"docs":{},"df":0,"y":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":1}}}}}}}}}}}}}}}}}}}},"h":{"docs":{},"df":0,"a":{"docs":{},"df":0,"c":{"docs":{},"df":0,"k":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}},"p":{"docs":{},"df":0,"p":{"docs":{},"df":0,"e":{"docs":{},"df":0,"n":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}},"r":{"docs":{},"df":0,"d":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}},"s":{"docs":{},"df":0,"h":{"docs":{"http://localhost:8080/":{"tf":1.4142135623730951},"http://localhost:8080/jwt/":{"tf":1.0}},"df":2,"m":{"docs":{},"df":0,"a":{"docs":{},"df":0,"p":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}}}},"e":{"docs":{},"df":0,"a":{"docs":{},"df":0,"d":{"docs":{},"df":0,"e":{"docs":{},"df":0,"r":{"docs":{"http://localhost:8080/":{"tf":1.4142135623730951},"http://localhost:8080/jwt/":{"tf":1.4142135623730951}},"df":2}}}},"l":{"docs":{},"df":0,"p":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}},"r":{"docs":{},"df":0,"e":{"docs":{"http://localhost:8080/jwt/":{"tf":1.0},"http://localhost:8080/register-docs/":{"tf":1.0}},"df":2}},"x":{"docs":{},"df":0,"a":{"docs":{},"df":0,"d":{"docs":{},"df":0,"e":{"docs":{},"df":0,"c":{"docs":{},"df":0,"i":{"docs":{},"df":0,"m":{"docs":{"http://localhost:8080/":{"tf":1.4142135623730951}},"df":1}}}}}}}},"o":{"docs":{},"df":0,"l":{"docs":{},"df":0,"d":{"docs":{"http://localhost:8080/":{"tf":1.0},"http://localhost:8080/register-docs/":{"tf":1.0}},"df":2}}},"t":{"docs":{},"df":0,"t":{"docs":{},"df":0,"p":{"docs":{"http://localhost:8080/jwt/":{"tf":1.0}},"df":1}}}},"i":{"docs":{},"df":0,"'":{"docs":{},"df":0,"v":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}},"a":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/jwt/":{"tf":1.4142135623730951}},"df":1}},"d":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1},"m":{"docs":{},"df":0,"p":{"docs":{},"df":0,"l":{"docs":{},"df":0,"e":{"docs":{},"df":0,"m":{"docs":{},"df":0,"e":{"docs":{},"df":0,"n":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":1.4142135623730951}},"df":1}}}}}}}},"n":{"docs":{},"df":0,"c":{"docs":{},"df":0,"r":{"docs":{},"df":0,"e":{"docs":{},"df":0,"d":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}},"s":{"docs":{},"df":0,"e":{"docs":{},"df":0,"r":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}},"p":{"docs":{},"df":0,"i":{"docs":{},"df":0,"r":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}},"t":{"docs":{},"df":0,"e":{"docs":{},"df":0,"n":{"docs":{},"df":0,"d":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1},"t":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}},"r":{"docs":{},"df":0,"f":{"docs":{},"df":0,"a":{"docs":{},"df":0,"c":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}}}},"v":{"docs":{},"df":0,"i":{"docs":{},"df":0,"d":{"docs":{},"df":0,"i":{"docs":{},"df":0,"d":{"docs":{},"df":0,"u":{"docs":{"http://localhost:8080/jwt/":{"tf":1.0}},"df":1}}},"u":{"docs":{},"df":0,"n":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":2}}}}}}},"p":{"docs":{},"df":0,"s":{"docs":{},"df":0,"u":{"docs":{},"df":0,"m":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.4142135623730951},"http://localhost:8080/transaction-docs/":{"tf":1.4142135623730951}},"df":2}}}},"s":{"docs":{},"df":0,"s":{"docs":{},"df":0,"u":{"docs":{"http://localhost:8080/jwt/":{"tf":1.0}},"df":1}}},"t":{"docs":{},"df":0,"'":{"docs":{"http://localhost:8080/":{"tf":1.4142135623730951}},"df":1}}},"j":{"docs":{},"df":0,"s":{"docs":{},"df":0,"o":{"docs":{},"df":0,"n":{"docs":{"http://localhost:8080/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.4142135623730951},"http://localhost:8080/register-docs/":{"tf":1.7320508075688772}},"df":3}}},"u":{"docs":{},"df":0,"s":{"docs":{},"df":0,"t":{"docs":{},"df":0,"o":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":2}}}},"w":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":1.4142135623730951},"http://localhost:8080/jwt/":{"tf":2.6457513110645907}},"df":2,"'":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1},".":{"docs":{},"df":0,"t":{"docs":{},"df":0,"o":{"docs":{},"df":0,"k":{"docs":{},"df":0,"e":{"docs":{},"df":0,"n":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}}}}}}},"k":{"docs":{},"df":0,"_":{"docs":{},"df":0,"t":{"docs":{},"df":0,"e":{"docs":{},"df":0,"m":{"docs":{},"df":0,"p":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.7320508075688772}},"df":1}}}}},"a":{"docs":{},"df":0,"s":{"docs":{},"df":0,"d":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":2}}},"e":{"docs":{},"df":0,"y":{"docs":{"http://localhost:8080/":{"tf":3.0},"http://localhost:8080/jwt/":{"tf":1.4142135623730951},"http://localhost:8080/register-docs/":{"tf":3.3166247903554}},"df":3,"_":{"docs":{},"df":0,"c":{"docs":{},"df":0,"i":{"docs":{},"df":0,"p":{"docs":{},"df":0,"h":{"docs":{},"df":0,"e":{"docs":{},"df":0,"r":{"docs":{},"df":0,"t":{"docs":{},"df":0,"e":{"docs":{},"df":0,"x":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":1}}}}}}}}}}},"p":{"docs":{},"df":0,"a":{"docs":{},"df":0,"i":{"docs":{},"df":0,"r":{"docs":{"http://localhost:8080/":{"tf":1.4142135623730951}},"df":1}}}},"s":{"docs":{},"df":0,"p":{"docs":{},"df":0,"a":{"docs":{},"df":0,"i":{"docs":{},"df":0,"r":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}}}}},"n":{"docs":{},"df":0,"o":{"docs":{},"df":0,"w":{"docs":{"http://localhost:8080/":{"tf":2.0}},"df":1}}}},"l":{"docs":{},"df":0,"a":{"docs":{},"df":0,"b":{"docs":{},"df":0,"o":{"docs":{},"df":0,"r":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":2}}},"n":{"docs":{},"df":0,"g":{"docs":{},"df":0,"u":{"docs":{},"df":0,"a":{"docs":{},"df":0,"g":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}}},"s":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}},"e":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}},"i":{"docs":{},"df":0,"s":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":1.0},"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":2}},"t":{"docs":{},"df":0,"t":{"docs":{},"df":0,"l":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}},"o":{"docs":{},"df":0,"a":{"docs":{},"df":0,"d":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}},"r":{"docs":{},"df":0,"e":{"docs":{},"df":0,"m":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.4142135623730951},"http://localhost:8080/transaction-docs/":{"tf":1.4142135623730951}},"df":2}}}},"t":{"docs":{},"df":0,";":{"docs":{},"df":0,"f":{"docs":{},"df":0,"i":{"docs":{},"df":0,"n":{"docs":{},"df":0,"g":{"docs":{},"df":0,"e":{"docs":{},"df":0,"r":{"docs":{},"df":0,"p":{"docs":{},"df":0,"r":{"docs":{},"df":0,"i":{"docs":{},"df":0,"n":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}}}}}}}}}}}},"m":{"docs":{},"df":0,"a":{"docs":{},"df":0,"c":{"docs":{"http://localhost:8080/jwt/":{"tf":1.0}},"df":1},"g":{"docs":{},"df":0,"n":{"docs":{},"df":0,"a":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":2}}},"l":{"docs":{},"df":0,"f":{"docs":{},"df":0,"o":{"docs":{},"df":0,"r":{"docs":{},"df":0,"m":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}}}},"e":{"docs":{},"df":0,"c":{"docs":{},"df":0,"h":{"docs":{},"df":0,"a":{"docs":{},"df":0,"n":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}},"t":{"docs":{},"df":0,"u":{"docs":{},"df":0,"_":{"docs":{},"df":0,"i":{"docs":{},"df":0,"d":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}}}},"i":{"docs":{},"df":0,"n":{"docs":{},"df":0,"e":{"docs":{"http://localhost:8080/":{"tf":1.4142135623730951}},"df":1},"u":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}},"s":{"docs":{},"df":0,"s":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}},"o":{"docs":{},"df":0,"d":{"docs":{},"df":0,"e":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}},"o":{"docs":{},"df":0,"d":{"docs":{},"df":0,"l":{"docs":{"http://localhost:8080/":{"tf":1.0},"http://localhost:8080/register-docs/":{"tf":1.0}},"df":2}}}}},"n":{"docs":{},"df":0,"e":{"docs":{},"df":0,"e":{"docs":{},"df":0,"d":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}},"t":{"docs":{},"df":0,"w":{"docs":{},"df":0,"o":{"docs":{},"df":0,"r":{"docs":{},"df":0,"k":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}}},"w":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}},"o":{"docs":{},"df":0,"b":{"docs":{},"df":0,"o":{"docs":{},"df":0,"d":{"docs":{},"df":0,"i":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}},"n":{"docs":{},"df":0,"u":{"docs":{},"df":0,"m":{"docs":{},"df":0,"i":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":2}}}},"w":{"docs":{"http://localhost:8080/":{"tf":1.0},"http://localhost:8080/register-docs/":{"tf":1.0}},"df":2}}},"o":{"docs":{},"df":0,"a":{"docs":{},"df":0,"e":{"docs":{},"df":0,"p":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":1}}},"b":{"docs":{},"df":0,"j":{"docs":{},"df":0,"e":{"docs":{},"df":0,"c":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.7320508075688772}},"df":1}}}}},"f":{"docs":{},"df":0,"f":{"docs":{},"df":0,"e":{"docs":{},"df":0,"r":{"docs":{"http://localhost:8080/":{"tf":1.7320508075688772}},"df":1}}}},"n":{"docs":{"http://localhost:8080/":{"tf":1.4142135623730951}},"df":1},"p":{"docs":{},"df":0,"e":{"docs":{},"df":0,"r":{"docs":{"http://localhost:8080/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.0}},"df":2}}},"u":{"docs":{},"df":0,"t":{"docs":{},"df":0,"p":{"docs":{},"df":0,"u":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}}}},"p":{"docs":{},"df":0,"a":{"docs":{},"df":0,"1":{"docs":{"http://localhost:8080/":{"tf":1.4142135623730951}},"df":1},"d":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.7320508075688772}},"df":1},"s":{"docs":{},"df":0,"s":{"docs":{},"df":0,"w":{"docs":{},"df":0,"d":{"docs":{"http://localhost:8080/":{"tf":1.0},"http://localhost:8080/register-docs/":{"tf":1.0}},"df":2},"o":{"docs":{},"df":0,"r":{"docs":{},"df":0,"d":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}}}},"t":{"docs":{},"df":0,"c":{"docs":{},"df":0,"h":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}},"y":{"docs":{},"df":0,"l":{"docs":{},"df":0,"o":{"docs":{},"df":0,"a":{"docs":{},"df":0,"d":{"docs":{"http://localhost:8080/jwt/":{"tf":1.0},"http://localhost:8080/register-docs/":{"tf":1.7320508075688772}},"df":2}}}}}},"e":{"docs":{},"df":0,"m":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1},"r":{"docs":{},"df":0,"l":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}},"i":{"docs":{},"df":0,"c":{"docs":{},"df":0,"k":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":1}}},"k":{"docs":{},"df":0,"c":{"docs":{},"df":0,"s":{"docs":{},"df":0,"1":{"docs":{"http://localhost:8080/jwt/":{"tf":1.0}},"df":1},"7":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":1}}}},"l":{"docs":{},"df":0,"a":{"docs":{},"df":0,"c":{"docs":{},"df":0,"e":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}},"y":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}},"e":{"docs":{},"df":0,"a":{"docs":{},"df":0,"s":{"docs":{"http://localhost:8080/":{"tf":1.7320508075688772}},"df":1}}}},"o":{"docs":{},"df":0,"s":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":1.4142135623730951},"http://localhost:8080/register-docs/":{"tf":1.0}},"df":2}}},"r":{"docs":{},"df":0,"a":{"docs":{},"df":0,"c":{"docs":{},"df":0,"t":{"docs":{},"df":0,"i":{"docs":{},"df":0,"c":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}}},"e":{"docs":{},"df":0,"l":{"docs":{},"df":0,"o":{"docs":{},"df":0,"a":{"docs":{},"df":0,"d":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}}},"i":{"docs":{},"df":0,"m":{"docs":{},"df":0,"i":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}},"v":{"docs":{},"df":0,"a":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/jwt/":{"tf":1.0},"http://localhost:8080/register-docs/":{"tf":1.0}},"df":2}}}},"o":{"docs":{},"df":0,"c":{"docs":{},"df":0,"e":{"docs":{},"df":0,"s":{"docs":{},"df":0,"s":{"docs":{"http://localhost:8080/jwt/":{"tf":1.0},"http://localhost:8080/register-docs/":{"tf":1.0}},"df":2}}}},"d":{"docs":{},"df":0,"u":{"docs":{},"df":0,"c":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1,"t":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}},"g":{"docs":{},"df":0,"r":{"docs":{},"df":0,"a":{"docs":{},"df":0,"m":{"docs":{"http://localhost:8080/":{"tf":2.0}},"df":1}}}},"o":{"docs":{},"df":0,"f":{"docs":{"http://localhost:8080/":{"tf":1.4142135623730951},"http://localhost:8080/jwt/":{"tf":1.0}},"df":2}},"p":{"docs":{},"df":0,"e":{"docs":{},"df":0,"r":{"docs":{},"df":0,"l":{"docs":{},"df":0,"i":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}},"o":{"docs":{},"df":0,"s":{"docs":{"http://localhost:8080/":{"tf":1.7320508075688772},"http://localhost:8080/jwt/":{"tf":1.4142135623730951}},"df":2}}}}},"u":{"docs":{},"df":0,"b":{"docs":{},"df":0,"l":{"docs":{},"df":0,"i":{"docs":{},"df":0,"c":{"docs":{"http://localhost:8080/":{"tf":3.0},"http://localhost:8080/jwt/":{"tf":1.0},"http://localhost:8080/register-docs/":{"tf":1.7320508075688772}},"df":3,"_":{"docs":{},"df":0,"k":{"docs":{},"df":0,"e":{"docs":{},"df":0,"y":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}}}}}},"t":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}},"y":{"docs":{},"df":0,"t":{"docs":{},"df":0,"h":{"docs":{},"df":0,"o":{"docs":{},"df":0,"n":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}}}},"q":{"docs":{},"df":0,"u":{"docs":{},"df":0,"e":{"docs":{},"df":0,"s":{"docs":{},"df":0,"t":{"docs":{},"df":0,"i":{"docs":{},"df":0,"o":{"docs":{},"df":0,"n":{"docs":{"http://localhost:8080/":{"tf":1.4142135623730951}},"df":1}}}}}},"i":{"docs":{},"df":0,"c":{"docs":{},"df":0,"k":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}}},"r":{"docs":{},"df":0,"a":{"docs":{},"df":0,"n":{"docs":{},"df":0,"d":{"docs":{},"df":0,"o":{"docs":{},"df":0,"m":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}}},"e":{"docs":{},"df":0,"b":{"docs":{},"df":0,"u":{"docs":{},"df":0,"m":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":2}}},"c":{"docs":{},"df":0,"e":{"docs":{},"df":0,"i":{"docs":{},"df":0,"v":{"docs":{"http://localhost:8080/":{"tf":1.0},"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":2}}}},"f":{"docs":{},"df":0,"e":{"docs":{},"df":0,"r":{"docs":{"http://localhost:8080/jwt/":{"tf":1.7320508075688772}},"df":1}}},"g":{"docs":{},"df":0,"i":{"docs":{},"df":0,"s":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":1.4142135623730951},"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":2}}}},"j":{"docs":{},"df":0,"e":{"docs":{},"df":0,"c":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/jwt/":{"tf":1.0},"http://localhost:8080/register-docs/":{"tf":1.0}},"df":2}}}},"m":{"docs":{},"df":0,"e":{"docs":{},"df":0,"m":{"docs":{},"df":0,"b":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}},"p":{"docs":{},"df":0,"r":{"docs":{},"df":0,"e":{"docs":{},"df":0,"s":{"docs":{},"df":0,"e":{"docs":{},"df":0,"n":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/jwt/":{"tf":1.0}},"df":1}}}}}}},"q":{"docs":{},"df":0,"u":{"docs":{},"df":0,"e":{"docs":{},"df":0,"s":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":3.3166247903554},"http://localhost:8080/jwt/":{"tf":1.4142135623730951},"http://localhost:8080/register-docs/":{"tf":1.7320508075688772}},"df":3}}},"i":{"docs":{},"df":0,"r":{"docs":{"http://localhost:8080/jwt/":{"tf":1.0}},"df":1}}}},"s":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":1.4142135623730951}},"df":1},"u":{"docs":{},"df":0,"l":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}}},"f":{"docs":{},"df":0,"c":{"docs":{"http://localhost:8080/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.0}},"df":2}},"o":{"docs":{},"df":0,"l":{"docs":{},"df":0,"l":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}},"u":{"docs":{},"df":0,"n":{"docs":{},"df":0,"d":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}},"s":{"docs":{},"df":0,"2":{"docs":{},"df":0,"5":{"docs":{},"df":0,"6":{"docs":{"http://localhost:8080/jwt/":{"tf":1.0}},"df":1}}},"a":{"docs":{"http://localhost:8080/":{"tf":1.7320508075688772},"http://localhost:8080/jwt/":{"tf":1.0},"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":3,"s":{"docs":{},"df":0,"s":{"docs":{},"df":0,"a":{"docs":{"http://localhost:8080/jwt/":{"tf":1.0}},"df":1}}}}},"u":{"docs":{},"df":0,"n":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1},"s":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":1.4142135623730951}},"df":1}}}},"s":{"docs":{},"df":0,"_":{"docs":{},"df":0,"p":{"docs":{},"df":0,"k":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}},"a":{"docs":{},"df":0,"d":{"docs":{},"df":0,"i":{"docs":{},"df":0,"p":{"docs":{},"df":0,"s":{"docs":{},"df":0,"c":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":2}}}},"l":{"docs":{},"df":0,"i":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}},"m":{"docs":{},"df":0,"e":{"docs":{"http://localhost:8080/":{"tf":1.0},"http://localhost:8080/register-docs/":{"tf":1.0}},"df":2}},"n":{"docs":{},"df":0,"c":{"docs":{},"df":0,"t":{"docs":{},"df":0,"u":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":2}}},"d":{"docs":{},"df":0,"b":{"docs":{},"df":0,"o":{"docs":{},"df":0,"x":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}}}},"c":{"docs":{},"df":0,"h":{"docs":{},"df":0,"e":{"docs":{},"df":0,"m":{"docs":{},"df":0,"a":{"docs":{},"df":0,":":{"docs":{},"df":0,":":{"docs":{},"df":0,"b":{"docs":{},"df":0,"l":{"docs":{},"df":0,"o":{"docs":{},"df":0,"c":{"docs":{},"df":0,"k":{"docs":{"http://localhost:8080/":{"tf":1.4142135623730951}},"df":1,":":{"docs":{},"df":0,":":{"docs":{},"df":0,"t":{"docs":{},"df":0,"r":{"docs":{},"df":0,"a":{"docs":{},"df":0,"n":{"docs":{},"df":0,"s":{"docs":{},"df":0,"a":{"docs":{},"df":0,"c":{"docs":{},"df":0,"t":{"docs":{},"df":0,"i":{"docs":{},"df":0,"o":{"docs":{},"df":0,"n":{"docs":{},"df":0,"_":{"docs":{},"df":0,"l":{"docs":{},"df":0,"i":{"docs":{},"df":0,"s":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}}}}}}}}}}}}}}}}}}}}},"d":{"docs":{},"df":0,"b":{"docs":{},"df":0,":":{"docs":{},"df":0,":":{"docs":{},"df":0,"p":{"docs":{},"df":0,"e":{"docs":{},"df":0,"n":{"docs":{},"df":0,"d":{"docs":{},"df":0,"i":{"docs":{},"df":0,"n":{"docs":{},"df":0,"g":{"docs":{},"df":0,"_":{"docs":{},"df":0,"t":{"docs":{},"df":0,"r":{"docs":{},"df":0,"a":{"docs":{},"df":0,"n":{"docs":{},"df":0,"s":{"docs":{},"df":0,"a":{"docs":{},"df":0,"c":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}}}}}}}}}}}}}}}}}}}}},"e":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":1}}}},"r":{"docs":{},"df":0,"i":{"docs":{},"df":0,"p":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}}},"e":{"docs":{},"df":0,"a":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":2},"c":{"docs":{},"df":0,"r":{"docs":{},"df":0,"e":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}},"d":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.4142135623730951},"http://localhost:8080/transaction-docs/":{"tf":1.4142135623730951}},"df":2},"e":{"docs":{"http://localhost:8080/":{"tf":1.0},"http://localhost:8080/jwt/":{"tf":1.0}},"df":2},"n":{"docs":{},"df":0,"d":{"docs":{"http://localhost:8080/":{"tf":1.4142135623730951},"http://localhost:8080/jwt/":{"tf":1.0}},"df":2}},"r":{"docs":{},"df":0,"i":{"docs":{},"df":0,"a":{"docs":{},"df":0,"l":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":1}}},"v":{"docs":{},"df":0,"e":{"docs":{},"df":0,"r":{"docs":{"http://localhost:8080/":{"tf":1.7320508075688772}},"df":1}},"i":{"docs":{},"df":0,"c":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}}},"h":{"docs":{},"df":0,"a":{"docs":{"http://localhost:8080/jwt/":{"tf":1.0}},"df":1,"2":{"docs":{},"df":0,"5":{"docs":{},"df":0,"6":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":1}}}},"e":{"docs":{},"df":0,"l":{"docs":{},"df":0,"f":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}},"o":{"docs":{},"df":0,"r":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}},"i":{"docs":{},"df":0,"d":{"docs":{},"df":0,"e":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}},"g":{"docs":{},"df":0,"n":{"docs":{"http://localhost:8080/":{"tf":1.7320508075688772}},"df":1,"a":{"docs":{},"df":0,"t":{"docs":{},"df":0,"u":{"docs":{},"df":0,"r":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}}}},"m":{"docs":{},"df":0,"p":{"docs":{},"df":0,"l":{"docs":{"http://localhost:8080/":{"tf":1.4142135623730951}},"df":1,"i":{"docs":{},"df":0,"c":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}},"u":{"docs":{},"df":0,"l":{"docs":{"http://localhost:8080/":{"tf":1.7320508075688772}},"df":1}}},"n":{"docs":{},"df":0,"g":{"docs":{},"df":0,"l":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}},"t":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.4142135623730951},"http://localhost:8080/transaction-docs/":{"tf":1.4142135623730951}},"df":2}},"n":{"docs":{},"df":0,"i":{"docs":{},"df":0,"p":{"docs":{},"df":0,"p":{"docs":{},"df":0,"e":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}}}},"o":{"docs":{},"df":0,"l":{"docs":{},"df":0,"v":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}},"m":{"docs":{},"df":0,"e":{"docs":{},"df":0,"t":{"docs":{},"df":0,"h":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}},"u":{"docs":{},"df":0,"n":{"docs":{},"df":0,"d":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}},"t":{"docs":{},"df":0,"a":{"docs":{},"df":0,"n":{"docs":{},"df":0,"d":{"docs":{},"df":0,"a":{"docs":{},"df":0,"r":{"docs":{},"df":0,"d":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}}},"r":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":1.4142135623730951}},"df":1}}},"e":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":2}},"r":{"docs":{},"df":0,"i":{"docs":{},"df":0,"n":{"docs":{},"df":0,"g":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":1}}}},"u":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1,"d":{"docs":{},"df":0,"e":{"docs":{},"df":0,"n":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":1.7320508075688772},"http://localhost:8080/register-docs/":{"tf":1.7320508075688772}},"df":2,"'":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1},"_":{"docs":{},"df":0,"i":{"docs":{},"df":0,"d":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}}}}}}},"u":{"docs":{},"df":0,"b":{"docs":{},"df":0,"m":{"docs":{},"df":0,"i":{"docs":{},"df":0,"s":{"docs":{},"df":0,"s":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}},"s":{"docs":{},"df":0,"e":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}},"m":{"docs":{},"df":0,"m":{"docs":{},"df":0,"a":{"docs":{},"df":0,"r":{"docs":{},"df":0,"i":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}}},"p":{"docs":{},"df":0,"p":{"docs":{},"df":0,"o":{"docs":{},"df":0,"s":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}}},"y":{"docs":{},"df":0,"s":{"docs":{},"df":0,"t":{"docs":{},"df":0,"e":{"docs":{},"df":0,"m":{"docs":{"http://localhost:8080/":{"tf":1.7320508075688772},"http://localhost:8080/register-docs/":{"tf":1.0}},"df":2}}}}}},"t":{"docs":{},"df":0,"a":{"docs":{},"df":0,"g":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1},"k":{"docs":{},"df":0,"i":{"docs":{},"df":0,"m":{"docs":{},"df":0,"a":{"docs":{},"df":0,"t":{"docs":{},"df":0,"a":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":2}}}}}},"r":{"docs":{},"df":0,"g":{"docs":{},"df":0,"e":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}}},"e":{"docs":{},"df":0,"m":{"docs":{},"df":0,"p":{"docs":{},"df":0,"_":{"docs":{},"df":0,"k":{"docs":{},"df":0,"e":{"docs":{},"df":0,"y":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":1}}}},"o":{"docs":{},"df":0,"r":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":2,"a":{"docs":{},"df":0,"r":{"docs":{},"df":0,"i":{"docs":{"http://localhost:8080/register-docs/":{"tf":2.0}},"df":1}}}}}}},"s":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}},"h":{"docs":{},"df":0,"a":{"docs":{"http://localhost:8080/jwt/":{"tf":1.4142135623730951}},"df":1,"n":{"docs":{},"df":0,"k":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}},"e":{"docs":{},"df":0,"m":{"docs":{},"df":0,"s":{"docs":{},"df":0,"e":{"docs":{},"df":0,"l":{"docs":{},"df":0,"v":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}}}},"o":{"docs":{},"df":0,"u":{"docs":{},"df":0,"g":{"docs":{},"df":0,"h":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}}},"i":{"docs":{},"df":0,"m":{"docs":{},"df":0,"e":{"docs":{"http://localhost:8080/":{"tf":1.4142135623730951},"http://localhost:8080/jwt/":{"tf":2.0}},"df":2}}},"o":{"docs":{},"df":0,"d":{"docs":{},"df":0,"o":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.4142135623730951}},"df":1}},"k":{"docs":{},"df":0,"e":{"docs":{},"df":0,"n":{"docs":{"http://localhost:8080/jwt/":{"tf":1.0}},"df":1}}},"o":{"docs":{},"df":0,"l":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}},"r":{"docs":{},"df":0,"a":{"docs":{},"df":0,"n":{"docs":{},"df":0,"s":{"docs":{},"df":0,"a":{"docs":{},"df":0,"c":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":3.4641016151377544},"http://localhost:8080/jwt/":{"tf":1.4142135623730951},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":3}}}}}}}},"u":{"docs":{},"df":0,"b":{"docs":{},"df":0,"e":{"docs":{},"df":0,"r":{"docs":{},"df":0,"g":{"docs":{},"df":0,"r":{"docs":{},"df":0,"e":{"docs":{},"df":0,"n":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":2}}}}}}},"l":{"docs":{},"df":0,"t":{"docs":{},"df":0,"i":{"docs":{},"df":0,"m":{"docs":{"http://localhost:8080/jwt/":{"tf":1.0}},"df":1}}}},"n":{"docs":{},"df":0,"i":{"docs":{},"df":0,"q":{"docs":{},"df":0,"u":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}},"x":{"docs":{"http://localhost:8080/jwt/":{"tf":1.7320508075688772}},"df":1}}},"p":{"docs":{},"df":0,"d":{"docs":{},"df":0,"a":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}},"o":{"docs":{},"df":0,"n":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}},"s":{"docs":{"http://localhost:8080/":{"tf":3.4641016151377544},"http://localhost:8080/jwt/":{"tf":2.23606797749979},"http://localhost:8080/register-docs/":{"tf":2.0}},"df":3,"e":{"docs":{},"df":0,"r":{"docs":{"http://localhost:8080/register-docs/":{"tf":2.23606797749979}},"df":1,"&":{"docs":{},"df":0,"g":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}}}},"t":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":2}},"v":{"docs":{},"df":0,"1":{"docs":{},"df":0,"_":{"docs":{},"df":0,"5":{"docs":{"http://localhost:8080/jwt/":{"tf":1.0}},"df":1}}},"e":{"docs":{},"df":0,"r":{"docs":{},"df":0,"i":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1,"f":{"docs":{},"df":0,"i":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}},"o":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":2}}},"o":{"docs":{},"df":0,"l":{"docs":{},"df":0,"u":{"docs":{},"df":0,"p":{"docs":{},"df":0,"t":{"docs":{},"df":0,"u":{"docs":{},"df":0,"a":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0},"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":2}}}}}}},"u":{"docs":{},"df":0,"l":{"docs":{},"df":0,"n":{"docs":{},"df":0,"e":{"docs":{},"df":0,"r":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}}}},"w":{"docs":{},"df":0,"a":{"docs":{},"df":0,"r":{"docs":{},"df":0,"p":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}},"s":{"docs":{},"df":0,"n":{"docs":{},"df":0,"'":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}},"y":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}},"e":{"docs":{},"df":0,"'":{"docs":{},"df":0,"r":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}},"b":{"docs":{"http://localhost:8080/jwt/":{"tf":1.0}},"df":1,"s":{"docs":{},"df":0,"i":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}},"l":{"docs":{},"df":0,"c":{"docs":{},"df":0,"o":{"docs":{},"df":0,"m":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}},"l":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}},"i":{"docs":{},"df":0,"t":{"docs":{},"df":0,"h":{"docs":{},"df":0,"o":{"docs":{},"df":0,"u":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}}}},"o":{"docs":{},"df":0,"r":{"docs":{},"df":0,"k":{"docs":{"http://localhost:8080/":{"tf":2.0},"http://localhost:8080/jwt/":{"tf":1.0}},"df":2}}},"r":{"docs":{},"df":0,"a":{"docs":{},"df":0,"p":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}},"y":{"docs":{},"df":0,"o":{"docs":{},"df":0,"u":{"docs":{},"df":0,"r":{"docs":{},"df":0,"s":{"docs":{},"df":0,"e":{"docs":{},"df":0,"l":{"docs":{},"df":0,"f":{"docs":{"http://localhost:8080/":{"tf":1.4142135623730951}},"df":1}}}}}}}}}},"title":{"root":{"docs":{},"df":0,"b":{"docs":{},"df":0,"l":{"docs":{},"df":0,"o":{"docs":{},"df":0,"c":{"docs":{},"df":0,"k":{"docs":{"http://localhost:8080/block-docs/":{"tf":1.0}},"df":1}}}}},"g":{"docs":{},"df":0,"r":{"docs":{},"df":0,"a":{"docs":{},"df":0,"d":{"docs":{},"df":0,"e":{"docs":{},"df":0,"c":{"docs":{},"df":0,"o":{"docs":{},"df":0,"i":{"docs":{},"df":0,"n":{"docs":{"http://localhost:8080/":{"tf":1.0}},"df":1}}}}}}}}},"j":{"docs":{},"df":0,"w":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/jwt/":{"tf":1.0}},"df":1}}},"r":{"docs":{},"df":0,"e":{"docs":{},"df":0,"g":{"docs":{},"df":0,"i":{"docs":{},"df":0,"s":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/register-docs/":{"tf":1.0}},"df":1}}}}}},"t":{"docs":{},"df":0,"r":{"docs":{},"df":0,"a":{"docs":{},"df":0,"n":{"docs":{},"df":0,"s":{"docs":{},"df":0,"a":{"docs":{},"df":0,"c":{"docs":{},"df":0,"t":{"docs":{"http://localhost:8080/transaction-docs/":{"tf":1.0}},"df":1}}}}}}}}}}},"documentStore":{"save":true,"docs":{"http://localhost:8080/":{"body":"Welcome to Gradecoin!\nBlockchains are incredibly simple yet can appear very complicated, we will see how they work and practice programming production cryptography code.\nThis 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.\nA quick summary: authenticate yourself to the system using public key encryption.\nCraft Transaction proposals and tag them using JWTs.\nWhen there are enough transactions then you can propose Blocks in the same way.\nBlocks need to be mined beforehand using Proof-of-work, or brute force.\nGradecoin offers 3 endpoints at /register, /block and /transaction. You can only send GET requests to /block and /transaction without authorization.\nThe server is programmed in RESTful architecture, there are no DELETE, PUT or UPDATE operations, though.\nGradecoin uses a Proof-of-work block accepting mechanism. It uses single round Blake2s hashing which produces 256-bit (64 hexadecimal characters) output. The target hash is 24 bits or 6 hexadecimal characters of 0. During testing, I could mine a block on average around 2-7 minutes.\n\nWe're expecting you to use existing tools and implementations. Standards are hard. Don't roll your own crypto. Feel free to ask questions. Collaborate.\n\nYou might ask,\n\nBut if nobody has any Gradecoin then how do we have transactions?\n\nThere is a bank! Their public key is 31415926535897932384626433832795028841971693993751058209749445923 and they have some amount of Gradecoin preloaded. It's also the only account that you can send transactions requests to yourself.\nCoinbase\nThe first transactions of a block is called the coinbase. They are the author of the block proposal and if the block is accepted then they get compensated for their efforts with some Gradecoin.\nPublic Key Signatures\nGradecoin uses 2048 bit RSA keyspairs.\nServices\n/register\n\nStudent creates their own 2048 bit RSA keypair\nDownloads Gradecoin's Public Key from Moodle\nEncrypts their JSON wrapped Public Key, Student ID and one time passwd using Gradecoin's Public Key\nTheir public key is now in our database and can be used to sign their JWT's during requests\n\n/transaction\n\nYou can offer a Transaction - POST request\n\nThe request should have Authorization\nThe request header should be signed by the Public Key of the by field in the transaction\n\n\nfetch the list of Transactions - GET request\n\n/block\n\noffer a [schema::Block] - POST request\n\nThe request should have Authorization\nThe [schema::Block::transaction_list] of the block should be a subset of [schema::Db::pending_transactions]\n\n\nfetch the last accepted [schema::Block] - GET request\n\nAuthorization: The request header should have Bearer JWT.Token signed with Student Public Key\nQuestions\nThis all sound complicated!\n\nI've drawn inspiration from actual Bitcoin transactions and warp. The simplicity of the system is how little interfaces it has.\nDon't know where to start? Gradecoin uses RESTful API; simple curl commands or even your browser will work! This website can help as well.\nJWT Debugger and the corresponding RFC\nRemember 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?\n\nI found a bug!\nThank you! Please let me know so we can solve it.\nI hacked the server!\nThat 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.\nSubmission?\nAt the end of the simulation, your Gradecoin balance will be your grade. I will also expect a unique client programmed in either;\n\nc\nc++\nperl\nrust\npython\nrandom assortment of bash scripts\n\nIf your favourite programming language is missing please let me know 🤷?\nCan my friends play?\nSadly, no. Student's who are enrolled to the class will receive one-time-passwords for authentication.\nHow and or Why?\n\nBuilt, with Rust\n\n","id":"http://localhost:8080/","title":"Gradecoin"},"http://localhost:8080/block-docs/":{"body":"Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod\ntempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At\nvero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd\nubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.\n","id":"http://localhost:8080/block-docs/","title":"Blocks"},"http://localhost:8080/jwt/":{"body":"\nJSON Web Tokens are representations of claims, or authorization proofs that fit into the Header of HTTP requests.\n\nHow?\nJWTs are used as the MAC of operations that require authorization:\n\nblock proposal\ntransaction proposal.\n\nThey are send alongside the JSON request body in the Header;\nAuthorization: Bearer aaaaaa.bbbbbb.ccccc\n\nGradecoin uses 3 fields for the JWTs;\n{\n\"tha\": \"Hash of the payload, check invididual references\",\n\"iat\": \"Issued At, Unix Time\",\n\"exp\": \"Expiration Time, epoch\"\n}\n\n\ntha is explained in blocks and transactions documentations.\niat when the JWT was created in Unix Time format\nexp when the JWT will expire & be rejected in Unix Time\n\nAlgorithm\nWe are using RS256, RSASSA-PKCS1-v1_5 using SHA-256. The JWTs you encode with your private RSA key will be decoded using the public key you have authenticated with. You can see how the process works here.\nReferences\n\nRFC, the ultimate reference\nJWT Debugger\n\n","id":"http://localhost:8080/jwt/","title":"JWT"},"http://localhost:8080/register-docs/":{"body":"POST request to /register endpoint\nLets a [User] (=student) to authenticate themselves to the system\nThis request can be rejected if the payload is malformed (=not authenticated properly) or if\nthe [AuthRequest.user_id] of the request is not in the list of users that can hold a Gradecoin account\nAuthentication Process\n\n\nGradecoin's Public Key (gradecoin_public_key) is listed on moodle.\n\n\nGradecoin's Private Key (gradecoin_private_key) is loaded here\n\n\nStudent picks a short temporary key (k_temp)\n\n\nCreates a JSON object (auth_plaintext) with their metu_id and public key in base64 (PEM) format (S_PK):\n{\nstudent_id: \"e12345\",\npasswd: \"15 char secret\"\npublic_key: \"---BEGIN PUBLIC KEY...\"\n}\n\n\nEncrypts the serialized string of auth_plaintext with 128 bit block AES in CBC mode with Pkcs7 padding using the temporary key (k_temp), the result is auth_ciphertext TODO should this be base64'd?\n\n\nThe temporary key student has picked k_temp is encrypted using RSA with OAEP padding scheme\nusing sha256 with gradecoin_public_key (TODO base64? same as above), giving us key_ciphertext\n\n\nThe payload JSON object (auth_request) can be JSON serialized now:\n{\nc: \"auth_ciphertext\"\nkey: \"key_ciphertext\"\n}\n\n\nGradecoin Side\n\nUpon receiving, we first RSA decrypt with OAEP padding scheme using SHA256 with gradecoin_private_key as the key and auth_request.key key as the ciphertext, receiving temp_key (this is the temporary key chosen by stu\nWith temp_key, we can AES 128 Cbc Pkcs7 decrypt the auth_request.c, giving us\nauth_plaintext\nThe auth_plaintext String can be deserialized to [AuthRequest]\nWe then verify the payload and calculate the User fingerprint\nFinally, create the new [User] object, insert to users HashMap <fingerprint, User>\n\n","id":"http://localhost:8080/register-docs/","title":"Register"},"http://localhost:8080/transaction-docs/":{"body":"Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod\ntempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At\nvero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd\nubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.\n","id":"http://localhost:8080/transaction-docs/","title":"Transactions"}},"docInfo":{"http://localhost:8080/":{"body":371,"title":1},"http://localhost:8080/block-docs/":{"body":48,"title":1},"http://localhost:8080/jwt/":{"body":96,"title":1},"http://localhost:8080/register-docs/":{"body":166,"title":1},"http://localhost:8080/transaction-docs/":{"body":48,"title":1}},"length":5},"lang":"English"}; \ No newline at end of file diff --git a/site/public/transaction-docs/index.html b/site/public/transaction-docs/index.html index 8c35895..bf170ba 100644 --- a/site/public/transaction-docs/index.html +++ b/site/public/transaction-docs/index.html @@ -84,7 +84,7 @@ ubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.

- ⁂ +Built For ⁂ CENG489 ⁂ Introduction to Computer Security
diff --git a/site/templates/index.html b/site/templates/index.html index 70223a5..997d004 100644 --- a/site/templates/index.html +++ b/site/templates/index.html @@ -9,36 +9,39 @@ Gradecoin is the latest cutting edge blockchain technology agile grading framework that drives organic engagement and other buzzwords, with big data mining search engine optimization
- - - -
- +
⇩ Learn How ⇩
{% endblock hero %} {% block footer %}
- ⁂ +Built For ⁂ CENG489 ⁂ Introduction to Computer Security
{% endblock footer %} -- cgit v1.2.3-70-g09d2 From 57d833094c4e5f54d2a8ad8816595eea7ddc21de Mon Sep 17 00:00:00 2001 From: Yigit Sever Date: Thu, 15 Apr 2021 13:10:18 +0300 Subject: Remove unused code --- src/error.rs | 38 -------------------------------------- src/lib.rs | 1 - 2 files changed, 39 deletions(-) delete mode 100644 src/error.rs diff --git a/src/error.rs b/src/error.rs deleted file mode 100644 index 7339a06..0000000 --- a/src/error.rs +++ /dev/null @@ -1,38 +0,0 @@ -use log::warn; -use serde::Serialize; -use std::convert::Infallible; -use warp::{http::StatusCode, Rejection, Reply}; - -#[derive(Serialize)] -struct ErrorResponse { - message: String, -} - -pub async fn handle_rejection(err: Rejection) -> std::result::Result { - let code; - let message; - - if err.is_not_found() { - code = StatusCode::NOT_FOUND; - message = "Requested resource is not found"; - } else if let Some(_) = err.find::() { - code = StatusCode::BAD_REQUEST; - message = "Error: JSON body is not formatted correctly, check your payload"; - } else if let Some(_) = err.find::() { - code = StatusCode::METHOD_NOT_ALLOWED; - message = "Error: Authorization header missing, cannot authorize"; - } else if let Some(_) = err.find::() { - code = StatusCode::METHOD_NOT_ALLOWED; - message = "Error: method not allowed on this endpoint"; - } else { - warn!("unhandled error: {:?}", err); - code = StatusCode::INTERNAL_SERVER_ERROR; - message = "Internal Server Error"; - } - - let json = warp::reply::json(&ErrorResponse { - message: message.to_owned(), - }); - - Ok(warp::reply::with_status(json, code)) -} diff --git a/src/lib.rs b/src/lib.rs index 7a24f9f..82fb51f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -22,7 +22,6 @@ //! `Authorization`: The request header should have Bearer JWT.Token signed with Student Public Key pub mod custom_filters; -pub mod error; pub mod handlers; pub mod routes; pub mod schema; -- cgit v1.2.3-70-g09d2 From cd6839a3c6596f5e4197c6696b95efbf0c76d2ca Mon Sep 17 00:00:00 2001 From: Yigit Sever Date: Thu, 15 Apr 2021 13:11:13 +0300 Subject: Move on to production --- TODO.md | 5 +++- site/config.toml | 2 +- site/content/_index.md | 2 +- site/public/block-docs/index.html | 14 ++++----- site/public/index.html | 50 ++++++++++++++++----------------- site/public/jwt/index.html | 22 +++++++-------- site/public/register-docs/index.html | 18 ++++++------ site/public/robots.txt | 2 +- site/public/search_index.en.js | 2 +- site/public/sitemap.xml | 10 +++---- site/public/transaction-docs/index.html | 14 ++++----- 11 files changed, 72 insertions(+), 69 deletions(-) diff --git a/TODO.md b/TODO.md index 0fba155..83e34a7 100644 --- a/TODO.md +++ b/TODO.md @@ -1,5 +1,8 @@ # TODO +- [ ] IV is ARRAY NO +- [ ] RESTORE STUDENTS FROM DISK + ## Office Hour/Recitation - [ ] Should give a little pointers but not too much, I think at first this is going to seem hard to many students but it should become fairly easy after some little pointers @@ -31,9 +34,9 @@ - [ ] Valid JSON with missing fields - [ ] Valid JSON with extra fields - ## Testnet - [ ] CHAOS MODE, 3 different coins, combine them to make 1 gradecoin +- [ ] [SQLite](https://unixsheikh.com/articles/sqlite-the-only-database-you-will-ever-need-in-most-cases.html), not PostgreSQL ## Done & Brag - [x] Switch to RwLock (parking_lot) (done at 2021-04-07 03:43, two possible schemes to represent inner Db (ledger) in code) diff --git a/site/config.toml b/site/config.toml index 8754d85..9ade2a8 100644 --- a/site/config.toml +++ b/site/config.toml @@ -1,5 +1,5 @@ # The URL the site will be built for -base_url = "http://localhost:8080" +base_url = "https://gradecoin.xyz" theme = "juice" diff --git a/site/content/_index.md b/site/content/_index.md index bf33eef..4ad0544 100644 --- a/site/content/_index.md +++ b/site/content/_index.md @@ -82,4 +82,4 @@ If your favourite programming language is missing please let me know 🤷? Sadly, no. Student's who are enrolled to the class will receive one-time-passwords for authentication. ## How and or Why? -- [Built](https://xkcd.com/2314/), with [Rust](https://xkcd.com/2418/) +- [Built](https://xkcd.com/2314/), [with](https://lofi.cafe/) [Rust](https://xkcd.com/2418/) diff --git a/site/public/block-docs/index.html b/site/public/block-docs/index.html index 3da4e8b..84a1463 100644 --- a/site/public/block-docs/index.html +++ b/site/public/block-docs/index.html @@ -24,7 +24,7 @@ - + @@ -34,22 +34,22 @@
- +