From 39f10ac769aa45446ffec521e6df8cead20bb140 Mon Sep 17 00:00:00 2001 From: Giulio Date: Tue, 19 May 2020 18:00:50 +0200 Subject: [PATCH] Keygen description --- conf/nginx.conf | 0 conf/php.ini | 0 conf/sudoers | 0 keygen/Readme.md | 29 +++++++++++++++++++++++++++++ 4 files changed, 29 insertions(+) create mode 100644 conf/nginx.conf create mode 100644 conf/php.ini create mode 100644 conf/sudoers create mode 100644 keygen/Readme.md diff --git a/conf/nginx.conf b/conf/nginx.conf new file mode 100644 index 0000000..e69de29 diff --git a/conf/php.ini b/conf/php.ini new file mode 100644 index 0000000..e69de29 diff --git a/conf/sudoers b/conf/sudoers new file mode 100644 index 0000000..e69de29 diff --git a/keygen/Readme.md b/keygen/Readme.md new file mode 100644 index 0000000..b462417 --- /dev/null +++ b/keygen/Readme.md @@ -0,0 +1,29 @@ +## Keygen +Il codice responsabile per la generazione della chiave WPA di ogni dispostivo. + +### Pseudocode +``` +function gen_password(mac, serial) { + string password + seed1 = sha256(mac) + seed2 = hex(sha256(serial)) + len = 32 + + mersenne_twister_seed(seed1) + + for (i = 0; i < len; i++) { + password += seed2[mersenne_twister_random_int(0, 64)] + } + + return password +} +``` +### Esempio +``` +MAC: 001122AABBCC +Serial: ccos-0b3a78ed55f198a2ee10 +Seed1: 660c8cb054aa34ae74a263d9bd5d1683c4c12965eedabb5acaf21f3286d0ba7e +Seed2: 348157c94b63c412dd07f07db62cc8c32564f13e9bb0419ebae08958ad1fd3b2 +Indexes: 6 48 14 41 21 53 41 39 0 45 50 4 28 11 9 13 17 8 41 19 21 26 32 57 24 52 46 11 39 20 9 38 +Password: cb1b09be31e5c3b4d4b7022db893efb3 +```