Live data from Hacker News

Twinkle Notes: Cross-platform encrypted notes app

github.com

21–30 of 52 posts

Re: Twinkle Notes: Cross-platform encrypted notes app

#21
post #16

I was in search of a good cross-platform notes app. Like Evernote, but preferably free with the open data format. I concluded that for me, personally, emacs org-mode with notes files stored in the Dropbox folder turns out to be an optimal solution. YMMV.

Same problem here. Resorted to keeping everything plain text after trying so many half-baked and sticky note taking apps that prevent your notes from being ported.

Currently using this Chrome extension: https://chrome.google.com/webstore/detail/marcador/nneoamjib...

Started as just adding bookmarks to your Dropbox, but now it lets you add plain text notes.

And it only has access to its own app directory--not your whole Dropbox!

Re: Twinkle Notes: Cross-platform encrypted notes app

#22
post #16

I was in search of a good cross-platform notes app. Like Evernote, but preferably free with the open data format. I concluded that for me, personally, emacs org-mode with notes files stored in the Dropbox folder turns out to be an optimal solution. YMMV.

I think that my Sciter.Notes (https://notes.sciter.com) will qualify that.

Notes are stored in local db yet notebooks in the db can be mapped on file folders (e.g. folder on DropBox containing html files - each note is a single HTML file).

The note db file can be protected/encrypted by OS means.

Windows/Mac/Linux.

Re: Twinkle Notes: Cross-platform encrypted notes app

#23

> end-to-end encrypted https://github.com/twinkle-labs/twinkle-notes/blob/45206f9d6... For AES in CBC mode, IVs have two requirements: 1. They must never repeat. 2. They must be unpredictable. Generating them from a SHA256 hash of some low-entropy data is not a good practice. https://paragonie.com/blog/2016/05/how-generate-secure-rando... Furthermore, not authenticating your ciphertext means padding oracle attacks ca…

Can you cite some source for why the SHA256 of changing data isn't sufficiently random to be used as the IV?

Re: Twinkle Notes: Cross-platform encrypted notes app

#24

> end-to-end encrypted https://github.com/twinkle-labs/twinkle-notes/blob/45206f9d6... For AES in CBC mode, IVs have two requirements: 1. They must never repeat. 2. They must be unpredictable. Generating them from a SHA256 hash of some low-entropy data is not a good practice. https://paragonie.com/blog/2016/05/how-generate-secure-rando... Furthermore, not authenticating your ciphertext means padding oracle attacks ca…

Thank you for digging into the code. This is why we are going open source. The encryption you are referring to is for encrypting a list of keys for your local notes storage, which is not exactly part of the end-to-end encrypted syncing. Since you have got this far, could you please have a look at:

https://github.com/twinkle-labs/twinkle-notes/blob/8ad7d9d0b...

> They must be unpredictable

I am wondering if that is necessary, because the hacker can't perform those attacks without the user's actively using the app at the same time. From what I learned, the attacking process requires the presence of key somewhere. If the attacker can get on user's device while one is using it, then it's almost a hopeless situation. Please educate me if I am wrong.

Re: Twinkle Notes: Cross-platform encrypted notes app

#25
post #15

A few questions and observations: * If I choose to use this notes app on multiple devices, and am careful enough to be the only person using it and complete any note taking on one device at a time (closing the app properly), I should be able to store and sync the sqlite database on any cloud storage service and wouldn't need the paid sync option, correct? In other words, the sync option makes multiple clients opening…

> store and sync the sqlite database on any cloud storage service

It would be quite slow.

> a minimum of 1GBm

Our servers are quite dumb that if you are hosting your space with us, we need to reserve some storage space for you. That's a fixed cost for us even if you are not effectively using that storage.

Re: Twinkle Notes: Cross-platform encrypted notes app

#27
post #16

I was in search of a good cross-platform notes app. Like Evernote, but preferably free with the open data format. I concluded that for me, personally, emacs org-mode with notes files stored in the Dropbox folder turns out to be an optimal solution. YMMV.

I've been using https://notable.md/ for a while, works well for simple workflows.

Re: Twinkle Notes: Cross-platform encrypted notes app

#28

> end-to-end encrypted https://github.com/twinkle-labs/twinkle-notes/blob/45206f9d6... For AES in CBC mode, IVs have two requirements: 1. They must never repeat. 2. They must be unpredictable. Generating them from a SHA256 hash of some low-entropy data is not a good practice. https://paragonie.com/blog/2016/05/how-generate-secure-rando... Furthermore, not authenticating your ciphertext means padding oracle attacks ca…

Thank you for digging into the code. This is why we are going open source. The encryption you are referring to is for encrypting a list of keys for your local notes storage, which is not exactly part of the end-to-end encrypted syncing. Since you have got this far, could you please have a look at: https://github.com/twinkle-labs/twinkle-notes/blob/8ad7d9d0b... > They must be unpredictable I am wondering if that is ne…

> > They must be unpredictable

> I am wondering if that is necessary,

Yes, it is necessary. The IND security of Cipher Block Chaining (CBC) depends entirely on the IV being from a cryptographically secure random generator.

CBC mode requires unique and random IVs. CTR mode requires unique IVs (but can be predictable).

That's why we call the CTR input a nonce (number to be used once) and the CBC input an IV (initialization vector). Since they have different security requirements, we refer to them differently. Unfortunately, some cryptography libraries just name the parameter IV.

Re: Twinkle Notes: Cross-platform encrypted notes app

#29

> end-to-end encrypted https://github.com/twinkle-labs/twinkle-notes/blob/45206f9d6... For AES in CBC mode, IVs have two requirements: 1. They must never repeat. 2. They must be unpredictable. Generating them from a SHA256 hash of some low-entropy data is not a good practice. https://paragonie.com/blog/2016/05/how-generate-secure-rando... Furthermore, not authenticating your ciphertext means padding oracle attacks ca…

Can you cite some source for why the SHA256 of changing data isn't sufficiently random to be used as the IV?

https://web.cs.ucdavis.edu/~rogaway/papers/sym-enc.pdf

See the section about "CBC with Counters".

The consequence of the security proof by Rogaway, et al. for CBC mode is that IVs must be unique AND unpredictable for CBC mode to be secure*.

SHA256 is a deterministic pseudorandom function if you know all of the inputs. By studying the source code, we can see what gets fed into the SHA256 inputs. The cost to brute force all possible inputs is definitely much lower than 2^128, therefore it weakens the IND security of the AES-CBC scheme.

CBC security only provides indistinguishability. It isn't secure against adaptive chosen-ciphertext attacks.

Re: Twinkle Notes: Cross-platform encrypted notes app

#30

I've seen a lot of these kinds of apps lately that have their own one-off sync mechanism. Can I ask what were the design considerations that led to that choice, rather than letting users sync a store via their own back end (Dropbox, iCloud, rsync...)?

I develop an app like this ( https://actualbudget.com/ ) and I'll give you my reasons. Those kinds of syncing work will files, and treat each individual file as a blob. Apps don't work this way. Apps need databases and fine-grained change tracking. You absolutely don't want to make a change in two places on two separate devices and then have a sync conflict. If you throw the sqlite db file on dropbox, that's exactly…

You keep local copy of database and cloud copy of database. When cloud copy changes, you detect difference and apply it to your local copy, resolving conflicts if necessary, then copy your local copy back to cloud. It might be more difficult to implement, but it allows user to use any sync option.
Post reply on HN