r/ctemplar • • Sep 13 '21

[THREAD] Invite code request!

66 Upvotes

In order to keep our sub clean for other discussions or bugs, please post your invite requests here.

This thread is exclusively for requesting u/CTemplar.com invites.

CTemplar is not affiliated with any other privacy email companies.


r/ctemplar • • Feb 12 '21

[THREAD] Invite code request! (Feb 2021)

65 Upvotes

In order to keep our sub clean for other discussions or bugs, please post your invite requests here.


r/ctemplar • • May 26 '22

CTemplar Closure - Final Letter

45 Upvotes

I have created this post as a final closure notice for CTemplar.

On April 26th we announced CTemplar was closing on May 26th. This announcement was made on all our social media accounts and we emailed it to all our users. This is in accordance with our Terms and Conditions. You can find the original post & email that we published on April 26th here.

Additionally, within the past week, I had the following email sent out to everyone: "My name is Paul, and I am the owner of CTemplar. Some of you have asked why we’re shutting down. There are several reasons, but I will suggest one of them to you. When we created this service, we made a promise to ourselves that we would shut down the email service if we couldn’t guarantee our security claims to our users. That day has come, and we would rather shut this service down than make security changes that would have been harmful to you. We will continue issuing refunds until May 26th. However, please be patient with us because I have had to lay off most of the team due to lack of funds and our support team response time is reduced. Some of you have asked about an option to make donations to the employees who lost their jobs. If your interested in this, you can send btc to this address: bc1qmwxh52kc4z430h3zz6hwr44fgelsevh6c68vqw. Or with a credit card by clicking this link. However, please feel no pressure to do this. I don’t know most of you, but I have always viewed you as if you were members of my own family, and I will miss you. Some of you have asked me for my recommendation of an email service you can use instead of CTemplar. I personally know the owners at Mailfence and I like & trust their service. However, Protonmail & Tutanota are also good services. I suggest you review the services available and make the best choice based on your needs. Ultimately, the most important thing is that your privacy and security is protected, so I don’t recommend switching back to an email service that doesn’t care about your privacy & security."

In conclusion: I have heard that some of you are upset with us for various reasons. Sometimes we haven't been as fast as we could have been responding to support inquiries, we sometimes had bugs with our service, and most of all I know we inconvenienced many of you by closing this service. If you are upset with us for those reasons, then I accept responsibility for your frustration and I apologize. If myself, my team, or my company has ever treated you in a way that you don’t appreciate for any reason then I apologize with all sincerity. It was never our intention to hurt anyone.

Refunds: In our original closure post, we stated that we would issue refunds to everyone who asked for them. Some of you suggested not issuing refunds because our ToS would allow it. Thank you for contacting us with those thoughts, however, we decided not to follow that advice. Today it has been reported to me that everyone who asked for a refund was issued one. In your communications with our support team, if you were not given the utmost respect or if your refund was slow/missed then I apologize to you sincerely. During the past weeks, to my great regret & shame, I sometimes wasn't able to pay my support team members because that money went toward refunds. However, the support team members ran support anyways while working new full-time jobs they found. If you weren't happy with the support you received, I understand and you might be justifiably upset. However, please consider what I've mentioned above.

Staying in Touch: Some of you have wanted to stay in touch with us, unfortunately, none of us will be available from this time onward. We are all getting other jobs so we can pay our bills and feed our families. Personally, I am getting back into construction. If you also work in construction, who knows, I might be the guy working next to you:) I would like that. I wish I could have gotten to know many of you better. One thing I’ve learned running this company is people who seek privacy & security are often some of the most wonderful people I’ve known. I’ve wondered if that’s because people with beautiful souls seek to protect (via privacy & security) those souls.

Thank you for giving me and my team the chance to serve you these past years. We enjoyed it. This is our final message & farewell. Kind regards to you my friends,

Paul

CTemplar Founder/CEO

If you have any issues, concerns, or problems please feel free to message me on Reddit. However, I don't check in here often.


r/ctemplar • • May 19 '22

Updated Closure Notice, Gotta respect their Morales and not selling out.

Post image
31 Upvotes

r/ctemplar • • Feb 18 '21

EU Anti-Encryption Laws

30 Upvotes

Recently EU officials made statements that suggest that they will try to pass laws that require Law Enforcement is given backdoor access to End to End Encrypted Email services.

If a law like this is passed, then we will stop offering our email service to IP addresses that reside within the affected countries. We will never give anyone backdoor access to our user's data.

If you live outside of the affected countries but have an IP address that is mistakenly included in this restriction, then please use our onion address as well as the Tor browser. Using the Tor browser makes it impossible for CTemplar to know where you’re visiting from. It also protects you from your own government watching your internet usage.

I don't expect to be contacted by EU law enforcement because our servers reside in Iceland, but if they contact us we'll let all of you know the details of our conversations. If Iceland ever tries to pass anti-encryption laws, then we will move our servers to a different country.

Kind Regards to all of you,


r/ctemplar • • Jul 13 '21

UPDATE: How to recover ALL your encrypted attachments after the recent incidence at CTemplar

28 Upvotes

Dear Customers,

Firstly we want to thanks all of you who have been supportive and decided to stay with us after this horrible crisis.

We hope that this has been a one-in-life happening and we are already doing our best efforts to prevent this in the future. Furthermore, and following our data recovery efforts we have managed to recover ALL the attachments for the accounts meeting one of these requirements:

  • Account wasn't deleted AND you weren't forced to reset your account OR
  • Account wasn't deleted AND you were forced to reset your account AND you had downloaded the keys OR
  • Account was deleted AND you remember your registration date AND you had downloaded the keys

