News for hackers. Stuff that matters.
Re:Cryptographic Right Answers by lmm on Tuesday April 03, 2018 @06:12PM (#16749869)
What right answers exist for code that has to run in phone apps? As javascript in a web browser?

If I want to do asymmetric encryption/signatures and am terrified of the security implications of non-memory-safe languages and/or libraries written in them, do I have any good options? (i.e. is there something I could use from a JVM or an OCaml unikernel or the like?)

(I would ask the same thing about website security and transport encryption, but honestly I'm going to stick with ocaml-tls whatever you say)

Re:Cryptographic Right Answers by lvh on Tuesday April 03, 2018 @06:32PM (#16750015)
To pick on the memory-safe languages bit:

- I get it. But libcrypto is less likely to have some insane UAF bug than, say, libtiff or whatever. If you're going to use unsafe code, libcrypto and libsodium are pretty great choices. I wrote a Clojure (so JVM) library that binds libsodium FWIW.

- I hear nice things about Rust's ring lib. Still gotta FFI from OCaml or the JVM though.

- A lot of the recommendations on this list are algorithms designed to be safe to implement. For example, it's unlikely that a JVM impl of XSalsa20 + Poly1305 is suddenly unsafe because of the environment you're running in. This is NOT TRUE for things like AES-GCM; firstly a lot of naive AES implementations are insecure, and good luck doing GHASH safely in software.

Re:Cryptographic Right Answers by tptacek on Tuesday April 03, 2018 @06:15PM (#16749892)
My advice regarding crypto code that needs to run in Javascript in a web browser has not changed: don't design systems that depend on crypto running in a web browser.

The rest of this should be fine in a native phone app.