Common stuff for all my devices' web server pages: css, login, log, ipv4, ipv6, firmware update, clock, reset info etc.

Dependents:   oldheating gps motorhome heating

Security

A password has to be set whenever there has been a software reset. Resets following faults or power on do not require a new password as the hash is restored from the RTC GPREG register.

The password is not saved on the device; instead a 32 bit hash of the password is saved. It would take 2^31 attempts to brute force the password: this could be done in under a month if an attempt were possible every millisecond. To prevent this a 200 ms delay is introduced in the reply to the login form, that gives a more reasonable 13 years to brute force the password.

Once the password is accepted a random session id is created. This is 36 bit to give six base 64 characters but without an extra delay. If an attempt could be made every ms then this would still take over a year to brute force.

The most likely attack would to use a dictionary with, say, 10 million entries against the password which would still take 20 days to do.

Committer:
andrewboyson
Date:
Tue Sep 24 18:16:47 2019 +0000
Revision:
130:9a5b8fe308f1
Parent:
110:8ab752842d25
Child:
160:daa94b75b94c
Added http

Who changed what in which revision?

UserRevisionLine numberNew contents of line
andrewboyson 75:3831a4b5a230 1 " * { font-size:6vw; box-sizing: border-box; }\r\n"
andrewboyson 14:c3c43c8faf0e 2 "@media (min-width: 600px) { * { font-size:36px; } }\r\n"
andrewboyson 77:4689596a2f3f 3 ".line { display:flex; justify-content:space-between; align-items:center; width:15em; }\r\n"
andrewboyson 14:c3c43c8faf0e 4 "\r\n"
andrewboyson 99:5aa33c306167 5 "* { font-family:Segoe UI, Calibri, Helvetica, Arial, sans-serif; }\r\n"
andrewboyson 99:5aa33c306167 6 "code, textarea, input[type=text] { font-family:Consolas, Lucida Console, Droid Sans Mono, Courier New, Courier, monospace; white-space:pre; }\r\n"
andrewboyson 99:5aa33c306167 7 "body { margin-left:0.1em; line-height:1.1em; padding:0; border:0; }\r\n"
andrewboyson 99:5aa33c306167 8 "h1 { color:darkblue; font-size:120%; font-weight:normal; margin-bottom:0.3em; }\r\n"
andrewboyson 99:5aa33c306167 9 "h2 { color:darkblue; font-size:110%; font-weight:normal; margin-bottom:0.3em; }\r\n"
andrewboyson 99:5aa33c306167 10 "a { text-decoration:none; }\r\n"
andrewboyson 99:5aa33c306167 11 "div { line-height:1.2em; }\r\n"
andrewboyson 99:5aa33c306167 12 "form { line-height:1.2em; margin:0; }\r\n"
andrewboyson 99:5aa33c306167 13 "button, input[type=submit] { border-radius:0.2em; border:0; box-shadow:none; margin-top:0.3em; }\r\n"
andrewboyson 49:66f5471a19dc 14 "button:hover { color:red; }\r\n"
andrewboyson 49:66f5471a19dc 15 "input[type=submit]:hover { color:red; }\r\n"
andrewboyson 49:66f5471a19dc 16 "input[type=text] { border:thin none gray; margin:0; padding:0; color:darkblue; text-align:right; }\r\n"
andrewboyson 14:c3c43c8faf0e 17 "\r\n"
andrewboyson 14:c3c43c8faf0e 18 ".toggle { display:inline-block; position:relative; cursor:pointer; width: 1.2em; height: 0.6em; }\r\n"
andrewboyson 61:b779b2818d0c 19 ".slot { background-color:lightsteelblue; display:block; position:absolute; top:0.1em; left:0.1em; bottom:0.1em; right:0.1em; border-radius:0.6em; transition:background 0.4s; }\r\n"
andrewboyson 61:b779b2818d0c 20 ".knob { background-color:steelblue; display:block; position:absolute; top:0.0em; left:0.0em; bottom:0.0em; width:0.6em; border-radius:0.6em; transition:background 0.4s, margin 0.4s; }\r\n"
andrewboyson 61:b779b2818d0c 21 ".toggle[dir=rtl] > .slot { background-color:lightsteelblue; }\r\n"
andrewboyson 61:b779b2818d0c 22 ".toggle[dir=rtl] > .knob { background-color:royalblue; margin-left:0.6em}\r\n"
andrewboyson 61:b779b2818d0c 23 ".led { background-color:lightgray; display:inline-block; width:0.6em; height:0.6em; border-radius:50%; }\r\n"
andrewboyson 61:b779b2818d0c 24 ".led[dir=rtl] { background-color:royalblue; }\r\n"
andrewboyson 14:c3c43c8faf0e 25 "\r\n"
andrewboyson 14:c3c43c8faf0e 26 ".hamburger { display:inline-block; width:1em}\r\n"
andrewboyson 14:c3c43c8faf0e 27 ".bar { height:0.15em; background-color:#111; border-radius:0.15em; }\r\n"
andrewboyson 14:c3c43c8faf0e 28 ".space { height:0.2em; }\r\n"