SecretHandshake spec in JS