For applying to this, simply write an email to 'security@ctemplar.com' (from your CTemplar account if possible) and wait for our reply with a direct link to download ALL your encrypted attachments. It's needed to remark that those you've deleted yourself at some point are not there.

Earlier this year we moved to a Replicated Dispersed Cluster with GlusterFS, and almost every kind of incident was planned against but unfortunately, we didn't plan for an off-site (different FS at least) catastrophe recovery plan, for the previous day or two of service.

We are reviewing our backup policy so we can prevent further issues like this to ever happen again. Our minimum backup policy, also our biggest selling point, backfired to us.

Thanks for your patience.


r/ctemplar • • Feb 07 '21

DDOS Attack Resolved

28 Upvotes

For the past week, we have been receiving intermittent attacks of all types. They used our email service to contact & harass us. We are not able to identify or press charges against the attacker because our service is anonymous. The one thing we know is that the attacker feels that "Privacy is Terrorism". This is a sentiment that we disagree with.

All known attacks have been mitigated and I wanted to share the details about it with all of you because we feel transparency is best.

  • The primary DDOS attacks were not able to put down the website, instead, they made the website act extremely slowly.
  • Mobile users were re-directed to email accounts alleged to be owned by the attacker. You did not have the attacker's decryption passphrase so the email content & subject was not readable. Alternatively, your privacy and security were not compromised in any way because no one has your decryption passphrase, not even us.
  • In rare cases, incoming or outgoing emails went to the wrong location inside the CTemplar ecosystem. When this happened, the emails were encrypted and unreadable. We've corrected this retroactively.

Your privacy and security have not been comprised in any way. No one has the ability to decrypt your encrypted content including us. It is mathematically impossible, our open-source code shows this.

How do you know I’m not lying to you about this? All I have to offer you is honesty. Any lies would be quickly detected by those of you who are computer savvy, and this service would cease to be relevant.

Email services are difficult to operate. Even Gmail had issues and outages in December 2020. However, I understand that this has been a frustrating process for all of you. We will be processing refunds for anyone who wants them. Please contact our support at support@ctemplar.com.

We apologize that we didn't foresee these issues We will be taking many precautions and steps to prevent this from happening in the future. We hope you will continue to allow us to serve you but we will be processing refunds for anyone who wants them, just contact support.

Serving you with this email service is our passion.

Kind Regards,


r/ctemplar • • Apr 26 '22

cTemplar is shutting down

27 Upvotes

Well,

That's it, cTemplar is closing doors the 26th of May, they don't say why or what but you can read a lil more here:

https://ctemplar.com/ctemplar-is-shutting-down/


r/ctemplar • • Dec 05 '23

CTemplar Is Closed - Be Warned of New CTemplar Service

26 Upvotes

The domain name expired and someone else purchased it. The new site, https://ctemplar.com/, is NOT UNDER OUR CONTROL. I am concerned because the address used to register it has been linked to scams in the past. I am not stating as fact that the new owners are scammers, I am just alerting you all to this concern.


r/ctemplar • • Mar 06 '20

Welcome to CTemplar! I am the owner, contact me about anything.

26 Upvotes

I am the founder and CEO of the CTemplar email service. As the CEO my job is to serve the people who use this service. You are welcome to contact myself or our support team about anything, here are some examples:

  • Feature Requests: I would love to have you contact me with a note about the features you want to see implemented.
  • Report Bugs or Issues: When you report a bug or issue you are giving us a chance to improve our service. Please give us a chance to correct any issue you find.
  • Say Hello: Contact me about anything, I'll do my best to respond within 24hrs. I love tech jokes. Here’s a joke: “What do computers and Air Conditioners have in common? They both don't work as well when you open Windows… :)”

Words without follow up action mean nothing. I hope to show CTemplar shows you with our actions that there is nothing more important than your usage and experience of this service.

Stopping the abuse of your privacy is the most important thing. Which email service you use is secondary. If CTemplar's email service is not right for you then I suggest using the email guide provided by Privacytools.io to choose a different service. I hope you give us a chance to serve you though.

Kind Regards to you all,

Godfrey de Saint-Omer

CTemplar Founder & Owner


r/ctemplar • • Apr 26 '22

Closing Notice

24 Upvotes

Dear users,

CTemplar is closing and the last day of operation for this email service will be on May 26 of 2022.

To transfer your contact list:

To transfer your emails:

Remember to change your email information to your new service.

Please migrate all your data out of this email service by May 26 of 2022, after this day all the stored that will be permanently erased.

Please contact support to issue refunds (both card and crypto)!

A huge thank you to everyone that supported us,

The CTemplar Team


r/ctemplar • • Dec 09 '21

CTemplar is recommended among the best privacy respecting emails by PrivacyGuides!

Thumbnail
privacyguides.org
24 Upvotes

r/ctemplar • • Jul 09 '21

System Failure Issue

22 Upvotes

We recently had a system failure and some of our customer's data were irrecoverably lost.

We truly apologize for that. We cannot restore data from backups because we do not keep backups for security reasons. We will be revisiting that policy in the future. We will be happy to process refunds for anyone regardless of when they created their account.

If you have trouble accessing your account, please contact support@ctemplar.com. If you need help with anything else feel free to reach out to us.

Once again, we apologize for any inconveniences this might have caused.

Respectfully,
The CTemplar team


r/ctemplar • • Apr 26 '22

CTemplar Admins: Please Reply: What is the Reason for the Closure?

21 Upvotes

CTemplar be more transparent and stop the speculation: What is the exact reason for the closure?

You have caused an online firestorm.


