Using any term other than an integer or binary as the second argument of crypto:compute_key/4 (OtherPublicKey) crashes the Erlang VM.
Steps to reproduce:
The atom foo can be replaced by any arbitrary non-integer and non-binary term with the same result.
A cursory inspection of the source (crypto.erl) indicates that adding an is_binary guard to ensure_int_as_bin/1 would be a quick fix for the problem. The core issue, however, is in the ecdh_compute_key_nif native function or one of the functions it calls.