Fix setup and message sending to match crypto API changes