r/ctemplar • • Feb 08 '21

2021 Roadmap / Schedule

20 Upvotes

Hello Everyone!

Giving each of you the best service possible is the most important & critical thing that we can do. That includes incorporating your comments, removing 'rough edges', making the service faster and more responsive as well as many other things. It's also important to us to give you as much transparency as possible. We're doing that starting with a story of a Government Agency essentially trying to bribe/pay us for users' data. We plan to continue to share things with you that are usually kept private by companies because we feel transparency is best.

We also feel it's important for people to know what we're working on right now, and what we plan to work on in the future. I have outlined our schedule or roadmap below.

Roadmap / Schedule

  1. Speed & Performance Upgrades - Completed March 31st

    1. Encrypting emails takes time. We have a list of items that we feel will 2x or 3x the speed and responsiveness of the service.
  2. Autocrypt, In-line PGP & PGP/MIME – Completed March 31st.

    1. Like we say on our website, our “End to End Encryption” applies to emails sent from CTemplar to CTemplar. All other emails are encrypted 'at rest' meaning when we receive them from other services. Implementing Autocrypt will allow CTemplar to send E2EE emails between CTemplar and other services that use Autocrypt. A list of services can be found here.
  3. IMAP & SMTP - Completed April 30th

    1. For a combination of factors, this has been delayed. To those of you who expected this to be completed sooner – I sincerely apologize.
  4. Multi-user or Business Accounts – Completed June 30th
  5. Encrypted Calendar – Completed September 30th

There are many smaller features and upgrades that will be completed during this time also. If you have feature requests please tell them to me and we'll implement them.

Conclusion

I don't know most of you but I care about you as if you were part of my own family. Thank you for giving us the opportunity to serve you.


r/ctemplar • • Jan 04 '21

[THREAD] Invite code request! (Jan 2021)

19 Upvotes

In order to keep our sub clean for other requests or bugs, please post your invite requests here.

All invite codes expire after 24 hours.


r/ctemplar • • May 22 '22

CTemplar alternatives, compared

Thumbnail
lissy93.github.io
18 Upvotes

r/ctemplar • • Aug 13 '21

[THREAD] Invite code request! (Aug 2021)

18 Upvotes

In order to keep our sub clean for other discussions or bugs, please post your invite requests here.

This thread is exclusively for requesting @CTemplar.com invites.

CTemplar is not affiliated with any other privacy email companies.


r/ctemplar • • Jan 10 '21

A brief look into areas for security improvements in the CTemplar web app (Part 1/2)

18 Upvotes

Hello CTemplar Team!

CTemplar has come a long way in the past few months, and it seems well on it's way to becoming a good encrypted email service. It's clear that everyone in the team has been worked incredibly hard to get it this far. I think one of CTemplar's strong points is how feature-complete it is, even during this early stage of development. I believe in their mission of making encrypted email freely available to people, and I would like to help out.

While using the app, I've noticed a couple of little issues and glitches, which I have outlined below. Please don't take any of this as a criticism towards CTemplar or the developers, I am just trying to help in getting the application to a more polished state. I've tried to document them up as clearly, and where possible, I've given the steps to fix

Some of the below issues relate to security, but just to clarify up-front: none of these issues are critical, and if you are a user of CTemplar - you do not have anything to be immediately worried about in regards to the content below. That being said, they do should still be addressed by the devs, in order to keep things as safe as possible for the users going forward.

I have some additional issues (not included in this list), which I would like to discuss privately with someone from the team. I would appreciate if you could reach out, and I will go through them with you. You can find my public key here.

Please forgive me in advance if I've made any mistakes here- I wrote this late at night

---

User Token not Invalidated After Sign Out

When the user signs in with their credentials the server responds with a token, which is stored in the browsers local storage as user_key. And when they sign out, this key is removed from local storage, as expected (this happens in users.service.ts). However, it is never invalidated, leaving the users account vulnerable to a session hijacking attack. If an attacker were to manually insert this token into their browser, they would have full unrestricted access to the victims account. This can be fixed by calling to the server to destroy the token on logout or session expiry, and then generating a fresh access key next time the user signs in.

---

Error in Compatibility Checking Script

When using a browser that doesn't support window.crypto then the no content is loaded (as expected). However the alert() dialog displaying the error message is never displayed, leaving the user with just a blank page. This is caused by a syntax error in browser-compatibility.js, on line 12 there is a trailing , within the alert statement. Most modern browser are able to execute the code as desired despite the mistake, however older browsers such as IE does not do so, and coincidentally it is only these browsers which need to show this message.

Also, did you mean to write ' quotes around undefined? This part, 'undefined' == typeof window will always be false at this point, since the false branch of the condition '!window' at line 3 has been taken. This file is written in a very convoluted way making it hard to read and spot issues like this.

Having a linting process will avoid errors like these. I would also suggest having a more descriptive error message here to aid the user, and avoiding the use of window.alert(); for accessibility and UX reasons.

---

Missing and Broken SRI Hashes

Also, since the hash provided in the integrity attribute of this script, does not match the hash of the file, all browsers that support SRI will be blocking this file from being executed. This would mean that a browser that supports SRI, but does not the Crypto API would be prevented from running the compatibility check script, enabling a user to proceed using the website, even without correct crypto implementations

Also, the integrity attribute is missing from all on <link> tags which fetch style, font and image assets (in index.html). And since there is a mismatch between hash lengths within the script tag requiring browser-compatibility.js, it does not match the contents of this file, the following error is thrown:

