Skip to content
This repository has been archived by the owner on Jan 29, 2023. It is now read-only.

Adding encryption support #41

Open
SanmayJoshi opened this issue Aug 3, 2017 · 4 comments
Open

Adding encryption support #41

SanmayJoshi opened this issue Aug 3, 2017 · 4 comments
Labels
Milestone

Comments

@SanmayJoshi
Copy link

SanmayJoshi commented Aug 3, 2017

Hello George, 👋

I am not much into Android development, but I certainly understand that adding features is not as easy as talking about adding them. It takes a hell lot of code. Still, I think adding compression/extraction and encryption/decryption functionality would make the app pretty much of all rounder for offline needs.

As for compression/extraction, I think rar, zip and 7zip are mostly used ones. Though I don't know exact libraries for this but maybe Amaze file manager's code may help. And encryption/decryption functionality maybe enabled by using AES Encryption's JAVA library.

Hope I didn't hinder you with unnecessary suggestions.

Wish you the best of luck for further development.

Sanmay

@veniosg
Copy link
Owner

veniosg commented Aug 3, 2017

Hey Sanmay, thanks for the suggestions.

In regards to compression/extraction Dir already supports .zip - it's under the pencil menu after long pressing on any item(s) in the list. The main reason I didn't add support for other formats is that these would need libraries and could dispropotionately increase .apk size for a rarely used feature. FWIW I've found that installing the RAR app (com.rarlab.rar) alongside Dir provides a rather seamless experience handling rar files, and I'm sure there's apps out there that do the same with 7zip.

I'd definitely be open to adding encryption/decryption, again given that the size increase is at most ~100k (given the size of the library you shared this seems like a non-issue). Another consideration would be that the library be trustworthy enough, and not being an expert in encryption I don't know about that specific one. I'm assuming some open source library with enough stars/forks that is actively contributed to should do the trick.

All in all, I'm not against adding these, given the above constraints are met. Being a bit busy this period, adding these is probably going to have to come via a contribution and therefore might take some time :)

P.S. Would you mind splitting this into separate issues? One for rar support, possibly one for 7zip and one for encryption/decryption? Feel free to rename this and keep it for any of the above, just make sure you reference it on the new ones.

@SanmayJoshi SanmayJoshi changed the title Adding compression/extraction and encryption support Adding encryption support Aug 6, 2017
This was referenced Aug 6, 2017
@SanmayJoshi
Copy link
Author

Hi George,

I searched through web, and I think AESCrypt is pretty much well known, and is used by devs to include encryption facility in their programs. I even found its reviews to be satisfactory on a single google. Also, it uses AES, as the name suggests, Advanced Encryption Standard, which is FIPS 197. Simply said, this standard is used by banks and even US government to protect digital data. (source: wikipedia)

I understand that, just because AES is good doesn't mean AESCrypt is good too. But, I think it is not vulnerable to security (everything is vulnerable, btw 😉 ). Usually reviews blame AESCrypt because it allows only file encryption (we are talking about its software package), but our concern being security and trust, I think AESCrypt has both.

It is not maintained on GitHub, but I think it may be used by Dir, given its reputation. Its library is around 50kB in size.

It was nice to have your comment. Feel free to do what you seem fit.

Sanmay

@veniosg
Copy link
Owner

veniosg commented Aug 7, 2017

Sounds good, thanks for the research!

@SanmayJoshi
Copy link
Author

Hey George,

I did some more research and thought that going with library created by Tozny might be a better choice than with AESCrypt.

The library, Java AES Crypto, created by Tozny is active and seems pretty popular (39 watch, 455 stars, 126 forks as of today). Library claims to have avoided common mistakes, which are usually seen in libraries. It has better documentation, a lot better than AESCrypt. So, it is pretty much of a better choice I guess.

👍

@veniosg veniosg added the feature label Aug 9, 2017
@veniosg veniosg added this to the backlog milestone Aug 9, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants