# Format of NONCE in Initialization Vector (IV)

When we talk about a Number used ONCE (NONCE) in Initialization Vector (IV), is it required to use numbers only? Is is possible to use letters or special characters?

-
An IV or nonce is a sequence of bytes, the concept of letters doesn't make much sense here. So what's your question? Are you talking about the ASCII representation of those bytes? Or the hex representation? –  CodesInChaos Jul 10 '12 at 11:30
It's just a string of bits, how you wish to interpret it is entirely up to you and irrelevant to the actual underlying cryptographic operations being performed (personally I like to use hex. representation for visual inspection as it's easy to compare bitwise, great for debugging) –  Thomas Jul 10 '12 at 11:40

@owlstead: I'm OK with you change. However, using an UID as IV can be bad: in CBC mode, if the UID is predictable, encryption can be broken under CPA; in CTR mode, if consecutive UIDs differ only in the same low bits that are changed by counting, some keystream is reused. $\;$ In my opinion, the simplest (thus often the best) is: if the key is used for a single session, use implicit zero IV; otherwise use a random IV. –  fgrieu Aug 10 at 23:41