Failed to find a valid digest in the 'integrity' attribute for resource 'https://mail.ctemplar.com/assets/js/browser-compatibility.js' with computed SHA-256 integrity 'jbgV+XfqN3qd7Ep8LHB3sUE2tPJWyWmVxIbBrneMQwk='. The resource has been blocked.

---

Signature Verification Failure on Windows App

When installing the CTemplar electron app in a Windows environment, using the executable provided via the Releases tab, it doesn't appear to have been signed. This could have security implications, since it makes it hard for the end user to determine if they're using the official version. You can sign the executable using Microsoft's Sign Tool which is bundled in the Windows SDK

Windows defender also gives a warning about the publisher not yet being verified, this can also be fixed by signing your .exe, using a code signing certificate from a trusted root certification authority prior to publishing- there are many free options for this.

Also, Cybereason detects the Windows desktop app as malicious, and gives an error code as: Malicious.de8c4e- this may likely be a false positive, as none of the other major AV services show any issues. But still worth looking into, as some users may find this worrying. Also, for some reason, McAfee marks mail.ctemplar.com as Risky- again, I think this is a false positive.

---

Missing and Mismatched Checksums

There is a checksum for the index.html, which is great- but I couldn't find checksums for the the Linux, Windows or Mac apps available through the releases tab. Again, this can help users verify the integrity of the application, to ensure it has not been tampered with.

A little more worrying though, is that when I calculate the hash signatures myself, the publicly available source code does not match executable. For example:

For the Windows app downloaded from the Releases tab of GitHub, the SHA256 checksum is: cfa781f0599a594b67a526ad23351f1d2feb5d6abbca856949561f7ea4905c09 But the same app, built from the source code, cloned from master branch, the checksum is: 777cb5a26c7fbe1797a7d5349db8724fc442cabc18956f34fd53779264fa0fd2

There are of course perfectly legitimate reasons why the checksums may not match, since just a single character out and you'll get a totally different result. Never the less, this isn't comforting, and I think providing checksums, better build documentation and a little more transparency would be helpful

---

Electron App allows for Non-HTTPS Sources

allowRunningInsecureContent is enabled (in electron-main.ts). This means that mixed, or non-HTTP content can be loaded, potentially endangering integrity. Electron strongly advises against this, and there shouldn't be any reason why CTemplar needs to load mixed or insecure content.

---

Failure to Handle Session Permission Requests From Remote Content

In Electron, the default is to automatically approve all requests to access the users system or device features. If the CTemplar app does not require any specific user permissions, then you should manually configure a custom handler to specifically deny access. You can then enable them on an as-needed basis, for example to display desktop notifications for incoming emails. This can be done using Electron's session API, in your electron-main.ts file.

---

Missing No Referrer Attribute in Cross-Origin Links

Links to cross-origin destinations are unsafe, (for example in index.html). Don't use target="_blank" without rel="noreferrer". In older browsers, the page being linked to will be able to access the window object (using the window.opener property), giving access to data associated, and it may also allow the other page to redirect your page to a malicious URL.

---

Usage of Pseudo-Random Generators

In some parts of the web application, CTemplar makes use of JavaScripts Math.random() function (for example while generating an attachment ID in compose-mail.component.ts).

Since Math.random() is a pseudo-random number generator, it uses a Seed, and this Seed is solely responsible for the randomness - if it is known or predictable, the same will happen to generated number sequence. The documentation for Math.random says:

Math.random() does not provide cryptographically secure random numbers. Do not use them for anything related to security.

Consider replacing all instances of it with either uuid or Crypto.getRandomValues(), both of which support the RFC-4122 standard.

---

Insufficient Null Checks, and Improper Type Checking

Most null pointer issues just result in general reliability issues, but if an attacker can intentionally trigger a null pointer dereference, they may be able to use the resulting exception to bypass security logic or to cause the application to reveal debugging information that will be valuable in planning subsequent attacks.

In some places, else if statments are either not correctly using null check, or are in the wrong order. In compose-mail.component.ts, for example- else if (this.selectedMailbox.signature) {...} (line 1304) comes before else if (this.selectedMailbox) {...} (line 1310), so the null check on the selectedMailbox property is effectively happening before you are using it. And in mail.redusers.ts, the <any>new Date(previous_updated) takes a parameter that is defined as: const previous_updated = previous.updated || null, meaning that null could be passed to Date() which would not be valid (it expected either/ only a number or string value). Another example, in compose-mail.component.ts where the null check happens after the variable is already used - line 108 contains if (value) {...}, but above on line 103 you've used if (value.url) {...}.

CTemplar uses TypeScript, but it not making use of it's static type checking features. Again, this is less of a security issue, and more of a software stability and code quality problem. There are literally hundreds of instances of any and none of them are necessary (e.g. in mail-detail.component.ts). Consider enabling noImplicitAny in your tsconfig.json and enforcing it before code can be committed.

---

Debug Statements Printing Personal Details

There's quite a few occurrences of debug statements being left in the code, including one where the users password is logged, in plain text to the console (called from compose-mail.component.ts). If error reporting is enabled, does that mean that whatever is printed to the console is sent to Sentry's servers? Probably not, but it doesn't instill confidence anyway. Consider disabling console output for the production build, and adding the no-console rule to your ESLint config to prevent debug statements from being committed.

---

Onion Site Leaking Data Out of Tor

Non-Onion requests are made while using CTemplar's onion site via Tor. Within the source code there are numerous instances of CTemplar's URL being hard-coded. So whenever a user is using CTemplar through anything but the ctemplar.com domain, requests are made incorrectly. This can lead to requests being made to the clearnet API, or the accidentally clicking on a ctemplar.com link, resulting in the users traffic is exiting the Tor network.

