<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/rss-style.xsl" type="text/xsl"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	    xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	     xmlns:dc="http://purl.org/dc/elements/1.1/"
	   xmlns:atom="http://www.w3.org/2005/Atom"
	     xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	  xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>
<channel>
	<title>Proton &#8211; Terence Eden’s Blog</title>
	<atom:link href="https://shkspr.mobi/blog/tag/proton/feed/" rel="self" type="application/rss+xml" />
	<link>https://shkspr.mobi/blog</link>
	<description>Regular nonsense about tech and its effects 🙃</description>
	<lastBuildDate>Fri, 01 Aug 2025 09:31:17 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://shkspr.mobi/blog/wp-content/uploads/2023/07/cropped-avatar-32x32.jpeg</url>
	<title>Proton &#8211; Terence Eden’s Blog</title>
	<link>https://shkspr.mobi/blog</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title><![CDATA[Some minor bugs in Proton's new Authenticator app]]></title>
		<link>https://shkspr.mobi/blog/2025/08/some-minor-bugs-in-protons-new-authenticator-app/</link>
					<comments>https://shkspr.mobi/blog/2025/08/some-minor-bugs-in-protons-new-authenticator-app/#comments</comments>
				<dc:creator><![CDATA[@edent]]></dc:creator>
		<pubDate>Sun, 31 Aug 2025 11:34:55 +0000</pubDate>
				<category><![CDATA[/etc/]]></category>
		<category><![CDATA[2fa]]></category>
		<category><![CDATA[CyberSecurity]]></category>
		<category><![CDATA[MFA]]></category>
		<category><![CDATA[Proton]]></category>
		<category><![CDATA[totp]]></category>
		<guid isPermaLink="false">https://shkspr.mobi/blog/?p=62350</guid>

					<description><![CDATA[I maintain a a test-suite for TOTP codes. It contains a bunch of codes which adhere to the specification, some of which stretch it to breaking point, and some that are completely invalid.  These codes are a good starting point for checking whether a 2FA / MFA app works correctly.  Proton have release a swish new authenticator app for Android, iOS, Mac, Linux and Windows. Sadly, their open source…]]></description>
										<content:encoded><![CDATA[<p>I maintain a <a href="https://shkspr.mobi/blog/2025/03/towards-a-test-suite-for-totp-codes/">a test-suite for TOTP codes</a>. It contains a bunch of codes which adhere to the specification, some of which stretch it to breaking point, and some that are completely invalid.  These codes are a good starting point for checking whether a 2FA / MFA app works correctly.</p>

<p>Proton have release a swish <a href="https://proton.me/authenticator">new authenticator app</a> for Android, iOS, Mac, Linux and Windows. Sadly, their <a href="https://github.com/protonpass/android-pass">open source repository</a> doesn't allow for bug reports so I'm blogging in public instead.</p>

<p>The good news is, the majority of tests pass. It accepts a wide range of acceptable codes and refuses to store most broken ones. There are a few niggles though.  None of these are severe security issues, but they probably ought to be fixed.</p>

<h2 id="very-long-codes"><a href="https://shkspr.mobi/blog/2025/08/some-minor-bugs-in-protons-new-authenticator-app/#very-long-codes">Very long codes</a></h2>

<p>The maximum number of digits which can be generated by the standard TOTP algorithm is 10.  Proton happily scans codes containing 1 - 9 digits, but complains about 10 digit codes.  So this fails:</p>

<p><code>otpauth://totp/issuer%3Aaccount%20name?secret=QWERTYUIOP&amp;digits=10&amp;issuer=issuer&amp;algorithm=SHA1&amp;period=30</code></p>

<img src="https://shkspr.mobi/blog/wp-content/uploads/2025/08/10digit.webp" alt="QR code for a 10 digit TOTP." width="360" height="360" class="aligncenter size-full wp-image-62370">

<p>The TOTP RFC says:</p>

<blockquote><p>Basically, the output of the HMAC-SHA-1 calculation is truncated to obtain user-friendly values</p>

<p><a href="https://datatracker.ietf.org/doc/html/rfc6238#section-1.2">1.2. Background</a></p></blockquote>

<p>But doesn't say how far to truncate.</p>

<p>There's nothing I can see in the spec that <em>prevents</em> an implementer using all 10.</p>

<p><strong>Risk:</strong> The user may not be able to store a valid code.</p>

<p><strong>Recommendation:</strong> Allow 10 digit codes.</p>

<h2 id="invalid-secrets"><a href="https://shkspr.mobi/blog/2025/08/some-minor-bugs-in-protons-new-authenticator-app/#invalid-secrets">Invalid Secrets</a></h2>

<p>Here we get to yet another <a href="https://shkspr.mobi/blog/2025/02/the-least-secure-totp-code-possible/">deficiency in the TOTP specification</a>.  How is a secret defined?</p>

<p>Google says the secret is:</p>

<blockquote><p>an arbitrary key value encoded in Base32 according to RFC 3548. The padding specified in RFC 3548 section 2.2 is not required and should be omitted.</p></blockquote>

<p>Whereas Apple says it is:</p>

<blockquote><p>An arbitrary key value encoded in Base32. Secrets should be at least 160 bits.</p></blockquote>

<p>Either way, <a href="https://www.rfc-editor.org/rfc/rfc3548#section-5">the Base32 alphabet</a> contains only uppercase letters and a few numbers.  What happens if we give it a secret like <code>QWERT!£$%^)*(YUIOP</code>?</p>

<img src="https://shkspr.mobi/blog/wp-content/uploads/2025/08/invaid-secret.webp" alt="QR code for an invalid secret." width="360" height="360" class="aligncenter size-full wp-image-62371">

<p>Proton Authenticator just accepts it. It stores the full secret but I'm not sure how it generates the code based on it.</p>

<p><strong>Risk:</strong> The code may be generated incorrectly.</p>

<p><strong>Recommendation:</strong> Warn the user that the secret may be invalid and that a correct 2FA code cannot be guaranteed.</p>

<h2 id="issuer-mismatch"><a href="https://shkspr.mobi/blog/2025/08/some-minor-bugs-in-protons-new-authenticator-app/#issuer-mismatch">Issuer Mismatch</a></h2>

<p>In this example, the first issuer is example.com but the second issuer is microsoft.com</p>

<p><code>otpauth://totp/example.com%3Aaccount%20name?secret=QWERTYUIOP&amp;digits=6&amp;issuer=microsoft.com&amp;algorithm=SHA1&amp;period=30</code></p>

<p>What should the TOTP reader do with this? Proton chooses microsoft.com.</p>

<p>This is something which, again, is inconsistent between major providers.</p>

<p>Google says this parameter is:</p>

<blockquote><p><strong>Strongly Recommended</strong> The issuer parameter is a string value indicating the provider or service this account is associated with, URL-encoded according to RFC 3986. If the issuer parameter is absent, issuer information may be taken from the issuer prefix of the label. If both issuer parameter and issuer label prefix are present, they should be equal.</p></blockquote>

<p>Apple merely says:</p>

<blockquote><p>The domain of the site or app. The password manager uses this field to suggest credentials when setting up a new code generator.</p></blockquote>

<p>Yubico equivocates with</p>

<blockquote><p>The issuer parameter is recommended, but it can be absent. Also, the issuer parameter and issuer string in label should be equal.</p></blockquote>

<p><strong>Risk:</strong> The code may be displayed with the wrong issuer.</p>

<p><strong>Recommendation:</strong> Warn the user that there are multiple issuers. Let them choose which one is correct.</p>

<h2 id="dealing-with-defaults"><a href="https://shkspr.mobi/blog/2025/08/some-minor-bugs-in-protons-new-authenticator-app/#dealing-with-defaults">Dealing With Defaults</a></h2>

<p>What should a TOTP app do if there is missing information? Proton does the following:</p>

<ul>
<li>If the code has no number set for digits, it defaults to 6</li>
<li>If the code has no time set for period, it defaults to 30</li>
<li>If the code has no algorithm, it defaults to SHA1</li>
</ul>

<p><strong>Risk:</strong> Low. The user normally has to confirm with the issuer that the the TOTP code has been correctly stored.</p>

<p><strong>Recommendation:</strong> Let the user know that the code has missing data and may not be correct.</p>

<h2 id="odd-labels"><a href="https://shkspr.mobi/blog/2025/08/some-minor-bugs-in-protons-new-authenticator-app/#odd-labels">Odd Labels</a></h2>

<p>The label allows you to have multiple codes for the same service. For example <code>Big Bank:Personal Account</code> and <code>Big Bank:Family Savings</code>.  The Google spec is slightly confusing:</p>

<blockquote><p>The issuer prefix and account name should be separated by a literal or url-encoded colon, and optional spaces may precede the account name. Neither issuer nor account name may themselves contain a colon.</p></blockquote>

<p>What happens if there are spaces before the account name?</p>

<p><code>otpauth://totp/Spaces:%20%20%20%20%20%20%20%20%20%20%20%20test%40example.com?secret=QWERTYUIOP&amp;digits=6&amp;issuer=&amp;algorithm=SHA1&amp;period=30</code>
<img src="https://shkspr.mobi/blog/wp-content/uploads/2025/08/spaces.webp" alt="QR code for a TOTP." width="400" height="400" class="aligncenter size-full wp-image-62374"></p>

<p>Proton strips the spaces (probably wise) but also removes the issuer.</p>

<p><strong>Risk:</strong> The user will not know which account the code is for.</p>

<p><strong>Recommendation:</strong> Keep the issuer.</p>

<h2 id="timeline"><a href="https://shkspr.mobi/blog/2025/08/some-minor-bugs-in-protons-new-authenticator-app/#timeline">Timeline</a></h2>

<p>These aren't particularly high severity bugs, nevertheless I like to give organisations a bit of time to respond.</p>

<ul>
<li>2025-07-31 - Discovered.</li>
<li>2025-08-01 - Disclosed <a href="https://bsky.app/profile/proton.me/post/3lvbnajumh22e">via a web form</a>.</li>
<li>2025-08-31 - Automatically published.</li>
</ul>

<h2 id="next-steps"><a href="https://shkspr.mobi/blog/2025/08/some-minor-bugs-in-protons-new-authenticator-app/#next-steps">Next Steps</a></h2>

<ul>
<li>If you're a user, <a href="https://codeberg.org/edent/TOTP_Test_Suite">please contribute tests</a> or give feedback.</li>
<li>If you're a developer, please check your app conforms to the specification.</li>
<li>If you're from a security company - wanna help me write up a proper RFC so this doesn't cause issues in the future?</li>
</ul>
<img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=62350&HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager">]]></content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2025/08/some-minor-bugs-in-protons-new-authenticator-app/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title><![CDATA[Can you trust ProtonApps.com?]]></title>
		<link>https://shkspr.mobi/blog/2024/03/can-you-trust-protonapps-com/</link>
					<comments>https://shkspr.mobi/blog/2024/03/can-you-trust-protonapps-com/#comments</comments>
				<dc:creator><![CDATA[@edent]]></dc:creator>
		<pubDate>Mon, 11 Mar 2024 12:34:41 +0000</pubDate>
				<category><![CDATA[/etc/]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[privacy]]></category>
		<category><![CDATA[Proton]]></category>
		<guid isPermaLink="false">https://shkspr.mobi/blog/?p=49864</guid>

					<description><![CDATA[I&#039;ve recently signed up to the privacy-preserving service Proton.  All the email, calendar, drive, VPN, and other services seem to hang off the proton.me domain.  I wanted to download the Android apps to my phone - without using the Google Play Store.  The VPN app is on F-Droid but none of the others are. So, because I&#039;m lazy, I Googled &#34;Download Proton Mail&#34;.  I landed on…]]></description>
										<content:encoded><![CDATA[<p>I've recently signed up to the privacy-preserving service <a href="https://proton.me/">Proton</a>.  All the email, calendar, drive, VPN, and other services seem to hang off the proton.<strong>me</strong> domain.</p>

<p>I wanted to download the Android apps to my phone - without using the Google Play Store.  The <a href="https://f-droid.org/en/packages/ch.protonvpn.android/">VPN app is on F-Droid</a> but none of the others are. So, because I'm lazy, I Googled "Download Proton Mail".</p>

<p>I landed on <a href="https://protonapps.com/"></a><a href="https://protonapps.com/">https://protonapps.com/</a>.</p>

<img src="https://shkspr.mobi/blog/wp-content/uploads/2024/03/protonapps-fs8.png" alt="Screenshot of the ProtonApps page." width="929" height="593" class="aligncenter size-full wp-image-49867">

<p>It <em>looks</em> like a genuine site. But is it?  .me is signed by Let's Encrypt, whereas .com is signed by Amazon. There is <strong>no link</strong> from Proton.me to ProtonApps.com.  There's nothing I can find that shows it is genuine.</p>

<p>But, let's assume for the moment, that it is legitimate.  What happens when you try to download the Android apps from it?</p>

<ul>
<li><p>The <a href="https://protonapps.com/protonmail-android">email app page</a> links to the <a href="https://github.com/ProtonMail/proton-mail-android/releases">ProtonMail repository on GitHub</a> - there's no link from the .me site to their GitHub. But I'm reasonably sure that's them.</p></li>
<li><p>The <a href="https://protonapps.com/protonvpn-android">VPN app page</a> leads to a <a href="https://github.com/ProtonVPN/android-app/releases"><em>different</em> GitHub organisation</a>! I don't know why they're different organisation. It isn't linked to from the the .me site, nor from the <a href="https://protonvpn.com/"></a><a href="https://protonvpn.com/">https://protonvpn.com/</a> site (yet another domain!)</p></li>
<li><p>The <a href="https://protonapps.com/protoncalendar-android">calendar app page</a> links to <a href="https://protonmail.com/download/CalendarAndroid/ProtonCalendar-Android.apk">ProtonMail.<strong>com</strong></a> - is that them?  The .com redirects to the .me, but anyone can set up a redirect.</p></li>
<li><p>The <a href="https://protonapps.com/protondrive-android">drive app page</a> and the <a href="https://protonapps.com/protonpass-android">Pass app page</a> do both link to Proton.me!</p></li>
</ul>

<p>So there are multiple domains - Proton.me, ProtonApps.com, ProtonMail.com, ProtonVPN.com - and there are at least 2 different GitHub organisations.</p>

<p>How do you tell which ones are legitimate? I signed up and paid on the .me page - so I have high confidence in it.</p>

<p>The <a href="https://mastodon.social/@protonmail/112053863641320051">official Proton Mastodon account</a> says the ProtonApps.com site is legitimate (and the Mastodon account is verified by the .me site).  But you can't expect users to chase through a dozen different pages and enquire on social media just to verify which page is safe.</p>

<p>This is my plea to <em>all</em> developers - simplify your customer-facing infrastructure to make your domains consistent &amp; trustworthy.</p>
<img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=49864&HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager">]]></content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2024/03/can-you-trust-protonapps-com/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
	</channel>
</rss>
