UPDATE: I got it working :) !
The issue was the way I was creating the encryption keys. Same issue with the signing method, I was not creating binary keys. My constructor now looks like this:
public function __construct($multipass_secret){ ### Use the Multipass secret to derive two cryptographic keys, ### one for encryption, one for signing $key_material = openssl_digest ( $multipass_secret, "sha256", TRUE); if($key_material){ $this->encryption_key = substr($key_material,0,16); $this->signature_key = substr($key_material,16,16); } }
I hope this helps someone that was having the same problem.