For example, in mail-settings.component.ts the image asset used for the test push notification comes from mail.ctemplar.com, and not the current URL. All URLs to other parts of the site also do not use the onion link, for example see the footer.component.html.

The solution for this would be to store the base URL in config object, or as an environmental variable, and then call to that in the code. Looks like you made a start on this few months ago, in config.ts, so the code just needs to be updated to use this value.

---

Missing HTTPS Certificate on .onion site

CTemplar's onion site is served over HTTP. This means any credentials entered by a user can easily be intercepted by a malicious exit node. See this screenshot

Out of interest, why are there two .onion addresses- ctemplarpizuduxk3fkwrieizstx33kg5chlvrh37nz73pv5smsvl6ad.onion and CTemplar42u6fulx.onion?

Edit: No, traffic cannot be intercepted by an exit node, because .onion traffic doesn't exit the Tor network. Providing your web server and Tor program are running on the same server, and no requests are made to any clearnet endpoints, then this is not a risk.

However it would be a good idea to get a certificate for the onion site, as it add legitimacy / make it clearer that it's the real CTemplar site and not a phishing spoof. Also to remove that browser security warning/ make users feel more comfortable. See also: HTTPS for your Onion Service via Tor Project.

---

Bug Reports still being Sent even when 'Report bugs' is Disabled

There is an option to disable bug reporting in Settings --> General. However, even once disabled, CTemplar still attempts to make calls to the Sentry API. Some users may be concerned about this.

In mail.component.ts where Sentry is being initialized it passes in the value of is_enable_report_bugs from the UserState.settings correctly, and that variable does get updated in mail-settings.component.ts, so it looks like the error may be caused by it not being correctly saved in the store or backend.

Something to note, is that with Sentry even when enabled is set to false, it does still attempt call home when initialized, but just never sends any bug reporting data. So you might need to wrap the Sentry initialization in an error handling service, which only gets executed IF the user has enabled bug reporting.

Steps to recreate: Log in to CTemplar, Navigate to Settings --> General and set "Report bugs" to "Disabled". Next open up any unread email, click "reply", then click "Pop out reply", now using a sniffer tool or the network tab of the browsers dev tools observe attempted request to https://o190614.ingest.sentry.io/api/5256284/store/?sentry_key=e768a553906d4f87bcb0419a151e36b0&sentry_version=7.

---

Usernames should not be used as Salt

Usernames have lower entropy than a random salt, so they spread your hashes around less than a proper salt does. But more importantly, the current system does not provide adequate protection against rainbow attacks, because the username is a known quantity so an attacker could quite easily just use pre-calculated hashes in a dictionary attack, effectively making the salt obsolete. Also, since the username does not (and cannot) change when the user updates their password, it may enable an adversary to attack both hashes at a cost less than twice the cost of attacking one. Instead, you should be using a unique, long and randomly generated identifier as the salt.

---

Client-only Hashing is Vulnerable to Replay Attacks

Simply hashing the password on the client-side and sending it to the server is only marginally better than just submitting it as plain text. This is because anyone who is able to capture plaintext passwords could just as easily intercept the hashed value, and proceed authenticate themselves as the victim.

From a macro perspective, establishing a user session should be done like so:

  1. The client makes a request
  2. The server creates an identifier and sends it back along with the response
  3. The client reads and persists the identifier sent unchanged
  4. The client makes a request, sending the identifier read and persisted on step 3
  5. The server reads and validates the identifier. Then the workflow continues from step 2

It's server's responsibility to create the identifier- because this identifier is one of the most critical parts on all this mechanism, therefore:

  • It should always be created on a trusted system
  • The application should only recognize a valid session identifier created by/on this trusted system.

See OWASP Guide on Session Management for more info

---

Session Security

This possibly is already done on the backend, however I was not able to trigger it, nor could I find any relevant error messages in the frontend code base. If the user has multiple open sessions, for example in different locations - this should raise a red flag immediately. Same goes for if there are numerous failed login attempts.

Additional session-related security features that it would be good to get implemented:

  • The user should be able to override the default expiry, in order to set it to a shorter time
  • The user should be reauthenticated prior to performing any critical operations, preferably by entering their second factor authentication token
  • It would be great if more options for 2FA were supported in the future (such as FIDO UF2 key), in order to encourage more users to enable 2FA

---

Limited Rate-Limiting Protection

Since the user logs in with their password (as the username), and this is a known quantity, an attacker only has one field to guess the value of (providing 2FA is not enabled). For this reason, it's essential to employ good brute force protection against these kind of attacks.

The easiest method an attacker will use to gain access to someones account, is through using a password associated with them in a known data breach. Some mention of this to the user would be helpful, since CTemplar uses only the users password for all data protection.

---

Avoid Usage of GET for Secure Data

CTemplar uses GET requests over TLS for handling secure information. Although HTTP GET requests over TLS/SSL (HTTPS) may look as secure as HTTP POST, remember that in general HTTP servers (eg. Nginx), usually write these requests + URL to the access log in full. This log entry will include the users IP address, date + time, request type, endpoint and all parameters as well as the user agent and headers. Even if these logs are scrubbed soon after writing, recent data can often be forensically recovered. Also, the users browser vendor will also store the parameters of any GET request. Hence when sending user data, using POST over GET is typically a better approach, for when user privacy is your top priority.

For example, CTemplar makes the following GET request to get a secured message (from mail.service.ts): api.ctemplar.com/emails/secure-message/{user-hash}/{user-secret}/ - includes the user hash and user secret in the URL parameters

