Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decryption of encrypted single notes #3

Open
bbcquincy opened this issue Sep 27, 2019 · 3 comments
Open

Decryption of encrypted single notes #3

bbcquincy opened this issue Sep 27, 2019 · 3 comments

Comments

@bbcquincy
Copy link

Hi,

thanks for clarifying the issue with java in the last commit. Now I tried again to use the program and it now works well with test cases.

What I am currently missing is the decryption of single encrypted notes. If a single note is encrypted, its property "encrypted" is set to 1 and the "note" string contains the encrypted string.

As far as I have seen in ColorNote (version 4.1) there is no other password than the master one, so also these note texts should be encrypted with the master password already used to decrypt the whole backup file.

Could you perhaps decrypt those, too?

@olejorgenb
Copy link
Owner

Hm, I think that must be a new feature. I think the best approach would be do make a new backup without encryption of the individual notes (if possible in newest color note version).

I don't have time (or motivation to support colornote's for free really :)) to add new features.

A wild guess would be to extract the encrypted string (which most likely is base64 encoded if part of the json file. base64 decode it and try to run the decryption on the resulting file. I doubt it will work though. It's likely that the encryption is done in a slightly different way.

If you're familiar with programming you could attempt to decompile the latest version and find out how they do the new encryption. I will accept a PR.

I recommend moving on to another program with actual export functionality.

@marco-venuti
Copy link

Hi @olejorgenb, I tried to decrypt the encrypted note after decoding its base64 string as appearing in the json, but it didn't work.
I used the same algorithm as you did for the master file, with the same salt and my master password. The algorithm itself does not fail, but it produces a random result instead. Since the input binary must at least be of certain format or size, I'd guess that the encryption algorithm could indeed be correct, but maybe the salt is different. How did you find the salt in the first place? Did you find it somehow in the decompiled binary of the app?

@olejorgenb
Copy link
Owner

How did you find the salt in the first place? Did you find it somehow in the decompiled binary of the app?

I unpacked the apk file and used a java disassembler to inspect the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants