Update back-end code to new 100-120 column coding style.

This commit is contained in:
inference 2022-12-09 09:38:02 +00:00
parent 8fc5a336d6
commit c9fe43c970
Signed by: inference
SSH Key Fingerprint: SHA256:9Pl0nZ2UJacgm+IeEtLSZ4FOESgP1eKCtRflfPfdX9M

View File

@ -5,7 +5,7 @@
<!-- Copyright 2022 Inference --> <!-- Copyright 2022 Inference -->
<!-- License: BSD 3-Clause Clear (with personal content exception) --> <!-- License: BSD 3-Clause Clear (with personal content exception) -->
<!-- 0.3.1.6 --> <!-- 0.3.2.7 -->
<html> <html>
@ -33,25 +33,23 @@
<!-- About me. --> <!-- About me. -->
<h3>About Me</h3> <h3>About Me</h3>
<p>I am Inference, a cybersecurity researcher based in United Kingdom.<br> <p>I am Inference, a cybersecurity researcher based in United Kingdom.<br>
I am the founder, lead developer, and administrator, of Inferencium, a I am the founder, lead developer, and administrator, of Inferencium, a security-focused,
security-focused, privacy-focused, brand of software.<br> privacy-focused, brand of software.<br>
All opinions are my own, and are not necessarily shared with projects or All opinions are my own, and are not necessarily shared with projects or people I am
people I am affiliated with.<br> affiliated with.<br>
<br> <br>
<p>I write about my research and experience in cybersecurity and also physical <p>I write about my research and experience in cybersecurity and also physical security.
security. Most of my postings are security-related, but I occasionally post Most of my postings are security-related, but I occasionally post about other aspects of my
about other aspects of my life.</p> life.</p>
<br> <br>
<p>I am an open source advocate for the preservation and modifiability of <p>I am an open source advocate for the preservation and modifiability of source code. I
source code. I believe source code should be considered human knowledge as believe source code should be considered human knowledge as much as past knowledge and
much as past knowledge and teachings were; it is how modern humanity teachings were; it is how modern humanity survives and runs.<br>
survives and runs.<br> Source code being modifiable allows it to be adapted for use by anyone, whether to add
Source code being modifiable allows it to be adapted features, harden it for increased security and/or privacy, or provide accessibility for
for use by anyone, whether to add features, harden it for increased security disabled users.<br>
and/or privacy, or provide accessibility for disabled users.<br> I am also a modular design advocate for the ability to securely and robustly make changes to
I am also a modular design advocate for the ability to securely and hardware and software without the entire system being affected.</p>
robustly make changes to hardware and software without the entire system
being affected.</p>
<br> <br>
<p>If you want to contact me for any reason, you can use my <p>If you want to contact me for any reason, you can use my
<a class="body-link" href="https://inferencium.net/contact.html" <a class="body-link" href="https://inferencium.net/contact.html"
@ -73,70 +71,85 @@
</tr> </tr>
<tr> <tr>
<td class="table-main">Smartphone</td> <td class="table-main">Smartphone</td>
<td class="table-main"><img src="img/google-pixel_6.png" width="100px" height="100px"/><br> <td class="table-main"><img src="img/google-pixel_6.png"
width="100px" height="100px"/><br>
<br> <br>
Google Pixel 6</td> Google Pixel 6</td>
<td>Google Pixel devices are the best Android devices available on <td>Google Pixel devices are the best Android devices available on the market for
the market for <a class="table-link" href="https://security.googleblog.com/2021/10/
<a class="table-link" href="https://security.googleblog.com/2021/10/pixel-6-setting-new-standard-for-mobile.html" pixel-6-setting-new-standard-for-mobile.html"
>security and privacy</a>.<br> >security and privacy</a>.<br>
<br> <br>
They allow locking the bootloader with a They allow locking the bootloader with a
<a class="table-link" href="https://android.googlesource.com/platform/external/avb/+/master/README.md#pixel-2-and-later" <a class="table-link" href="https://android.googlesource.com/platform/external/avb/+/
>custom Android Verified Boot (AVB) key</a> in order to preserve security and privacy features when installing a custom master/README.md#pixel-2-and-later"
operating system, such as >custom Android Verified Boot (AVB) key</a> in order to preserve security and privacy
<a class="table-link" href="https://source.android.com/docs/security/features/verifiedboot/" features when installing a custom operating system, such as
>verified boot</a> which verifies that the OS has not been corrupted or tampered with, and <a class="table-link" href="https://source.android.com/docs/security/features/
<a class="table-link" href="https://source.android.com/docs/security/features/verifiedboot/verified-boot#rollback-protection" verifiedboot/"
>rollback protection</a> which prevents an adversary from rolling back the OS or firmware version to a >verified boot</a> which verifies that the OS has not been corrupted or tampered with,
previous version with known security vulnerabilities.<br> and
<a class="table-link" href="https://source.android.com/docs/security/features/
verifiedboot/verified-boot#rollback-protection"
>rollback protection</a> which prevents an adversary from rolling back the OS or
firmware version to a previous version with known security vulnerabilities.<br>
<br> <br>
They also include a They also include a
<a class="table-link" href="https://developer.android.com/training/articles/keystore#HardwareSecurityModule" <a class="table-link" href="https://developer.android.com/training/articles/
keystore#HardwareSecurityModule"
>hardware security module</a> (Titan M2, improving on the previous generation >hardware security module</a> (Titan M2, improving on the previous generation
<a class="table-link" href="https://security.googleblog.com/2018/10/building-titan-better-security-through.html" <a class="table-link" href="https://security.googleblog.com/2018/10/
>Titan M</a>) which is extremely resistant to both remote and physical attacks due to being building-titan-better-security-through.html"
completely isolated from the rest of the system, including the operating system. >Titan M</a>) which is extremely resistant to both remote and physical attacks due to
Titan M2 ensures that the device cannot be remotely compromised by requiring the being completely isolated from the rest of the system, including the operating system.
side buttons of the device to be physically pressed for some sensitive operations. Titan M2 ensures that the device cannot be remotely compromised by requiring the side
Titan M2 also takes the role of buttons of the device to be physically pressed for some sensitive operations. Titan M2
<a class="table-link" href="https://source.android.com/docs/security/best-practices/hardware#strongbox-keymaster" also takes the role of
<a class="table-link" href="https://source.android.com/docs/security/best-practices/
hardware#strongbox-keymaster"
>Android StrongBox Keymaster</a>, >Android StrongBox Keymaster</a>,
a <a class="table-link" href="https://source.android.com/docs/security/features/keystore" a <a class="table-link" href="https://source.android.com/docs/security/features/keystore"
>hardware-backed Keystore</a> containing sensitive user keys which are unavailable to >hardware-backed Keystore</a> containing sensitive user keys which are unavailable to
the OS or apps running on it without authorisation from Titan M2 itself. the OS or apps running on it without authorisation from Titan M2 itself.
<a class="table-link" href="https://android-developers.googleblog.com/2018/05/insider-attack-resistance.html" <a class="table-link" href="https://android-developers.googleblog.com/2018/05/
>Insider attack resistance</a> ensures that Titan M2 firmware can be flashed only if the user PIN/password insider-attack-resistance.html"
is already known, making it impossible to backdoor the device without already knowing >Insider attack resistance</a> ensures that Titan M2 firmware can be flashed only if the
these secrets.<br> user PIN/password is already known, making it impossible to backdoor the device without
already knowing these secrets.<br>
<br> <br>
Google Pixel device kernels are compiled with Google Pixel device kernels are compiled with
<a class="table-link" href="https://android-developers.googleblog.com/2018/10/control-flow-integrity-in-android-kernel.html" <a class="table-link" href="https://android-developers.googleblog.com/2018/10/
control-flow-integrity-in-android-kernel.html"
>forward-edge control-flow integrity</a> and >forward-edge control-flow integrity</a> and
<a class="table-link" href="https://security.googleblog.com/2019/10/protecting-against-code-reuse-in-linux_30.html" <a class="table-link" href="https://security.googleblog.com/2019/10/
>backward-edge control-flow integrity</a> to prevent code reuse attacks against protecting-against-code-reuse-in-linux_30.html"
the kernel. MAC address randomisation is >backward-edge control-flow integrity</a> to prevent code reuse attacks against the
<a class="table-link" href="https://android-developers.googleblog.com/2017/04/changes-to-device-identifiers-in.html" kernel. MAC address randomisation is
>implemented well, along with minimal probe requests and randomised initial sequence numbers</a>.<br> <a class="table-link" href="https://android-developers.googleblog.com/2017/04/
changes-to-device-identifiers-in.html"
>implemented well, along with minimal probe requests and randomised initial sequence
numbers</a>.<br>
<br> <br>
Google releases Google releases
<a class="table-link" href="https://source.android.com/docs/security/bulletin/pixel/" <a class="table-link" href="https://source.android.com/docs/security/bulletin/pixel/"
>guaranteed monthly security updates</a>, ensuring Google Pixel devices are >guaranteed monthly security updates</a>, ensuring Google Pixel devices are up-to-date
up-to-date and quickly protected against security vulnerabilities.<br> and quickly protected against security vulnerabilities.<br>
<br> <br>
Pixel 6-series devices are a large improvement over the already very secure and private Pixel 6-series devices are a large improvement over the already very secure and private
previous generation Pixel devices. They replace ARM-based Titan M with RISC-V-based Titan M2, previous generation Pixel devices. They replace ARM-based Titan M with RISC-V-based
reducing trust by removing ARM from the equation. Titan M2 is more resiliant to attacks than Titan M2, reducing trust by removing ARM from the equation. Titan M2 is more resiliant
Titan M, and is to attacks than Titan M, and is
<a class="table-link" href="https://www.tuv-nederland.nl/assets/files/cerfiticaten/2022/09/nscib-cc-22-0228971-cert-final.pdf" <a class="table-link" href="https://www.tuv-nederland.nl/assets/files/cerfiticaten/2022/
09/nscib-cc-22-0228971-cert-final.pdf"
>AVA_VAN.5 certified</a>, the highest level of vulnerability assessment. Google's >AVA_VAN.5 certified</a>, the highest level of vulnerability assessment. Google's
in-house Tensor SoC includes Tensor Security Core, further improving device security.<br> in-house Tensor SoC includes Tensor Security Core, further improving device security.<br>
<br> <br>
Pixel 6-series devices are supported for a Pixel 6-series devices are supported for a
<a class="table-link" href="https://support.google.com/nexus/answer/4457705#zippy=%2Cpixel-and-later" <a class="table-link" href="https://support.google.com/nexus/answer/
>minimum of 5 years from launch</a>, an increase from 4457705#zippy=%2Cpixel-and-later"
previous generations' >minimum of 5 years from launch</a>, an increase from previous generations'
<a class="table-link" href="https://support.google.com/nexus/answer/4457705#zippy=%2Cpixel-xl-a-a-g-and-a-g" <a class="table-link" href="https://support.google.com/nexus/answer/
4457705#zippy=%2Cpixel-xl-a-a-g-and-a-g"
>support lifecycles of 3 years</a>.</td> >support lifecycles of 3 years</a>.</td>
</tr> </tr>
</table> </table>
@ -156,16 +169,17 @@
</tr> </tr>
<tr> <tr>
<td class="table-main">Operating system</td> <td class="table-main">Operating system</td>
<td class="table-main"><img src="img/logo-gentoo_linux.png" width="100px" height="100px"/><br> <td class="table-main"><img src="img/logo-gentoo_linux.png"
width="100px" height="100px"/><br>
<br> <br>
Gentoo Linux</td> Gentoo Linux</td>
<td><a class="table-link" href="https://www.gentoo.org/" <td><a class="table-link" href="https://www.gentoo.org/"
>Gentoo Linux</a> is a highly modular, source-based Linux-based operating system >Gentoo Linux</a> is a highly modular, source-based Linux-based operating system which
which allows vast customisation to tailor the operating system to suit your specific allows vast customisation to tailor the operating system to suit your specific needs.
needs. There are many advantages to such an operating system, with the most notable There are many advantages to such an operating system, with the most notable being the
being the ability to optimise the software for security, privacy, performance, ability to optimise the software for security, privacy, performance, or power usage;
or power usage; however, there are effectively unlimited other use cases, or a however, there are effectively unlimited other use cases, or a combination of multiple
combination of multiple use cases.<br> use cases.<br>
<br> <br>
I have focused on security hardening and privacy hardening, placing performance below I have focused on security hardening and privacy hardening, placing performance below
those aspects, although my system is still very performant. Some of the hardening I those aspects, although my system is still very performant. Some of the hardening I
@ -177,7 +191,7 @@
<a class="table-link" href="https://github.com/GrapheneOS/hardened_malloc/" <a class="table-link" href="https://github.com/GrapheneOS/hardened_malloc/"
>hardened_malloc</a> memory allocator.<br> >hardened_malloc</a> memory allocator.<br>
<br> <br>
You can find my personal Gentoo Linux configuration in my personal You can find my personal Gentoo Linux configurations in my personal
<a class="table-link" href="https://git.inferencium.net/inference/cfg/" <a class="table-link" href="https://git.inferencium.net/inference/cfg/"
>configuration respository</a>.</td> >configuration respository</a>.</td>
<td class="table-main">Open source<br> <td class="table-main">Open source<br>
@ -186,23 +200,26 @@
</tr> </tr>
<tr> <tr>
<td class="table-main">Web browser</td> <td class="table-main">Web browser</td>
<td class="table-main"><img src="img/logo-chromium.png" width="100px" height="100px"/><br> <td class="table-main"><img src="img/logo-chromium.png"
width="100px" height="100px"/><br>
<br> <br>
Chromium</td> Chromium</td>
<td><a class="table-link" href="https://chromium.org/" <td><a class="table-link" href="https://chromium.org/"
>Chromium</a> is a highly secure web browser which is often ahead of other >Chromium</a> is a highly secure web browser which is often ahead of other web browsers
web browsers in security aspects. It has a dedicated security team and a in security aspects. It has a dedicated security team and a very impressive
very impressive
<a class="table-link" href="https://www.chromium.org/Home/chromium-security/brag-sheet/" <a class="table-link" href="https://www.chromium.org/Home/chromium-security/brag-sheet/"
>security brag sheet</a>. >security brag sheet</a>.
Chromium's security features include a strong Chromium's security features include a strong
<a class="table-link" href="https://code.google.com/p/chromium/wiki/LinuxSandboxing" <a class="table-link" href="https://code.google.com/p/chromium/wiki/LinuxSandboxing"
>multi-layer sandbox</a>, >multi-layer sandbox</a>,
strong <a class="table-link" href="https://www.chromium.org/Home/chromium-security/site-isolation" strong <a class="table-link" href="https://www.chromium.org/Home/chromium-security/
site-isolation"
>site isolation</a>, >site isolation</a>,
<a class="table-link" href="https://www.chromium.org/Home/chromium-security/binding-integrity" <a class="table-link" href="https://www.chromium.org/Home/chromium-security/
binding-integrity"
>Binding Integrity</a> memory hardening, and >Binding Integrity</a> memory hardening, and
<a class="table-link" href="https://www.chromium.org/developers/testing/control-flow-integrity/" <a class="table-link" href="https://www.chromium.org/developers/testing/
control-flow-integrity/"
>control-flow integrity (CFI)</a>.</td> >control-flow integrity (CFI)</a>.</td>
<td class="table-main">Open source<br> <td class="table-main">Open source<br>
<br> <br>
@ -221,17 +238,17 @@
</tr> </tr>
<tr> <tr>
<td class="table-main">Operating system</td> <td class="table-main">Operating system</td>
<td class="table-main"><img src="img/logo-grapheneos.png" width="100px" height="100px"/><br> <td class="table-main"><img src="img/logo-grapheneos.png"
width="100px" height="100px"/><br>
<br> <br>
GrapheneOS</td> GrapheneOS</td>
<td><a class="table-link" href="https://grapheneos.org/" <td><a class="table-link" href="https://grapheneos.org/"
>GrapheneOS</a> is a security-hardened, privacy-hardened, secure-by-default >GrapheneOS</a> is a security-hardened, privacy-hardened, secure-by-default
Android-based operating system which implements extensive, systemic security Android-based operating system which implements extensive, systemic security and privacy
and privacy hardening to the Android Open Source Project used as its base hardening to the Android Open Source Project used as its base codebase. Its hardening
codebase. Its hardening includes closing gaps for apps to access sensitive includes closing gaps for apps to access sensitive system information, a secure app
system information, a secure app spawning feature which avoids sharing address spawning feature which avoids sharing address space layout and other secrets AOSP's
space layout and other secrets AOSP's default Zygote app spawning model would default Zygote app spawning model would share,
share,
<a class="table-link" href="https://github.com/GrapheneOS/kernel_gs-gs101/" <a class="table-link" href="https://github.com/GrapheneOS/kernel_gs-gs101/"
>hardened kernel</a>, hardened memory allocator >hardened kernel</a>, hardened memory allocator
(<a class="table-link" href="https://github.com/GrapheneOS/hardened_malloc/" (<a class="table-link" href="https://github.com/GrapheneOS/hardened_malloc/"
@ -245,9 +262,9 @@
<br> <br>
GrapheneOS only supports GrapheneOS only supports
<a class="table-link" href="https://grapheneos.org/faq#device-support" <a class="table-link" href="https://grapheneos.org/faq#device-support"
>high security and well-supported devices</a> which receive >high security and well-supported devices</a> which receive full support from their
full support from their manufacturers, including firmware updates, long support manufacturers, including firmware updates, long support lifecycles, secure hardware, and
lifecycles, secure hardware, and overall high security practices.<br> overall high security practices.<br>
<br> <br>
For an extensive list of features GrapheneOS provides, visit its For an extensive list of features GrapheneOS provides, visit its
<a class="table-link" href="https://grapheneos.org/features/" <a class="table-link" href="https://grapheneos.org/features/"
@ -258,18 +275,22 @@
</tr> </tr>
<tr> <tr>
<td class="table-main">Web browser</td> <td class="table-main">Web browser</td>
<td class="table-main"><img src="img/logo-vanadium.png" width="100px" height="100px"/><br> <td class="table-main"><img src="img/logo-vanadium.png"
width="100px" height="100px"/><br>
<br> <br>
Vanadium</td> Vanadium</td>
<td>Vanadium is a security-hardened, privacy-hardened Chromium-based web browser <td>Vanadium is a security-hardened, privacy-hardened Chromium-based web browser which
which utilises GrapheneOS' operating system hardening to implement stronger utilises GrapheneOS' operating system hardening to implement stronger defenses to the
defenses to the already very secure Chromium web browser. Its hardening alongside already very secure Chromium web browser. Its hardening alongside Chromium's base
Chromium's base security features includes security features includes
<a class="table-link" href="https://github.com/GrapheneOS/Vanadium/blob/13/patches/0081-Implement-UI-for-JIT-site-settings.patch" <a class="table-link" href="https://github.com/GrapheneOS/Vanadium/blob/13/patches/
0081-Implement-UI-for-JIT-site-settings.patch"
>disabling JavaScript just-in-time (JIT) compilation by default</a>, >disabling JavaScript just-in-time (JIT) compilation by default</a>,
<a class="table-link" href="https://github.com/GrapheneOS/Vanadium/blob/13/patches/0051-stub-out-the-battery-status-API.patch" <a class="table-link" href="https://github.com/GrapheneOS/Vanadium/blob/13/patches/
0051-stub-out-the-battery-status-API.patch"
>stubbing out the battery status API to prevent abuse of it</a>, and >stubbing out the battery status API to prevent abuse of it</a>, and
<a class="table-link" href="https://github.com/GrapheneOS/Vanadium/blob/13/patches/0084-Toggle-for-navigating-external-URL-in-incognito.patch" <a class="table-link" href="https://github.com/GrapheneOS/Vanadium/blob/13/patches/
0084-Toggle-for-navigating-external-URL-in-incognito.patch"
>always-on Incognito mode as an option</a>.<br> >always-on Incognito mode as an option</a>.<br>
<br> <br>
Vanadium's source code, including its Chromium patchset, can be found in its Vanadium's source code, including its Chromium patchset, can be found in its
@ -281,7 +302,8 @@
</tr> </tr>
<tr> <tr>
<td class="table-main">Messenger</td> <td class="table-main">Messenger</td>
<td class="table-main"><img src="img/logo-molly.png" width="100px" height="100px"><br> <td class="table-main"><img src="img/logo-molly.png"
width="100px" height="100px"><br>
<br> <br>
Molly</td> Molly</td>
<td><a class="table-link" href="https://molly.im/" <td><a class="table-link" href="https://molly.im/"
@ -290,14 +312,18 @@
>Signal</a> client which hardens Signal by using a variety of >Signal</a> client which hardens Signal by using a variety of
<a class="table-link" href="https://github.com/mollyim/mollyim-android#features" <a class="table-link" href="https://github.com/mollyim/mollyim-android#features"
>unique features</a>, allowing >unique features</a>, allowing
<a class="table-link" href="https://github.com/mollyim/mollyim-android/wiki/Data-Encryption-At-Rest" <a class="table-link" href="https://github.com/mollyim/mollyim-android/wiki/
Data-Encryption-At-Rest"
>locking the database when not in use</a>, and >locking the database when not in use</a>, and
<a class="table-link" href="https://github.com/mollyim/mollyim-android/blob/a81ff7d120adc9d427be17239107343146bad704/app/src/main/java/org/thoughtcrime/securesms/crypto/MasterSecretUtil.java#L91" <a class="table-link" href="https://github.com/mollyim/mollyim-android/blob/
>utilising Android StrongBox</a> to protect user keys using the device's a81ff7d120adc9d427be17239107343146bad704/app/src/main/java/org/thoughtcrime/securesms/
hardware security module.<br> crypto/MasterSecretUtil.java#L91"
>utilising Android StrongBox</a> to protect user keys using the device's hardware
security module.<br>
<br> <br>
Molly is available in Molly is available in
<a class="table-link" href="https://github.com/mollyim/mollyim-android#free-and-open-source" <a class="table-link" href="https://github.com/mollyim/
mollyim-android#free-and-open-source"
>2 flavours</a>:<br> >2 flavours</a>:<br>
<ul> <ul>
<li>Molly, which includes the same proprietary <li>Molly, which includes the same proprietary
@ -312,14 +338,15 @@
</tr> </tr>
<tr> <tr>
<td class="table-main">Messenger</td> <td class="table-main">Messenger</td>
<td class="table-main"><img src="img/logo-conversations.png" width="100px" height="100px"><br> <td class="table-main"><img src="img/logo-conversations.png"
width="100px" height="100px"><br>
<br> <br>
Conversations</td> Conversations</td>
<td><a class="table-link" href="https://conversations.im/" <td><a class="table-link" href="https://conversations.im/"
>Conversations</a> is a well-designed Android >Conversations</a> is a well-designed Android
<a class="table-link" href="https://xmpp.org/" <a class="table-link" href="https://xmpp.org/"
>XMPP</a> client which serves as the de facto XMPP reference client and >XMPP</a> client which serves as the de facto XMPP reference client and has great
has great usability.</td> usability.</td>
<td class="table-main">Open source<br> <td class="table-main">Open source<br>
<br> <br>
(GPLv3-only)</td> (GPLv3-only)</td>