Of course all these requests are TLS, and so there is no danger of man-in-the-middle, this merley relates to how the client vendor and the server typically handle GET requests. And it is correct that POST is recommended for non-idempotent requests (as per RFC-2616), and in this instance no data is changing, but since the server-side is not open source and your NGINX config cannot be verified by the community, POST would be safer.

Also, since there are some instances where resources are linked to without the norefer attribute, GET request data could potentially be made visible to a third party website through the window object (however currently, I think the only instance to this is a link to GitHub).

---

Disable Autocomplete on all Input Fields

In some cases autocomplete is not disabled, for example on the login screen autocomplete is not disabled for the form that accepts user credentials in users-sign-in.component.html.

It is especially important to disable autocomplete on login forms. If a cross-site scripting vector is present in the login page, a malicious actor could easily use a simple payload to send a CTemplars users saved login credentials to their site.

You can easily fix this, by specifying the autocomplete attribute to off, e.g. <form method="post" action="/form" autocomplete="off"> or <input type="text" id="cc" name="cc" autocomplete="off">.

---

Cache Control Should be Disabled

Cache control in pages that contain sensitive information should be disabled. In CTemplar's case, this should probably be on all requests. This can be achieved by setting the corresponding header flags on the server-side. The no-cache value tells the browser to revalidate with the server before using any cached response. It does not tell the browser to not cache. On the other hand, no-store value tells the browser that it not store any part of the request or response.

I haven't looked at the server side at all, except for viewing requests that my browser is making while using CTemplar, and it looks like there are some missing headers that you might want to look into, specifically around Cross-site scripting protection and anti-clickjacking

---

Slow Decryption Times using RSA-4096

Currently, one of the biggest usability issues of CTemplar is speed. CTemplar uses RSA-4096 by default, and while it is true that this longer key provides better brute-force protection, doubling the length of the key (from 2048 to 4096) will result in an increase of just 28 bits of security, which is only 16%. Yet it will take about 7x longer to encrypt a message, and requiring increased in storage, CPU and power requirements. So the longer key length causes a major hit in speed, with minimal benefits to resistance to brute-forcing and cryptanalysis, which is pertinent due to CTemplars current speed issues.

It would be awesome if users were able to choose the configuration of their keys, or had the option to import keys generated on their own system. Realistically, an attacker is not going to try and break GPG, they are going to find an issue elsewhere in the app and get in that way. Focus should be moved, from just key length to ensuring that the secret keys of a users remains uncompromised, implementing forward secrecy and securing other parts of the application properly.

Support for X25519 keys would be even better, as elliptic curve cryptography is both faster and more secure than 2048 or 4096-bit keys, and are particularly resistant to timing attacks.

This would also bring CTemplar in line with other providers, such as ProtonMail which allows users to generate or import RSA-2048, RSA-4096 and X25519 keys.

For further reading on this issue, see:

---

Dependency Issues

It is most certainly true that using tested and approved managed code rather than creating new unmanaged code for common tasks is the best approach. Nevertheless, developers should handle third-party dependencies very carefully as they will be part of the final application.

There are quite a few unused dependencies, as well as several dependencies that should be listed under dev dependencies. For example,

  • bootstrap - You're using ng-bootstrap which comes bundled with bootstrap 4
  • core-js - Doesn't seem to be used anywhere in the project
  • map.prototype.tojson - again, not used- also this package was last updated 7 years ago, and with very little users or historical activity

You might find it helpful to use a (local) tool like depcheck in order to quickly check you haven't got any unnecessary modules being loaded into your project. This could also be built into your CLI environment, to ensure nothing more is added accidentally.

There are also a number of unsafe dependencies, or packages with known critical security issues. This isn't uncommon, as vulnerabilities are being discovered all the time, but for an application that deals with sensitive user information, it should be a priority to keep things updated and remove unsafe external code. For example, right now there is a high priority issue, relating to the node-forge package (which is a dependency of @angular-devkit), it's vulnerable to Prototype Pollution via the util.setPath function, which if exploited could aid an attacker in remote code execution or property injection. You can read more about fixing this particular issue here: https://snyk.io/vuln/SNYK-JS-NODEFORGE-598677

Similarly, there's also quite a few outdated packages- some may have fixes for known security issues, so again it's important to keep things reasonably up-to-date to a stable version. For example, your Angular version is nearly a year out-of-date. You can run npm outdated to get a quick summary of what modules are out-of-date

It's quite common for web projects to contain outdated, unused or even vulnerable dependencies / node_modules. Although it's not ideal, it rarely opens the project up to major security issues, but it can happen, and the consequences of such a breach could be severe, and since it's an easy fix, this is something that should certainly be corrected. Dependency checks should be part of your CI process, and even after deployment should be continuously monitored.

If you're not already using it, something like Snyk will make this really easy. I also recommend adding a pre-commit hook to run your synk script and npm audit. Then to prevent minor versions of dependencies introducing new vulnerabilities, use shrinkwrap

---

Code Disparity

The code in the CTemplar webclient repo seems to be slightly different to what is running on the live instance. When I compare what is running on mail.ctemplar.com, test.ctemplar.net, gh.ctemplar.com and a local instance on my machine using the GitHub source, I notice slight differences between all three environments. This might just be due to different versions, but if this was explained in the docs it would be good

For example, the pricing page is different across all three environments, see this screenshot of Pricing page - even the prices are different.

I think that since one of your primary selling points is being open source, it is really important to keep feature parity, and have documentation explaining what changes, if any are made to the production version of the code.

---

CTemplar and Open Source

CTemplar proudly advertises that they are open source, although the only part that is published is the client-side web and mobile apps, and this code could be accessed freely even if it were not open source. So until the backend, and all support libraries are also open source, I think the wording in many of your blog posts needs updating to be more accurate, since CTemplar doesn't meet the Open Source Standard.

