javascript sends length of message to server and server creates private ...

...and public keys based on that length.