Don't write a textbook unless all existing textbooks on the topic make you irrationally angry. If you do write one, your reward is that there will now be one more textbook making you irrationally angry, but this one will have your name on it.
The Joy of Cryptography is finally on bookshelves! Thanks to @mitpress for supporting the adventure. The book will eventually be completely open-access, but for now the first 3 chapters are available at joyofcryptography.com, featuring some fun interactive elements.