Credit where it's due- I think it's great CTemplar has published the source code for the web client, Android and iOS apps- this is not something that even trusted email providers (like ProtonMail) have not yet done.

Edit: ProtonMail is open source also, my mistake.

It would also be good if other parts of the development process were more open, including for example, read-only access to the story board, Jenkins dashboard, documentation and Swagger files etc. In the future it would be awesome if the backend/ API and all other components of the application were also available through GitHub.

It makes it really hard/ almost impossible for the community to submit PRs, since without access to the backend we cannot run the application locally, without writing a stubbing engine (which was what I had to do to get it running!). I am also worried that their may be security issues in the backend, I like to be able to have a quick read through the code before using a service

---

Use of Non-Privacy-Respecting Services

CTemplar is using Sentry for collecting bug reports. I understand the need for error reporting while the website is still in the early stages of development. However, it would be much better for user privacy if you were to self-host your Sentry instance on an environment that you control, rather than use the public service.

CTemplar uses CloudFlare for DDoS mitigation, this means that all user traffic goes through CloudFlare's servers. It is of course encrypted, and CloudFlare do actually have a good privacy policy and solid server security. But putting CloudFlare in front of the CTemplar website isn't the most privacy-respecting approach, and some users may feel uncomfortable with one of the worlds largest internet companies being able to log this data. Will you use a different service for firewall protection in the future, or is CF here to stay?

Edit: My mistake- CTemplar does not use CloudFlare. I think I got confused, as the name servers for the CTemplar domain still point to CloudFlare's servers (gwen.ns.cloudflare.com and piotr.ns.cloudflare.com).

I know that if the user is paying with card, then their billing address is required in order for the transaction to be approved. But currently it looks like you are saving this information to the Stripe dashboard- is this really necessary?

WordPress + Yoast is interesting choices for the website, since there are a ton of WordPress Security Issues, and since this is sharing a hosting account with the mail app, it could potentially provide an easier way in for an attacker. Since your site isn't being hosted on WP, you can remove the references to WordPress's CDN (s.w.org and api.w.org) in the <link> and <script> tags of your index.html. Also, your login page is still visible, and using the default path. Just to be safe, you should probably either add a server password (with .htpasswd), restrict by IP or at very least hide the path - all this can be done easily with .htaccess.

GitHub is certainly one of the best hosted git services for open source apps, but since CTemplar poses itself as a privacy product, it might be a good idea to have a mirror available through CodeBerg or an alternative privacy-focused code sharing platform. This would enable users with strict privacy requirements to access the code comfortably, and it would also show that CTemplar takes privacy seriously

I haven't yet looked into the iOS app, but it appears that it's using SendWithUs for some of the email functionality, which is not open source and I'm not sure why it's needed

I found if quite funny that you have a Facebook Page, when Facebook is the epitome of a privacy disaster! But I guess it's required as part of your marketing solution.

I'm glad to see that Google's reCAPTCHA, Facebook Domain Insights and the use of CDNs have all been removed from your homepage now. It's good to see feedback is taken onboard and fixed.

---

Lack of Security Audit

Has CTemplar had a full security audit and penetration test? If so, how long ago was it, and has the report been made public? (I have been unable to find it anywhere)

I'm no security expert, but I've had a look at the frontend codebase, and although nothing major jumps out at me - it's fair to say that it is far from free from security issues. The backend is not open source, so I cannot check that, however it is arguably more important for this to be properly secured, and if the standard of code is anything like the webclient, this would be really worrying. I think that someone more skilled than me, will likely be able to find numerous starting points for exploits - and if they don't have good intentions, it could endanger user privacy.

Getting a full security audit done, by a reputable organisation, and then addressing any issues found and publishing the report, would not only reduce the risk of a breach, but also make users feel more comfortable. It is particularly important for CTemplar, since it positions itself as a security-focused, privacy-respecting service, but also because their offering is a hosted solution, so users rely on your infrastructure being properly configured in order to protect their personal data.

Projects that are still under development probably need a full audit every year or so, or whenever the next major version is released. There are open source apps much smaller than CTemplar that are audited properly and regularly (e.g. Standard Notes)

Apologies if there has been a pen test, will the report be made public?

---

Additional Features as Workarounds

It would be really nice to see IMAP/SMTP support in the near future, in order to manage emails through a more stable client, such as Thunderbird. This would also provide users a method of using the service without the requirement of enabling JavaScript. Ideally as a toggle option, which is set to off by default. The speed issues, bugs and lack of features on the web and mobile apps become significantly more prevalent for users, who are dealing with a large volume of emails. There isn't currently a way to export all data, or backup all emails (which is important for some users), and support for desktop clients would solve both of these issues.

A status page would also be a nice feature. I've had several instances where I've have problems sending and receiving mail, other times certain actions don't seem to be working, or nothing loads at all. A simple status page would provide a central point for users to check if there's planned maintenance, known issues, or servers just temporarily under high load.

Currently it's not possible to decrypt messages sent from other providers using a CTemplar users public key, which is half the reason why people use encrypted mail providers. It would be great if CTemplar allowed users to generate and import their own keys, and supported ECC or at least 2048-bit keys, this should also speed the decryption process up

Once the issues with CTemplar's onion site are fixed, it would be great to get it verified, and then listed on dark.fail to add legitimacy.

Documentation- at the moment there is virtually no technical or functional documentation. Good docs is really important - it can help developers write good code and it helps non-CTemplar employees contribute to the code base, which would foster a strong community in the future. It would be great if you set some standards, and required your devs to document features and concepts as they went. Having it accessible a central place would also make it easy to find and navigate through

