> On Jun 9, 2017, at 7:30 AM, Yuriy M. Kaminskiy <yum...@gmail.com> wrote:
> 
> On other hand, application-level encryption should be used with great
> caution; it is a way too often designed and implemented by
> non-cryptographers, does not use optimized or hardware-assisted crypto
> primitives (and, for AES, often use naive implementation without
> protection against timing/cache attacks),

Hm. The file-encryption code I’ve seen generally delegates the actual crypto 
primitives to either OpenSSL, libSodium, or an OS-provided subsystem like 
Apple’s CommonCrypto. I agree that I’d have little trust in a library like this 
that tried to write its own implementation of AES, etc.

> does not use protected hardware for keeping keys;

Yeah, key management is generally “left as an exercise for the app developer”, 
who has little knowledge of security. The problem I’ve seen on mobile devices 
is that app developers will often pass the buck to the user, i.e. deriving the 
key from a passphrase. The user then has to type the damn passphrase every time 
they run the app, which heavily incents them to pick something short and 
trivially-crackable.

This has gotten somewhat better with biometric sensors. On iOS it’s pretty easy 
to store a key in the Keychain protected by TouchID, which means the key itself 
resides in the CPU secure enclave, which will only release it when it gets a 
fingerprint. Not that fingerprints are massively secure, but they’re a lot 
better than a four-digit PIN, and require physical access to spoof.

(FYI, Apple has an excellent iOS security white-paper that covers all of this 
stuff in detail.)

> And any non-opensource crypto should be taken with triple caution. Or
> even opensource, but not widely-used or otherwise not known to be
> carefully peer-reviewed (FWIW, I looked at e.g. wxsqlite crypto code, it
> looks not exactly promising too).

What do you think of SQLCipher?

—Jens
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to