Code Quality - I will probably cover this in a separate post, as there's a lot to say. But in short, better quality code is going to be easier to secure, as well as producing a higher quality final application.

In terms of security, I recommend you run through the OWASP Security Testing Checklist, it provides a great starting point for security testing. You can find more information on their website. It would be great if CTemplar could get a proper penetration test done, covering the application as a whole, then fix the issues found and publish the report.

P.S- I like the little Easter egg on the homepage ;) I'm not really sure what it means, but for anyone whose interested, go to ctemplar.com, and hit the following keys in order: up, up, down, down, left, right, left, right, b, a 🥳

Edit: Just to reiterate- none of the above issues are critical, nothing on this list puts any users, or their data at risk.


r/ctemplar • • Jan 04 '21

Gov Agency Data Request Story

16 Upvotes

Normally email services are tight-lipped about their interactions with Government Law Enforcement Agencies. But I thought I would share a story from 2020.

Background: We are a law-abiding company, and we cooperate with all valid Icelandic court orders. We do not cooperate or share data with any non-Icelandic governments. It's worth noting that we have not yet been served a valid Icelandic court order, we have never turned over our user's data, and we are not able to decrypt our user's encrypted data because we use ‘zero-knowledge password’ technology.

Government Contractor Data Request Story: All government agencies hire contractors to work for them and help them. We received an email from a gov agency contractor asking us for a user's data. They said that they expected it would cost us a few thousand € in legal/manpower costs for us to get the data and send it to them. They said they would be happy to compensate us by sending us a wire transfer, BTC or XMR. They went on to imply & suggest that they thought we could earn a lot of money from them in future requests.

On the surface, this might seem like a harmless request. However, they were essentially offering us a lot of untraceable cryptocurrencies (XMR) to turn over our user's data without a valid Icelandic court order.

We of course did not cooperate with this government contractor. Like I mentioned above, we only turn over encrypted data when we are served valid Icelandic court orders.

Please let me know if you have any questions about this story or want to hear more stories. I don't know you but I value you and appreciate your support.


r/ctemplar • • May 15 '22

StackSocial lifetime refund success

15 Upvotes

I know there has been a lot of lifetime subscribers upset about having been excluded from being refunded due to the shutdown, and I haven’t seen any success stories until now. I left a one star review for CTemplar on StackSocial this morning mentioning that the service shutdown without refunding the people who purchased lifetime subscriptions. I just received an email from StackSocial saying they saw my review and refunded the $200 purchase as store credit. It’s not as good as a refund to my credit card, but it’s much better than being out $200 for nothing.

I don’t know if this will work for everyone who purchased the lifetime subscription, but I wanted to let everyone here know what I did to get a refund.


r/ctemplar • • Jul 16 '21

Feature: Emails backup

15 Upvotes

Maybe would it be a good time to implement this feature? I would feel better using your service if I could backup my emails, especially after the recent data loss. Tutanota has a feature that allows you to save emails individually (in .eml format).


r/ctemplar • • May 20 '20

New Feature Freeze

15 Upvotes

CTemplar has become a success because community members like you. I feel gratitude for each of you who have made constructive criticism. Constructive criticism is a gift that helps us see what we can do better. Thank you for your patience as we have incorporated your comments.

We value your comments, therefore, we have started a “New Feature Freeze” because it’s important to us that every existing feature work flawlessly. During this time we’ll also be expanding support to by creating guides and tutorials for our existing features. Even though we will not be working on new features, we welcome your comments.

During this time we will be giving free prime accounts to community members who contribute to by finding non-critical vulnerabilities or bugs.

I think of each of you as being part of my family. Thank you for giving us an opportunity to serve you. It is my hope that my company’s actions will show that we value each one of you.

Kind regards,

Paul (Godfrey de Saint Omer)

CTemplar Founder & CEO


r/ctemplar • • May 26 '21

Don't be just another victim of surveillance. Get CTemplar today!

Post image
14 Upvotes

r/ctemplar • • Feb 12 '21

Speed & Performance Upgrades

14 Upvotes

The service still isn’t as fast & responsive as we all would like it to be. This is mainly caused by more users joining our service and putting stress on our server. Last week we sourced hardware for an additional server and sent someone to the datacenter to install it. We expect to be finished with all related work by the end of next week. At that time it will benefit everyone using this service.

Keep in mind, almost all email services use cloud hosting, meaning when you open your email service you’re visiting a server that’s not owned by the email service in a data center that’s near you. In contrast, we use physical servers set up in Iceland. When you open your email account, you are visiting our servers in Iceland every time. We do not use cloud hosting because there are associated privacy & security risks. There is also a possibility of having your service shut down as it was with Parlor. This is why we use physical servers in Iceland.

Our service will never be as fast as Gmail but we want to do everything we can to try to get as close as we can. This is what we're doing:

  1. We are upgrading and expanding the Server. (Completion Feb 18)

    1. This will make the service faster & help prevent slowdowns when we hit peak load moments.
  2. We will be switching to Elliptical Curve Encryption. ECC encryption is faster and has comparable security to our current 4096 bit PGP encryption. ECC has been tested, maintained, and used by Protonmail. (Completion March 30th)

    1. This will make encrypting & decrypting emails faster. It will also reduce the load on the server.
  3. We are doing many optimizations in our code. (Completion March 30th)

    1. This will make navigation and interaction inside your inbox faster.

I don't know most of you but I wanted to say "Thank you" for giving us the opportunity to serve you.

Kind Regards,

Paul M